Просмотр файла forum/includes/avt.php

Размер файла: 1.07Kb
<?php
##################################
#           avt.php              #
##################################
#   Форум на MySQL               #
#Афтар : Morgan                  #
#ICQ : 530-648                   #
#Email : [email protected]           #
##################################



if(!empty($_SESSION['avt_login']))
{
$l = $_SESSION['avt_login'];
$query = mysql_query("SELECT * FROM `users` WHERE `login`= '$l' LIMIT 1");
if(mysql_num_rows($query)!=0)
{
$user_inf = mysql_fetch_array($query);
if($_SESSION['login']==$user_inf['login'] and md5($_SESSION['pass'])==$user_inf['pass'])
 {
$status = 'logined';
}
}
}

if($status == 'logined')
{
if(mysql_num_rows(mysql_query('SELECT * FROM `ban_users` WHERE `id_user`='.$user_inf['id'].''))!=0)
 {
 if(!ereg('ban.php',basename($_SERVER['SCRIPT_NAME'])) and !ereg('exit.php',basename($_SERVER['SCRIPT_NAME'])))
 {
 header('Location:ban.php');
 exit;
  }

 }
}

##################################
#      © Все права защищены      #
##################################
?>