unnaname
Главные администраторы
Загрузка...
Загрузка...
Загрузка...
Наше сообщество
$server="localhost"; $username="admin_jail"; $password="6T3s4C2y"; $database="admin_jail"; $table_prefix=""; $results_per_page="15"; function show_ctban_table($dbh, $query, $results_per_page, $ctbanpage) { $results = mysql_query($query) or die("Unable to execute query"); if (!empty($results)) { $countquery = mysql_fetch_array($results); $rows = $countquery[0]; $lastpage = ceil($rows/$results_per_page); if ($ctbanpage < 1) { $ctbanpage = 1; } elseif ($ctbanpage > $lastpage) { $ctbanpage = $lastpage; } echo "

"; echo "Page " . strval($ctbanpage) . " of " . $lastpage; echo "
"; if ($ctbanpage != 1) { echo " <<-First "; echo " "; $previouspage = $ctbanpage - 1; echo " <-Previous "; } if ($ctbanpage != $lastpage) { if ($ctbanpage != 1) { echo " | "; } $nextpage = $ctbanpage + 1; echo " Next -> "; echo " "; echo " Last ->> "; } echo "

"; $paginated_query = "SELECT * FROM " . $table_prefix . "CTBan_Log ORDER BY TIMESTAMP DESC LIMIT " .($ctbanpage - 1) * $results_per_page . "," . $results_per_page; $results = mysql_query($paginated_query) or die ("Unable to execute paginated query"); print '' . "\n"; print "" . "\n"; $counter = 0; while ($row = mysql_fetch_array($results)) { $counter = $counter + 1; if ($counter % 2) $classtext = "e"; else $classtext = "v"; $unbanme = ""; if ($row["bantime"] > 0) { $bantime = $row["bantime"] . "m"; if ($row["timeleft"] >= 0) { $timeleft = $row["timeleft"] . "m"; } else $timeleft = "Expired"; } else { $bantime = "Permanent"; if ($row["timeleft"] >= 0) { $timeleft = "Indefinite"; } else $timeleft = "Unbanned"; } print "" . "\n"; } print "
Perp SteamIDPerp NameTime BannedDurationAdmin NameReasonTime Remaining
" . $row["perp_steamid"] . "" . $row["perp_name"] . "" . date('r', $row["timestamp"]) . "" . $bantime . "" . $row["admin_name"] . "" . $row["reason"] . "" . $timeleft . "
\n"; echo "Total CT Ban Records: " . $rows; } else { print "No results\n"; } } try { $dbh = mysql_connect($server,$username,$password); if (!$dbh) { print "Unable to connect to database server with specified parameters\n"; } else { @mysql_select_db($database, $dbh) or die("Unable to select specified database"); $query = "SELECT COUNT(*) FROM " . $table_prefix . "CTBan_Log"; if (empty($_GET['ctbanpage'])) { $ctbanpage = 1; } else { $ctbanpage = $_GET['ctbanpage']; } show_ctban_table($dbh, $query, $results_per_page, $ctbanpage); } } catch (Exception $e) { die($e); } mysql_close($dbh); ?>



Яндекс.Метрика