Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $server = "localhost";
- $dbuser = "root";
- $dbpass = "";
- $dbname = "bandb";
- mysql_connect($server, $dbuser, $dbpass);
- mysql_select_db($dbname);
- $result = mysql_query("SELECT * FROM sandkassinn_bans ORDER BY id");
- $rows = mysql_num_rows($result);
- ?>
- <!DOCTYPE html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css" href="style.css"/>
- <title>MultiCraft.Minecraft.Is</title>
- </head>
- <body>
- <div id="page">
- <div id="header">
- <ul>
- <li><a href="/index.html">Heim</a></li>
- <li><a href="/bannlistinn.php">Bannlistinn</a></li>
- <?
- echo "$rows eru bannaðir frá servernum!";
- ?>
- </ul>
- </div>
- </div>
- </body>
- <?php
- mysql_connect($server, $dbuser, $dbpass);
- mysql_select_db($dbname);
- $result = mysql_query("SELECT * FROM sandkassinn_bans ORDER BY id");
- echo "<table width=70% border=2 cellpadding=7 cellspacing=7>";
- echo "<tr style=\"font-weight:bold\">
- <td>Spilari</td>
- <td>Ástæða</td>
- <td>Admin</td>
- <td>Tegund</td>
- <td>Lok bans</td>
- </tr>";
- while($row = mysql_fetch_assoc($result)){
- $type = $row['type'];
- if ($type == "tempban")
- {
- $tegund = 'Tímabundið';
- }
- elseif ($type == "permaban")
- {
- $tegund = 'Óendanlegt';
- }
- $time1 = $row['date_expire'];
- $time2 = time();
- $username = $row['banned'];
- if ($time1 < $time2)
- {
- $query2 = "DELETE FROM sandkassinn_bans WHERE banned = '$username'";
- $perform = mysql_query($query2);
- $perform = true;
- }
- echo '<tr bgcolor=$col>';
- $timeexecuted = $row['date_expire'];
- $time_done = date("d-m-Y H:i", $timeexecuted);
- echo "<td><font color='#A00000'>".$row['banned']."</td></font>";
- echo "<td><font color='#A00000'>".$row['reason']."</td></font>";
- echo "<td><font color='#A00000'>".$row['executor']."</td></font>";
- echo "<td><font color='#A00000'>".$tegund."</td></font>";
- echo "<td><font color='#A00000'>".$time_done."</td></font>";
- }
- ?>
Add Comment
Please, Sign In to add comment