Файл: playtox.tk/files/zag.php
Строк: 93
<?
defined('PROTECTOR') or die('Error: restricted access');
if ($user_id=='1'){
if(empty($header)){
////////////////////////////////////////////////////////
echo'<div class="gameBorder">';
$t=time();
$req = mysql_query("SELECT * FROM `ban` WHERE `usr` = '$log' LIMIT 1");
// //////////////////////////
$avtob = mysql_num_rows($req);
if ($avtob == 1) {
$ban = mysql_fetch_array($req);
if($ban[ban_time]<$t){
mysql_query("DELETE FROM `ban` WHERE `usr` = '$log'");
}else{
if($ban[block]==1){
echo"$div Вашему персонажу заблокирован доступ на сайт!<br> Причина: <b>$ban[text]!</b><br> Осталось: ";
$ban[ban_time]=$ban[ban_time]-time();
if($ban[ban_time]<60){
echo "$ban[ban_time] сек.";
}elseif($ban[ban_time]>60 and $ban[ban_time]<3600){
$ban[ban_time]=round($ban[ban_time]/60);
echo "$ban[ban_time] мин.<br>";
echo "Забанил: $ban[admin]<br>";
}else{
$ban[ban_time]=round($ban[ban_time]/3600);
echo "$ban[ban_time] часов<br>";
echo "Забанил: $ban[admin]</br>";
}include('files/end.php');exit;}}}
//////////////////////////
/////////////////////
$q = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$log' AND `read` = '1';");
$new_mail = mysql_result($q, 0);
echo'</div><div class="heads">';
if($set[vip]==on){echo'<img src="pic/clan/18.gif" alt="*"/></a>';}
echo'
<img src="pic/hp.png" alt=""/>'.$udata['hp'].'
<img src="pic/mp.png" alt=""/>'.$udata['mp'].'
<img src="pic/main/red_warrior.png" alt=""/>'.$set['arenainv'].'';
echo ' <a href="msg.php?"><img src="/pic/main/pm.png" alt="*"/></a>';if($new_mail > 0){
echo"<a href="msg.php?mod=read"><font color='#71cc71'>+$new_mail</font></a>";}
/*
if (isset($_SESSION['msg'])){
echo "<div class='msg'>$_SESSION[msg]</div>";
$_SESSION['msg']=NULL;
}
if (isset($_SESSION['msg_err'])){
echo "<div class='msg_err'>$_SESSION[msg_err]</div>";
$_SESSION['msg']=NULL;
}
*/
/////////////////////////
$kvs=mysql_query("SELECT * FROM `kves` WHERE `us_id`='$udata[id]'");
$kv=mysql_fetch_assoc($kvs);
/////////////////////////
if($kv[zd1]=="used" AND $kv[zd1_p]<"5"){
$ukaz="<img src='pic/uk.png'>";}
if($kv[zd2]=="used" AND $kv[zd2_p]<"3"){
$ukaz1="<img src='pic/uk.png'>";}
if($kv[zd5]=="used" AND $kv[zd5_p]<"3"){
$ukaz5="<img src='pic/uk.png'>";}
////////////////////////
$exp=round((($udata[exp]-$ol)/($op-$ol))*100);
echo'<div style="background:#666666;height:1px;width:100%;padding:0;margin:6px 0;">
<div style="background:#FFDF8C; height:1px; width:'.$exp.'%;"></div>
</div>';
if($dueli==1){
$req = mysql_query("SELECT `duid` FROM `userduel` WHERE `usr` = '$log' LIMIT 1");
$duel = mysql_fetch_array($req);
$redu = mysql_query("SELECT * FROM `duel` WHERE `id` = '$duel[duid]' LIMIT 1");
$due = mysql_fetch_array($redu);
if($due[status]=="sob" and $due[time]<$t){
mysql_query("UPDATE `duel` SET `status` = 'begin' WHERE `usr` = '$log' and `id`='$due[id]'") or die (mysql_error());
}
$reduk = mysql_query("SELECT * FROM `duel` WHERE `id` = '$due[id]' LIMIT 1");
$duel = mysql_fetch_array($reduk);
$vremya1=$duel[time]-$t;
$vremy=floor($vremya1/60);
$vremya=$vremya1-($vremy*60);
if($vremya<10){$vremya="0$vremya";}
$vrem="$vremy:$vremya";
if($vremy<=-1){
$vrem="00:00";}
if($duel[status]=="sob"){
echo"<div class='log'>Вы участвуете в дуэли. начало через $vrem</div>";
}
if($duel[status]=="begin" and $head!=="duel"){
echo"<div class='log'><a href="duel.php?">« Вернуться в бой</a></div>";
}
}
$req = mysql_query("SELECT * FROM `item_aura` WHERE `usr` = '$log' and `status`='1'");
$avto=mysql_num_rows($req);
if($avto==1){
$aur = mysql_fetch_array($req);
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr`='$log'");
$avto=mysql_num_rows($req);
$aro = mysql_fetch_array($req);
echo'<div class="info">';
echo"<img src="pic/pers/aurs/$aur[ava]" width='15' height='15' alt="*" "/><b> $aur[name]</b> ";
$aro[actimer]=$aro[actimer]-time();
if($aro[actimer]<60){echo "осталось: $aro[actimer] сек.";}else{
$aro[actimer]=round($aro[actimer]/60);
echo "осталось: $aro[actimer] мин.";}
echo'</div>';
}
echo'</div><div class="f_bg"></a>';
$pri = mysql_query("SELECT * FROM `zametka` WHERE `id` = '1' and `status`='on'");
$prim = mysql_num_rows($pri);
$prime = mysql_fetch_array($pri);
if($prim > 0 and $set[prim]==on){
echo"<div class='zag'><a href="index.php?mod=prim"><font color='#ffc22b'><b> Объявление</b>
</font></a></div>";}
if($udata[podarok]=="no"){
echo"<div class='zag'><a href="podarok.php"><font color='#ffc22b'><b>Ежендевная награда</b>
</font></a></div>";}
}}else{
echo "<div class="f_bg">Ошибка!Вы не авторизованы!<br><a href='index.php?vxod'>Авторизуйтесь</a>
<div>";
include('files/end.php');exit;}
//echo"<div class='lin-no-b'></div>";
?>