Advertisement
Guest User

HonesT

a guest
Jul 24th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. if (isset($_COOKIE['unlogin']) and isset($_COOKIE['unpass']))
  2. {
  3.     $unlogin = msg($_COOKIE['unlogin'])
  4.     $unpass = msg($_COOKIE['uspass'])
  5.     $user = base('SELECT * FROM `users` WHERE `login` = '.ex($_GET['login'].' and `pass` = '.ex($_GET['pass'].' LIMIT 1')[0];
  6.  
  7.     if (isset($user['id']) && $user['login'] != $uslogin or $user['pass'] != $uspass)
  8.     {
  9.         setcookie('uslogin', '', TIME - 86400 * 31);
  10.         setcookie('uspass', '', TIME - 86400 * 31);
  11.     }
  12.  
  13.     $vremja = TIME - $user['viz'];
  14.     if ($vremja < 120)
  15.     {
  16.         $newtime = $user['login'] + $vremja;
  17.         base('UPDATE `users` SET `online` = "'.$newtime.'" WHERE `id` = "'.$user['id'].'"');
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement