I suppose =)
This is the page that shows all of the bans.
in teh query where it pulls data from gbans.. that is the name of the table I used for UBan.
<?php
$username = "YOUR USER NAME";
$password = "YOUR PASSWORD";
$database = "YOUR DATABASE BAME";
mysql_connect("YOUR DATABASE NAME",$username,$password);
@mysql_select_db($database) or die("Unable to select database.");
$result = mysql_query("SELECT * FROM gbans")
or die(mysql_error());
echo "<table class='bans'>";
echo "<tr> <th>Name</th> <th>SteamID</th> <th>Ban Lifted On</th></tr>";
while($row = mysql_fetch_array( $result )) {
echo "<tr><td>";
$var = $row['name'];
if(trim($var)=='<Unknown>' || trim($var)=='')
{
$nam = "<font color=#663333><i>Unknown</i></font>";
}
else
{
$nam = $var;
}
echo $nam;
echo "</td><td>";
$steamid = $row['steamid'];
$name2 = urlencode( $nam);
$com = $row['comment'];
if(trim($com)=='')
{
$com2 = "<font color=#663333><i>No Information Provided</i></font>";
}
else
{
$com2 = $com;
}
$comm = urlencode($com2);
$admin = $row['adminname'];
if(trim($admin)=='' || trim($admin)=='<Console>')
{
$admin3 = "Console";
}
else
{
$admin3 = $admin;
}
$admin2 = urlencode($admin3);
$time = $row['unban_time'];
if(trim($time)=='0000-00-00 00:00:00')
{
$ban = "Perma-Ban";
}
else
{
$time2 = urlencode($time);
$ban = $time2;
}
echo "<a href='#' onClick=window.open('baninfo.php?steamid=$steamid&comm=$comm&name2=$name2&admin2=$admin2&ban=$ban','popUpWindow','width=750,height=215,left=50,top=100,status=no,toolbar=no,location=no,menubar=no,titlebar=no');>$steamid</a>";
echo "</td><td>";
echo urldecode($ban);
echo "</td>";
}
echo "</table>";
?>
This is the code for the popup page.
<body>
<center><span class="style2">Ban Details</span></center><br />
<?php
$name = $HTTP_GET_VARS['name2'];
$steam = $HTTP_GET_VARS['steamid'];
$ban = $HTTP_GET_VARS['ban'];
$comm = $HTTP_GET_VARS['comm'];
$admin2 = $HTTP_GET_VARS['admin2'];
echo "<table align=center class='bans'>";
echo "<tr> <th>Name</th> <th>SteamID</th> <th>Ban Lifted On</th> <th>Comment</th> <th>Banning Admin</th></tr>";
echo "<tr><td>";
echo $name;
echo "</td><td>";
echo $steam;
echo "</td><td>";
echo $ban;
echo "</td><td>";
echo $comm;
echo "</td><td>";
echo $admin2;
echo "</td>";
echo "</table>";
?>
</body>
Edit: This code is unsupported... It works for us.. but none of this is for the light hearted or the ignorant (by ignorant I simply mean people who don't know...)