- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
// Проверка на взлом куков
$sql2 = mysql_query("SELECT * FROM `gl_users` WHERE username = '".$_COOKIE['username']."' ");
$row = mysql_fetch_assoc($sql2);
if($_COOKIE['password'] != $row['password'] OR (isset($_COOKIE['member_id']) AND !preg_match('/^[0-9]+$/', $_COOKIE['member_id']))) {
setcookie('logined','0',time() +3600*24*30);
setcookie('member_id','',time() +3600*24*30);
setcookie('username','',time() +3600*24*30);
setcookie('password','',time() +3600*24*30);
header('Location: ?');
die();
}