DcSelby
DcSelby is the boss.
- Jul 19, 2012
- 377
- 123
Hi there,
I was recently attempting to add a ban page to my hotel - rage-hotel.org and I'm struggling on how to do this. The coding I currently have for the ban page is below:
I do not take credit for this coding and also I'm aware the image is not currently working!
Do any of you have an idea of how I'm able to put this in working order?
Thank you,
DcSelby
I was recently attempting to add a ban page to my hotel - rage-hotel.org and I'm struggling on how to do this. The coding I currently have for the ban page is below:
Code:
<?php
/*=========================================================
| RevCMS Banning system
| #########################################################
| Banning system developed by Grapefruit
| www.otaku-studios.com
| #########################################################
| Uses Phoenix Emulator 3.0 database
| #########################################################
\=========================================================*/
?>
<body bgcolor="#000000"><table width="900" border="0" bgcolor="#FFFFFF" align="center" style="border-radius:10px; padding:15PX;">
<tr>
<td><font style="font-size:36px;
font-weight:500;
color:#F00;
text-align:center;" ><center><img src="http://www.google.co.uk/imgres?um=1&hl=en&sa=N&biw=1024&bih=667&tbm=isch&tbnid=ScnrH41g1G362M:&imgrefurl=http://thecollegedaily.com/blog/2012/01/02/big-corporate-episode-1/&docid=XmwM-sHSAbaT8M&imgurl=http://www.bolgernow.com/blog/wp-content/uploads/2010/05/old-lady-middle-finger.jpg&w=283&h=600&ei=PiYRUNyPHYiw0AWHmoDgDg&zoom=1&iact=hc&vpx=199&vpy=150&dur=638&hovh=327&hovw=154&tx=113&ty=212&sig=115171565853264601700&page=1&tbnh=147&tbnw=69&start=0&ndsp=19&ved=1t:429,r:1,s:0,i:79" width="300px;"><br />You're banned!<br /></center></font></td>
</tr>
<tr>
<td><center><?php
if($_SESSION['user']['id']){
$getuserinfo = mysql_query("SELECT * FROM users WHERE id='".$_SESSION['user']['id']."'");
while($row = mysql_fetch_array($getuserinfo)){
$usernameban = $row['username'];
}
$getuserinfo= mysql_query("SELECT * FROM bans WHERE value='{$usernameban}'");
while($row = mysql_fetch_array($getuserinfo)){
$username2 = $row['value'];
$bantype = $row['bantype'];
$reason = $row['reason'];
$expire = $row['expire'];
$addedby = $row['added_by'];
echo '<center>';
echo "Username: " . $username2;
echo '<br /><br />';
echo "Reason: " . $reason;
echo '<br /><br />';
echo "Type: " . $bantype;
echo '<br /><br />';
echo "Banned by: " . $addedby;
echo '<br /><br />';
$getuserinfo2= mysql_query("SELECT * FROM bans WHERE value='{$usernameban}'");
while($row = mysql_fetch_array($getuserinfo2)){
$expire = $row['expire'];
if($expire < time()){
header('Location: me');
}
else {
}
}
// Now we convert the Unix timestamp to a humanley readable time
$date = date("l d F Y H:i:s", $expire);
echo "Ban expires on: " . $date;
}
}
?></center></td>
</tr>
</table>
I do not take credit for this coding and also I'm aware the image is not currently working!
Do any of you have an idea of how I'm able to put this in working order?
Thank you,
DcSelby