<?
header('Content-Type: text/html; charset=windows-1250');
?>
<html>
<head>
<title>Weltcraft.eu - Banlist </title>
</head>
<body>
<body style="background-color: black; background-image: url(images/bg.jpg); margin: 0 auto; background-position: center top;background-attachment: fixed">
<center><a href="http://weltcraft.eu/?page_id=334"><img src="images/header.png"></a>
<?php
// change these things
$server = "lima.fakaheda.eu";
$dbuser = "gs_27653_1";
$dbpass = "tajne :p";
$dbname = "gs_27653_1";
mysql_connect($server, $dbuser, $dbpass);
mysql_select_db($dbname);
$result = mysql_query("SELECT * FROM banlist ORDER BY id DESC");
//This will display the most recent by id edit this query how you see fit. Limit, Order, ect.
echo "<table width=65% border=1 cellpadding=3 cellspacing=0>";
echo "<tr style=\"font-weight:bold\">
<td>Typ banu</td>
<td>Jméno</td>
<td>Důvod</td>
<td>Admin/Mod</td>
<td>Čas banu</td>
<td>Čas unbanu</td>
</tr>";
while($row = mysql_fetch_assoc($result)){
if($col == "#eeeeee"){
$col = "#ffffff";
}else{
$col = "#eeeeee";
}
echo "<tr bgcolor=$col>";
if($row['type'] == "5"){
echo "<td>Ban</td>";
}else{
if($row['type'] == "0"){
echo "<td>Ban</td>";
}else{
if($row['type'] == "1"){
echo "<td>IP Ban</td>";
}else{
if($row['type'] == "9"){
echo "<td>Permanentí ban</td>";
}else{
echo "<td>Ban</td>";
}
}
}
}
echo "<td><b>".$row['name']."</td></b>";
echo "<td>".$row['reason']."</td>";
echo "<td>".$row['admin']."</td>";
//Convert Epoch Time to Standard format
$datetime = date("j/m/Y, H:i:s", $row['time']);
echo "<td>$datetime</td>";
$dateconvert = date("j/m/Y, H:i:s", $row['temptime']);
if($row['temptime'] == "0"){
echo "<td>Nikdy</td>";
}else{
echo "<td>$dateconvert</td>";
}
echo "</tr>";
}
echo"</table>"
?>
</div><br></br>
<font color="white"><i>Pro WeltCraft sestrojil Ollie987</i><br><b>(C) 2012 WeltCraft</b><br></br></font>
</body></html>