here is a nothere little mod
first make a file called common.php
and add
<?php
function checklogin()
{
session_start();
if(!isset($_SESSION['adminok']))
header("location: slogin.php");
}
?>
then make a file caled slogin.php
<?php
session_start();
include "sglobals.php";
global $db,$ir,$c,$h,$userid;
$msg = "";
if (isset($_POST['Submit']))
{
$password = $_POST['password'];
if($password == "test") /// change this to what u would like the password to be
{
$_SESSION['adminok'] = "ok";
$_SESSION['password'] = "password";
print"welcolm back {$ir['username']}!!!<META HTTP-EQUIV=Refresh CONTENT='2; URL=staff.php'>";
}
else
{
$db->query("UPDATE users SET staffincorrect=staffincorrect+1 WHERE userid=$userid");
stafflog_add("tryed admin loging page and failed");
$msg = "Password incorrect..
This is has been loged!! ";
}
}
?>
<?php echo $msg?>
<?php
print "
<form name='form1' method='post' action=''>
<p align='center'> Staff panel Login</font>
Please enter corrent password to login</p>
<table width='48%' border='1' align='center' cellpadding='1' cellspacing='1' >
<tr bgcolor='#CCCCCC'>
<td colspan='2'><font size='' face='Verdana, Arial, Helvetica, sans-serif'>[b]Login here[/b]</font></td>
</tr>
<tr>
<td><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Password</font></td>
<td><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>
<input name='password' type='password' id='password'>
</font></td>
</tr>
<tr>
<td> </td>
<td><input type='submit' name='Submit' value='Submit'></td>
</tr>
</table>
</form>";
?>
In all your staff files (staff.php staff_special.php etc.) find:
<?php (Thats the very first line of the file)
Add this above it:
<?php
include("common.php");
checklogin();
?>
then add
ALTER TABLE `users` ADD `staffincorrect` INT( 11 ) NOT NULL DEFAULT '0';
from there you can add in to your header if thay try so meny times it will ban them