Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit cd8aa23

Browse files
committed
Updated scoreboard to show banned marker
1 parent cb458eb commit cd8aa23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scoreboard.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
</tr></thead>
2828
<tbody>
2929
<?php
30-
$query = "SELECT username FROM users WHERE username!='admin'";
30+
$query = "SELECT username, status FROM users WHERE username!='admin'";
3131
$result = mysql_query($query);
3232
while($row = mysql_fetch_array($result)) {
3333
$sql = "SELECT * FROM solve WHERE (status='2' AND username='".$row['username']."')";
3434
$res = mysql_query($sql);
35-
echo("<tr><td>".$row['username']."</td><td><span class=\"badge badge-success\">".mysql_num_rows($res));
35+
echo("<tr><td>".$row['username']." ");
36+
if($row['status'] == 0) echo("</a> <span class=\"label label-important\">Banned</span>");
37+
echo("</td><td><span class=\"badge badge-success\">".mysql_num_rows($res));
3638
$sql = "SELECT * FROM solve WHERE (status='1' AND username='".$row['username']."')";
3739
$res = mysql_query($sql);
3840
echo("</span></td><td><span class=\"badge badge-warning\">".mysql_num_rows($res)."</span></td></tr>");

0 commit comments

Comments
 (0)