-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdisplay.php
42 lines (36 loc) · 920 Bytes
/
gdisplay.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
42
<html>
<head>
<link rel="stylesheet" type="text/css" href="./css/main.css">
</head>
<body>
<div class="options-title">List of Goal Scorers</div>
<table class="display-tables" border="1">
<tr class="h">
<th>Rank</th>
<th>Display Name</th>
<th>Player Name</th>
<th>Goals</th>
</tr>
<?php
$i = 1 ;
$conf = parse_ini_file("config.ini");
$con = mysqli_connect($conf['host'] , $conf['user'] , $conf['password'] , $conf['database']);
$count = 0;
$result = mysqli_query($con , "SELECT * FROM goals ORDER BY tgoals DESC");
while($row = mysqli_fetch_array($result))
{
$count++;
$rowmarker = (int)($count%2);
if($rowmarker == 0) $rowmarker = "even";
echo "<tr class='$rowmarker'>";
echo "<td>" . $i . "</td>";
echo "<td>" . $row['dname'] . "</td>";
echo "<td>" . $row['player'] . "</td>";
echo "<td>" . $row['tgoals'] . "</td>";
echo "</tr>";
$i++;
}
?>
</table>
</body>
</html>