View file system/start.php

File size: 606B
<?php 
// by mides, 1xw.mobi

error_reporting(1);
$time = microtime(1);

if(isset($_COOKIE['login']) and isset($_COOKIE['password'])){
	$login = check($_COOKIE['login']);
	$password = check($_COOKIE['password']);
		
	$query = mysql_query("SELECT `id`, `user_login`, `user_password` FROM `users` WHERE `user_login` = '$login' and `user_password` = '$password' LIMIT 1");
	$user = mysql_fetch_assoc($query);
		
	if($user['user_login'] !== $login or $user['user_password'] !== $password){
		setcookie('login', '', time() - 86400*31);
		setcookie('password', '', time() - 86400*31);
	}
}

?>