Файл: sumerki.mobi/sumerki.mobi/term.php
Строк: 82
<?
//////////////////////////////////////////////////////////////
//////////////////////Онлайн игра "Сумерки"///////////////////
//////////////////////Основатель: Mc Laren////////////////////
///////////////////Контакты: ICQ - 597687549//////////////////
/////////////////////Пример: Sumerki.Mobi/////////////////////
///////////Если ты это читаешь, значит скрипт слили :D////////
//////////////////////////////////////////////////////////////
define('PROTECTOR', 1);
$headmod = 'zona';//фикс. места
$textl='Доска позора';
include('files/path.php');
include('files/gzips.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
switch($_GET[mod]){
default:
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Доска позора';
echo '</div><div class="clearFix"></div></div></div></div>';
$time=time();
if ($_GET[page] == "" || $_GET[page] < 0 || $_GET[page] == "0")
{
$_GET[page] = 0;
}
$next = $_GET[page] + 1;
$back = $_GET[page] - 1;
$num = $_GET[page] * 10;
if($_GET[page] == "0")
{$i = 1;}
else{$i = ($_GET[page]*10)+1;}
$viso = mysql_num_rows(mysql_query("SELECT usr FROM ban"));
$puslap = floor($viso/10);
$times = date("H:i");
$req = mysql_query("SELECT * FROM `ban` WHERE `ban_time`>'$time' ORDER BY id DESC LIMIT $num,10");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
echo '<div class="fon bg"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"<a href="search.php?nick=$mag[usr]&go=go">$mag[usr]</a><br><a href="term.php?mod=1&id=$mag[id]">Подробнее...</a>";
echo '</div></div></div></div></div></div></div></div></div>';
}
if ($_GET[page] > 0)
{
echo "<h1><a href="term.php?page=$back"><img src='pic/ico/left_ico.png'/></a>";
}
elseif ($_GET[page] == 0)
{
echo "<h1><img src='pic/ico/left_ico.png'/>";
}
echo" ";
if($_GET[page] < $puslap || $_GET[page] == "" || $_GET[page] == 0)
{echo "<a href="term.php?page=$next"><img src='pic/ico/right_ico.png'/></a></h1>";}
else
{echo "<img src='pic/ico/right_ico.png'/></h1>";}
}else{
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"На доске позора пока пусто!";
echo '</div></div></div></div></div></div></div></div></div>';
}
break;
case '1':
if(empty($_GET[id])){
echo '<div class="fon bg"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"Нет такого позорника!";
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
$req = mysql_query("SELECT * FROM `ban` WHERE `id` = '".mysql_real_escape_string($_GET['id'])."' LIMIT 1");
// //////////////////////////
$avto = mysql_num_rows($req);
if ($avto == 1) {
$ban = mysql_fetch_array($req);
if($ban[ban_time]<$t){
mysql_query("DELETE FROM `ban` WHERE `usr` = '$log'");
}else{
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo ''.$ban[usr].'';
echo '</div><div class="clearFix"></div></div></div></div>';
echo '<div class="fon bg"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"<font color='lime'>$ban[usr]</font> находится в тюрьме <br>
<b>Причина:</b> $ban[text]!<br> <b>Осталось:</b> ";
$ban[ban_time]=$ban[ban_time]-time();
if($ban[ban_time]<60){
echo "$ban[ban_time] сек.<br/>";
echo '</div></div></div></div></div></div></div></div></div>';
}elseif($ban[ban_time]>60 and $ban[ban_time]<3600){
$ban[ban_time]=round($ban[ban_time]/60);
echo "$ban[ban_time] мин.<br/>";
echo '</div></div></div></div></div></div></div></div></div>';
}else{
$ban[ban_time]=round($ban[ban_time]/3600);
echo "$ban[ban_time] часов</font><br/>";
echo '</div></div></div></div></div></div></div></div></div>';
}
}
}else{
echo '<div class="fon bg"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"Нет такого позорника!";
echo '</div></div></div></div></div></div></div></div></div>';
}
break;
}
include($path.'files/down.php');
include($path.'files/meny.php');
?>