\n";
echo "\t
$numbans IPs have been banned.
\n";
// Menu
echo "\t
\n";
echo "\t\t
\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t
\n";
echo "\t
\n";
switch ($page) {
default:
// Begin creating the first table of IPs that have been banned
// more than once.
echo "\t
\n";
echo "\t\t
\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t
\n";
// Print the data obtained from the MySQL database
// Print the first table
while($row = mysql_fetch_row($multiplebans)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
echo "\t
\n";
mysql_free_result($multiplebans);
// Use correct grammer
if ($currentlybanned != 1) {
$grammer = "IPs are";
} else {
$grammer = "IP is";
}
echo "\t
Currently $currentlybanned $grammer banned.
\n";
// Only print the second table if we have an IP
// currently banned.
if ($numbans > $numunbans) {
// Print the data obtained from the MySQL database
// Table title
echo "\t
Currently Banned
\n";
// Create the second table, of currently banned IPs
echo "\t
\n";
echo "\t\t
\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t
\n";
// Print out the second table
while($row = mysql_fetch_row($currentbans)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
echo "\t
\n";
mysql_free_result($currentbans);
}
// Print more HTML
echo "\t
Top 10 Countries
\n";
// Begin creating the second table of counrtys that have been banned
// more than once.
echo "\t
\n";
echo "\t\t
\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t
\n";
// Print the first table
while($row = mysql_fetch_row($countrybans)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
echo "\t
\n";
mysql_free_result($countrybans);
break;
case "allbans":
echo "\t
\n";
echo "\t\t
\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t\t\n";
echo "\t\t
\n";
switch ($orderby) {
default:
case "id":
while($row = mysql_fetch_row($allbans)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
case "ip":
while($row = mysql_fetch_row($allbans_ip)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
break;
case "date":
while($row = mysql_fetch_row($allbans_date)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
break;
case "time":
while($row = mysql_fetch_row($allbans_time)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
break;
case "country":
while($row = mysql_fetch_row($allbans_country)) {
echo "\t\t
\n";
foreach($row as $cell)
echo "\t\t\t
\n\t\t\t\t$cell\n\t\t\t
\n";
echo "\t\t
\n";
}
break;
}
echo "\t
\n";
break;
}
echo "
\n";
echo "\n";
echo "\n";
echo "\n";
?>