<?php
include 'xcms_func.php';
include 'xcms_set.php';
if(isset($_COOKIE['login'], $_COOKIE['password'])){
$query=$db->query("select * from `user` where `login`='".protect($_COOKIE['login'])."' and `password`='".protect($_COOKIE['password'])."'")->fetch(PDO::FETCH_ASSOC);
if($query){
$user=$query;
$db->prepare("update `user` set `visit`='$time' where `id`='$user[id]'")->execute();
}else{$user=0;}
}else{$user = 0;}
?>