Show sourcecode
The following files exists in this folder. Click to view.
bacon-egg-pizza.php
cquiz.php
create-account.php
create-account111.php
create-quiz.php
create-quiz2.php
createaccount.php
delete-quiz.php
drop-rps-tables.php
legacy-code-rps.php
legacy-index.php
login.php
logincheck.php
newpassword-verify.php
newpassword.php
potential-code.txt
quiz-db-init.php
quizhub.php
quizhub2.php
results.php
rpsaccount-ajax-user-search.php
rpsaccount.php
rpsbetting-ajax-match-finder.php
rpsbetting.php
rpsbettingleaderboard.php
rpschangepassword.php
rpschangepassword.txt
rpsgame-ajax.php
rpsgame.php
rpsgameresults.php
rpshostnewgame.php
rpshub.php
rpsleaderboard.php
rpslib.php
rpslogin.php
rpsmaininclude.php
rpsproject/
rpsusersearch.php
table-init.php
verification.php
potential-code.txt
76 lines ASCII Windows (CRLF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
require('rpsmaininclude.php');
header('Content-Type: application/json');
$sql = "SELECT
m.matchid,
m.player1id,
m.player2id,
m.isactive,
u1.userid AS p1id,
u1.username AS player1name,
u2.userid AS p2id,
u2.username AS player2name
FROM matches AS m
INNER JOIN rpsusers AS u1 ON m.player1id = u1.userid
INNER JOIN rpsusers AS u2 ON m.player2id = u2.userid";
$stmt = $dbconn->prepare($sql);
$stmt->execute();
$matches = [];
while ($res = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ($res['player1id'] && $res['player2id'] && $res['isactive'] == 1) {
$matches[] = $res;
}
}
echo json_encode($matches);
html page below
<div id="betting-area"></div>
<script>
async function loadBettingMatches() {
try {
const response = await fetch('getmatchesbetting.php');
const matches = await response.json();
const container = document.getElementById('betting-area');
container.innerHTML = ""; // Clear previous content
matches.forEach(match => {
const form = document.createElement('form');
form.method = 'POST';
form.innerHTML = `
<strong>${match.player1name} vs ${match.player2name}</strong><br>
<label>
<input type="radio" name="chosenplayer" value="${match.player1id}">
${match.player1name}
</label><br>
<label>
<input type="radio" name="chosenplayer" value="${match.player2id}">
${match.player2name}
</label><br>
<input type="text" name="betamount" placeholder="Enter bet amount"><br>
<input type="hidden" name="matchid" value="${match.matchid}">
<button type="submit">Place Bet</button>
<hr>
`;
container.appendChild(form);
});
} catch (err) {
console.error("Error fetching matches:", err);
}
}
// Call it once, or use setInterval for updates
loadBettingMatches();
// Optional: update every 30 seconds
// setInterval(loadBettingMatches, 30000);
</script>