DcSelby
DcSelby is the boss.
- Jul 19, 2012
- 377
- 123
RevCMS already comes with ban pages, that are already in working order. They are terrible, yes, but here they are below:
IP BANNED:
I will update the thread with user ban - I can't currently find it at the moment.
It's look terrible, I know - but, it comes with all the working queries etc which is always a benefit to anyone starting up new RevCMS retros.
I find the ban page to be something that needs to be done, but not so much other things, so to have a template already is good for people who need to focus on the rest of there documents.
You may notice, with RevCMS when you ban someone they are directed to server error, so it's pretty simple what to do you.
You simply place this code at the top of all your documents just under <DOCTYPE HTML>.
This will then check to see if the user is banned and place the ban page in working order.
Any problems, contact myself.
If this helped you, give it a like!
IP BANNED:
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://1.bp.blogspot.com/_aumnicw4Bh8/TPSMGc3ou6I/AAAAAAAAAAY/x06yXqG22vE/s1600/fuck_off_finger1.jpg" 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)){
$ipban = $row['ip_last'];
}
$getuserinfo= mysql_query("SELECT * FROM bans WHERE value='{$ipban}'");
while($row = mysql_fetch_array($getuserinfo)){
$ip = $row['value'];
$bantype = $row['bantype'];
$reason = $row['reason'];
$expire = $row['expire'];
$addedby = $row['added_by'];
echo '<center>';
echo "IP: " . $ip;
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='{$ipban}'");
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(worry)", $expire);
echo "Ban expires on: " . $date;
}
}
?></center></td>
</tr>
</table>
I will update the thread with user ban - I can't currently find it at the moment.
It's look terrible, I know - but, it comes with all the working queries etc which is always a benefit to anyone starting up new RevCMS retros.
I find the ban page to be something that needs to be done, but not so much other things, so to have a template already is good for people who need to focus on the rest of there documents.
You may notice, with RevCMS when you ban someone they are directed to server error, so it's pretty simple what to do you.
You simply place this code at the top of all your documents just under <DOCTYPE HTML>.
Code:
<?php include_once('checktheban.php'); ?>
This will then check to see if the user is banned and place the ban page in working order.
Any problems, contact myself.
If this helped you, give it a like!