<?php
require 'system/sid.php';
require 'system/config.php';
include 'system/user.php';
if (!empty($_SESSION['us']) or !empty($_COOKIE['us']))
{
mysql_query("UPDATE `users` SET `onl` = '' WHERE `id` = '" . $_SESSION['us'] . "' LIMIT 1");
setcookie('us', '');
setcookie('ps', '');
session_destroy();
header('Location: index.php');
die();
}
else
{
header('Location: index.php?');
die();
}
?>