Kód: Vybrat vše
<?
header('Content-Type: text/html; charset=utf-8');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Banned Players of server</title>
</head>
<body>
<?php
// change these things
$server = "rocky.fakaheda.eu";
$dbuser = "gs_37156_1";
$dbpass = "HESLO";
$dbname = "gs_37156_1";
mysql_connect($server, $dbuser, $dbpass);
mysql_select_db($dbname);
$result = mysql_query("SELECT * FROM banlist ORDER BY time DESC");
echo "<table width=70% border=1 cellpadding=5 cellspacing=0>";
echo "<tr style=\"font-weight:bold\">
<td>nick</td>
<td>duvod</td>
<td>Admin/Mod</td>
<td>ban</td>
<td>unban</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['reason']."</td>";
echo "<td>".$row['admin']."</td>";
echo "<td>".date("d M, Y g:ia",$row['time'])."</td>";
if($row['temptime'] == "0"){
echo "<td>trvalý ban</td>";
}else{
echo "<td>".date("d M, Y g:ia",$row['temptime'])."</td>";
}
echo "</tr>";
}
echo"</table>"
?>