File size: 4.38Kb
<?
defined('PROTECTOR') or die('Error: restricted access');
if ($user_id=='1'){
if(empty($header)){
////////////////////////////////////////////////////////
$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;}}}
//////////////////////////
if($udata['ip']!==$_SERVER['REMOTE_ADDR'])
{
mysql_query("UPDATE `users` SET `ip` = '".$_SERVER['REMOTE_ADDR']."' WHERE `id` = '$udata[id]'") or die (mysql_error());
}
/////////////////////
$q = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$log' AND `read` = '1';");
$new_mail = mysql_result($q, 0);
if(isset($log)){
$time = time();
if($udata['podarok']<=$time)
{
include 'daypod.php';
}
}
echo'<div class="box_inter">
<div class="bgtop">
<div class="pan1">
<p style="margin: 2px;">';
if($set[vip]==on){echo'<img src="/techno/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/bazar.gif" alt=""/>'.$udata['money'].'
<img src="pic/main/fp.png" alt=""/>'.$set['arenainv'].'';
echo ' <a href="msg.php?"><img src="/techno/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($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><div class='log' align='center'>Вы участвуете в дуэли. Начало через $vrem</div>";
}
if($duel[status]=="begin" and $head!=="duel"){
echo"</div><div class='log' align='center'><a href=\"duel.php?\">« В перестрелку</a></div>";
}
}
if($inpk=='1' and $headmod != 'pk'){
echo'</div><div class="log" align="center">';
echo"<a href=\"/techno/pk.php?\">Тебя атакуют!</a>";
echo'</div>';
header("Location: pk.php");
}
$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>';}
@include('lvl.php');
echo'
<div class="pan2">
</div>
</div>
<div class="bgb"></div></a></div>';}
$set = mysql_fetch_array(mysql_query("SELECT * FROM `set` WHERE `usr` = '$log'"));
if(empty($set[name])){echo"<div class='menus'><font color='grey'>Примечание: У вас не заполнена анкета</br>
<a href=\"anketa.php?go=zap\">Заполнить</a></font></div>";}
echo "<div class='menu'>";
}else{
echo "<div class=\"nevbb\" align=center>Ошибка! Требуется <a href='index.php?vxod'>авторизация!</a>
<div>";
include('files/end.php');exit;}
?>