Просмотр файла ban.php

Размер файла: 991B
<?php
include 'sys/db.php';
include 'sys/conf.php';
include 'sys/start.php';
include 'sys/functions.php';
$config_title_name = "Бан пользователя";
include 'style/head.php';
if(isset($user['login'])){
echo "<div class=title>Бан пользователя</div>\n";
echo "<div class=content>\n";
if ($user[ban] > time()){
echo "Вас забанил: ".$user['ban_login']."<br>";
$sitetime = time()+(0*3600);
$time_ban = round($user[ban]-$sitetime);
echo "По причине: ".br($user['ban_reason'])." <br>\n";
echo "До окончания бана осталось  ".formattime($time_ban)." <br>";
}else{
mysql_query("UPDATE `users` SET `ban` = '' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `users` SET `ban_reason` = '' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `users` SET `ban_login` = '' WHERE `id` = '$user[id]'");
header ("Location: index.php?ban=1"); exit;
}


echo "</div>\n";
}else{ header ("Location: index.php"); exit;}
include 'style/foot.php';
?>