Web banlist UNban
Napsal: 20 kvě 2012, 21:34
Chtěl bych optat nešly by něak nastavit když někomu vyprší ban aby to nepsalo Unban nick Untempbanned: null server
Kód: Vybrat vše
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ultra Banlist</title>
</head>
<body style="background: url('http://www.netfire.cz/wp-content/uploads/minecraft-wallpaper-15.jpg') repeat center top">
<h1>Ultra Banlist</h1>
<?php
// change these things
$server = "zulu.fakaheda.eu";
$dbuser = "gs_37357_1";
$dbpass = "*******";
$dbname = "gs_37357_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=100% border=1 cellpadding=3 cellspacing=0>";
echo "<tr style=\"font-weight:bold; color:red;\">
<td>Typ trestu</td>
<td>Nick hrace</td>
<td>Duvod</td>
<td>Admin</td>
<td>Cas udeleni trestu</td>
<td>Cas vyprseni trestu</td>
<td>id</td>
</tr>";
while($row = mysql_fetch_assoc($result)){
if($row['type'] == "3" || $row['type'] == "2" || $row['type'] == "4" || $row['type'] == "6" || $row['type'] == "9"){
}else{
if($col == "#eeeeee"){
$col = "#ffffff";
}else{
$col = "#eeeeee";
}
echo "<tr bgcolor=$col>";
if($row['type'] == "5"){
echo "<td>Unban</td>";
}else{
if($row['type'] == "3"){
echo "<td>Kick</td>";
}else{
if($row['type'] == "2"){
echo "<td>Warn</td>";
}else{
if($row['type'] == "0"){
echo "<td>Ban</td>";
}else{
if($row['type'] == "1"){
echo "<td>IPBan</td>";
}else{
if($row['type'] == "4"){
echo "<td>Fine</td>";
}else{
if($row['type'] == "6"){
echo "<td>Jailed</td>";
}else{
if($row['type'] == "9"){
echo "<td>Perma</td>";
}else{
echo "<td>Unknown</td>";
//Holy Epic If Statement Batman!
}
}
}
}
}
}
}
}
echo "<td>".$row['name']."</td>";
echo "<td>".$row['reason']."</td>";
echo "<td>".$row['admin']."</td>";
//Convert Epoch Time to Standard format
$datetime = date("d. m. Y H:i", $row['time']);
echo "<td>$datetime</td>";
$dateconvert = date("d. m. Y H:i", $row['temptime']);
if($row['temptime'] == "0"){
echo "<td>None</td>";
}else{
echo "<td>$dateconvert</td>";
}
echo "<td>".$row['id']."</td>";
echo "</tr>";
}
}
echo"</table>"
?>
</div>
Databáze Banů pro server MyCrafting
</body></html>