include_once('config.php');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
if($_SERVER['HTTP_HOST'] != 'www.rpgtoplist.com')
{
header('location: http://www.rpgtoplist.com' . $_SERVER['PHP_SELF']);
}
$time = time();
if($_GET['email'])
{
$email = clean($_GET['email']);
}
elseif($_POST['email'])
{
$email = clean($_POST['email']);
}
if((!$_COOKIE['rpgtoplist']) && (!$_SESSION['rpgtoplist']) && ($email))
{
$var = 'Please enter your password again:
';
}
elseif(($_COOKIE['rpgtoplist'] && !$email) || ($_SESSION['rpgtoplist'] && !$email))
{
$var = 'Please enter your email again: ';}
elseif (($_COOKIE['rpgtoplist']) AND ($email))
{
$pass = clean($_COOKIE['rpgtoplist']);
$email = clean($email);
$rs = @mysql_query("SELECT * FROM `accounts` WHERE `email` = '$email' AND `passcheck` = '$pass'")
or die(mysql_error());
$info = @mysql_fetch_array($rs);
if ($info['ipcheck'] == 1 AND $info['userip'] != $ip)
{
header('Location: ' . $fullpath . 'error.php?email=' . $email . '&code=5');
exit();
}
/* else
{
$num = mysql_num_rows($rs);
if(!$email){$num=1;}
if ($num != 1)
{
header('Location: ' . $fullpath . 'error.php?email=' . $email . '&code=3');
exit();
}
}*/
$access = $info['access'];
}
elseif ($_SESSION['rpgtoplist'] AND $email)
{
$pass = clean($_SESSION['rpgtoplist']);
$email = clean($email);
$rs = @mysql_query("SELECT * FROM `accounts` WHERE `email` = '$email' AND `passcheck` = '$pass'")
or die(error(mysql_error()));
$info = @mysql_fetch_array($rs);
if ($info['ipcheck'] == 1 AND $info['userip'] != $ip)
{
header('Location: ' . $fullpath . 'error.php?email=' . $email . '&code=5');
exit();
}
/* else
{
$num = mysql_num_rows($rs);
if(!$email){$num=1;}
if ($num != 1)
{
header('Location: ' . $fullpath . 'error.php?email=' . $email . '&code=3');
exit();
}
}*/
}
$time = time();
?>
RPG Top List - echo $title ?>