- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
<?
$login= _string($_COOKIE['login']);
$password = _string($_COOKIE['password']);
if($login && $password) {
$q = mysql_query('SELECT * FROM `users` WHERE `login` = "'.$login.'" AND `password` = "'.$password.'"');
$user = mysql_fetch_array($q);
if(!$user) {
setCookie('login', '');
setCookie('password', '');
}
mysql_query('UPDATE `users` SET `online` = "'.time().'",
`ip` = "'.$_SERVER['REMOTE_ADDR'].'",
`ua` = "'.$_SERVER['HTTP_USER_AGENT'].'",
`self` = "'.$_SERVER['PHP_SELF'].'" WHERE `id` = "'.$user['id'].'"');
?>
<?
}
?>
someone 09.12.2015 10:11 # +1
Vocaloid_IA 09.12.2015 14:22 # 0
Vasiliy 09.12.2015 10:26 # 0
roman-kashitsyn 09.12.2015 11:03 # +5
Vasiliy 09.12.2015 11:33 # −2
bot 09.12.2015 12:25 # +2