-
Notifications
You must be signed in to change notification settings - Fork 0
/
participants.php
45 lines (37 loc) · 981 Bytes
/
participants.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
43
44
45
<?php session_start(); ?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="./css/main.css">
</head>
<body>
<div class="options-title">List of participants</div>
<table class="display-tables" border="1">
<tr class="h">
<th>Rank</th>
<th>Name</th>
<th>Display Name</th>
<th>Team</th>
<th>Group</th>
</tr>
<?php
$conf = parse_ini_file("config.ini");
$con = mysqli_connect($conf['host'] , $conf['user'] , $conf['password'] , $conf['database']);
$result = mysqli_query($con , "SELECT * FROM central ORDER BY rank");
$count = 0;
while($row = mysqli_fetch_array($result))
{
$count++;
$rowmarker = (int)($count%2);
if($rowmarker == 0) $rowmarker = "even";
echo "<tr class='$rowmarker'>";
echo "<td>" . $row['rank'] . "</td>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['dname'] . "</td>";
echo "<td>" . $row['team'] ."</td>";
echo "<td>" . $row['grp'] . "</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>