Файл: inc/prov.php
Строк: 32
<?php
if(!empty($_COOKIE['user_login']) and !empty($_COOKIE['user_pass']) and !empty($_COOKIE['user_id'])) {
$proverka = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `login` = '".$_COOKIE['user_login']."' and `pass` = '".$_COOKIE['user_pass']."' and `id` = '".$_COOKIE['user_id']."'"), 0);
if($proverka == '0') {
header("Location: ./index.php");
exit;
} else {
$uinf = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$_COOKIE['user_id']."'"));
if($uinf['id_clan'] != '0')
{
$uclan = mysql_fetch_assoc(mysql_query("SELECT * FROM `clan` WHERE `id` = '".$uinf['id_clan']."'"));
$count_mc = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `id_clan` = '".$uclan['id']."'"), 0);
include_once('up_lvlclan.php');
} else {
$uclan = false;
}
mysql_query("UPDATE `users` SET `time` = '".time()."' WHERE `id` = '".$uinf['id']."'");
include_once('ban_user.php');
include_once('up_lvl.php');
}
} else {
header("Location: ./index.php");
exit;
} // проверка на авторизацию
?>