Braincms Not displaying banned page

kiee

New Member
Jun 22, 2016
23
2
check ban

<?php
// Not related to banning, but improves security, and it needs to be at the top of the page, I could have made a new include but that would have taken so much more work -TJ <3
$userMaster = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".$_SESSION['user']['id']."'"));

/*=========================================================
| RevCMS Banning system
| #########################################################
| Banning system developed by Grapefruit
|
| #########################################################
| Uses Phoenix Emulator 3.0 database
| #########################################################
\=========================================================*/


if($_SESSION['user']['id']){


$getuserinfo = mysql_query("SELECT * FROM users WHERE id='".$_SESSION['user']['id']."'");
while($row = mysql_fetch_array($getuserinfo)){

$usernameban = $row['username'];

$ipban = $row['ip_last'];


}



$getuserinfo= mysql_query("SELECT * FROM bans WHERE value='{$usernameban}' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");

$getuserinfoip= mysql_query("SELECT * FROM bans WHERE value='{$ipban}' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");



while($row = mysql_fetch_array($getuserinfo)){


$expire = $row['expire'];


if($expire <= time()){

}
else{
header('Location:
exit;
}
}

while($row = mysql_fetch_array($getuserinfoip)){


$expire = $row['expire'];



if($expire <= time()){

}
else{
header('Location:
exit;
}
}
}


?>
Post automatically merged:

header.php

<?php require_once ('templates/weed/includes/checktheban.php'); ?>
<html lang="en">
<head>

<link rel="stylesheet" href="/templates/weed/materialize/css/materialize.css" type="text/css">
<link rel="stylesheet" href="/templates/weed/css/style.css" type="text/css">
<link href=" " rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="//code.jquery.com/jquery-2.2.2.js"></script>
<script src=" "></script>
<script type="text/javascript">
$(document).ready(function(e) {
$.ajaxSetup({
cache:true
});
setInterval(function() {
$('#onlinecount').load('/onlinecount');
}, 1500);
$( "#onlinecount").click(function() {
$('#onlinecount').load('/onlinecount');
});
});
</script>
</head>

<body style="background: linear-gradient(#4ea0f3, #ffffff); background-repeat: no-repeat; background-attachment: fixed; ">
<div class="cloud x1"></div><div class="cloud x2"></div><div class="cloud x3"></div><div class="cloud x4"></div><div class="cloud x5"></div>
<div class="container" style="width: 950px;">
<div class="hotelheader"></div>
<a href="/" class="logo"></a>
<a style="margin-top: -140px; font-size: 25px; height: 76px; line-height:76px; float:right; font-family: 'Roboto Condensed',sans-serif!important;" target="_blank" href="/client" class="btn">Enter Hablex</a>

<!-- NAV -->
<nav style="background: #fff; border-radius: 4px; box-shadow: 0px 1px 5px 0.1px #5e5858;">
<div class="nav-wrapper">
<ul class="left hide-on-med-and-down">
<li><a class="dropdown-button" href="#!" data-activates="dropdown1"><i class="fa fa-home" aria-hidden="true"></i>&nbsp;<?= User::userData('username') ?></a></li>
<ul style="border-radius: 4px; width: auto !important; text-align: center;" id="dropdown1" class="dropdown-content">
<li><a href="/"><i style="margin-right: 15px;" class="fa fa-home" aria-hidden="true"></i><?= user::userData('username') ?></a></li>
<li><a href="/settingshotel"><i style="margin-right: 20px; margin-left: -5px; font-size: 16px;" class="fa fa-cog fa-spin fa-3x fa-fw" aria-hidden="true"></i>Settings</a></li>
<li><a href="/home/<?= user::userData('username') ?>"><i style="margin-right: 15px;" class="fa fa-user" aria-hidden="true"></i>My Profile</a></li>
<li><a href="/log"><i style="margin-right: 15px;" class="fa fa-history" aria-hidden="true"></i>Sessions</a></li>
<li><a href="/uitloggen"><i style="margin-right: 15px;" class="fa fa-sign-out" aria-hidden="true"></i>Logout</a></li>
</ul>
<li><a class="dropdown-button" href="#!" data-activates="dropdown2"><i class="fa fa-users" aria-hidden="true"></i>&nbsp;Community</a></li>
<ul style="border-radius: 4px; width: auto !important" id="dropdown2" class="dropdown-content">
<li><a href="/community"><i style="margin-right: 15px;" class="fa fa-users" aria-hidden="true"></i>Community</a></li>
<li><a href="/news"><i style="margin-right: 15px;" class="fa fa-newspaper-o" aria-hidden="true"></i>News</a></li>
<li><a href="#"><i style="margin-right: 15px;" class="fa fa-users" aria-hidden="true"></i>Statistics</a></li>
<li><a href="#"><i style="margin-right: 15px;" class="fa fa-users" aria-hidden="true"></i>LeaderBoards</a></li>
</ul>
<li><a class="dropdown-button" href="#!" data-activates="dropdown3"><i class="fa fa-users" aria-hidden="true"></i>&nbsp;Forums</a></li>
<ul style="border-radius: 4px; width: auto !important" id="dropdown3" class="dropdown-content">
<li><a href=" "><i style="margin-right: 15px;" class="fa fa-users" aria-hidden="true"></i>Login</a></li>
<li><a href=" "><i style="margin-right: 15px;" class="fa fa-newspaper-o" aria-hidden="true"></i>Register</a></li>
</ul>
<li><a class="dropdown-button" href="staff" data-activates="dropdown4"><i class="fa fa-shield" aria-hidden="true"></i>&nbsp;STAFF</a></li>

</ul>
</ul>
<ul class="right hide-on-med-and-down">
<div style="font-family: 'Roboto Condensed',sans-serif!important; color: #555; font-size: 21px; float:left;" id="onlinecount"><?= Game::usersOnline() ?> ONLINE</div>
<a data-activates="dropdown4" class="dropdown-button" style="float:right;height: 60px; width: 60px; background:url( <?= User::userData('look') ?>&action=std&gesture=std&direction=2&head_direction=4&size=n&headonly=1&img_format=png);"></a>
<ul style="border-radius: 4px; width: auto !important; margin-left: -120px;" id="dropdown4" class="dropdown-content">
<?php if (User::userData('rank') > '5') { echo'<li><a href="/adminpan/dash"><i style="margin-right: 15px;" class="fa fa-cog" aria-hidden="true"></i>Housekeeping</a></li>'; } ?>
</ul>
</ul>
</div>
</nav>

<!-- END HEADER -->
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,954
Because the code you're using is for a Phoenix database from RevCMS most likely ;)

Doesn't BrainCMS have their own system built in?

(I've never used BrainCMS, so I have no idea).
 

Users who are viewing this thread

Top