- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
$query = mysql_query("SELECT * FROM `accounts` WHERE `login` = '".@$_COOKIE['sc2tACC']."' LIMIT 1");
if ($query and @isset($_COOKIE['sc2tACC']) AND mysql_num_rows($query)) {
$auth = mysql_fetch_array($query);
if($auth['password'] == $_COOKIE['sc2tPASS'] and @isset($_COOKIE['sc2tPASS'])) {
$AS = "OK";
if($_SERVER['PHP_SELF'] != "/chat.php" and $auth['status'] != 1) {
mysql_query("UPDATE `accounts` SET `timestamp` = '".microtime(1)."', `ip` = '".$_SERVER['REMOTE_ADDR']."', `lastpage` = '".$_SERVER['REQUEST_URI']."' WHERE `id` = '".$auth['id']."' LIMIT 1;");
}
} else {
$loginError = "Неверный пароль";
}
} else {
$loginError = "Неверный логин";
}