Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //SQL
- $server = "IP";
- $dbuser = "username";
- $dbpass = "password";
- $dbname = "datbasename";
- mysql_connect($server, $dbuser, $dbpass);
- mysql_select_db($dbname);
- $result = mysql_query("SELECT * FROM bans ORDER BY time DESC");
- //adjust the table
- echo "<table width=70% border=1 cellpadding=5 cellspacing=0>";
- echo "<tr style=\"font-weight:bold\">
- <td>Player</td>
- <td>Banned By</td>
- <td>Reason</td>
- <td>Time of ban</td>
- <td>Time of unban</td>
- <td>Proof</td>
- </tr>";
- while($row = mysql_fetch_assoc($result)){
- if($col == "#eeeeee"){
- $col = "#ffffff";
- }else{
- $col = "#eeeeee";
- }
- echo "<tr bgcolor=$col>";
- echo "<td>".$row['name']."</td>";
- echo "<td>".$row['by']."</td>";
- echo "<td>".$row['reason']."</td>";
- echo "<td>".date("d M, Y g:ia",$row['time'])."</td>";
- if($row['temptime'] == "0"){
- echo "<td>∞</td>";
- }else{
- echo "<td>".date("d M, Y g:ia",$row['temptime'])."</td>";
- }
- //Some kind of input box?? (For the Proof)
- echo "</tr>";
- }
- echo"</table>"
- ?>
Add Comment
Please, Sign In to add comment