-
Notifications
You must be signed in to change notification settings - Fork 0
/
votes.php
41 lines (28 loc) · 928 Bytes
/
votes.php
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
<?
include("include.php");
#include("login.php");
#include("admin.php");
# if (!$isAdmin) die("Access Denied");
htmlStart();
$ses_life = strtotime("-7 days");
$db->query("
select playervote.playerid, player.score, count(userid) as c, sum(playervote.alignment * playervotecategory.alignment) as alignment, player.ename
from playervote, playervotecategory , player
where player.id = playervote.playerid
and playervote.playervotecategoryid = playervotecategory.id
group by playervote.playerid
order by alignment
");
echo '<table>';
echo "<tr><th>id<th>score<th>count<th>alignment<th>player";
while (($dat = $db->fetchObject())) {
echo "<tr>";
echo "<td>" . $dat->playerid;
echo "<td>" . $dat->score;
echo "<td>" . $dat->c;
echo "<td>" . $dat->alignment;
echo "<td><a href=\"playerdetails.php?id={$dat->playerid}\">{$dat->ename}</a>";
}
echo "</table>";
htmlStop();
?>