View file exit.php

File size: 1.23Kb
<?
include_once "SYSTEM/include/functions.php";
include_once "SYSTEM/include/mysql.php";
include_once "SYSTEM/include/param.php";
include_once "SYSTEM/include/ban.php";
include_once "SYSTEM/include/sess.php";
include_once "SYSTEM/include/theme.php";
$title='Выход';
$mesto='Выход';
head();
echo "<div class=\"h\">Выход</div><hr />\n";
if (!isset($user))
{
echo "Вы не авторизованы<br/>\n";
echo "<a href=\"index.php\">На главную</a><br/>\n";
foot();
}
setcookie('nickname', '');
setcookie('password', '');

mysql_query("DELETE FROM `$mysql[pref]online` WHERE `sess` = '$sess';");
mysql_query("UPDATE `$mysql[pref]users` SET `sess` = '' WHERE `id` = '".$user['id']."';");
$time_site2=time()-$user['auttime'];
if($time_site2<79200){
$time_site=date("i:s", $time_site2);}else{
$time_site=date("H:i:s", $time_site2);}
echo "<span style=\"color:$color[msg]\"><b>";
echo "Надеемся, что вам понравилось на нашем сайте<br/>\n";
echo "Сессия $user[nickname] закрыта<br/>\n";
echo "Время, проведенное на сайте: $time_site<br/>\n";
echo "</b></span>";
echo "<a href=\"index.php\">На главную</a><br/>\n";
foot();
?>