Файл: zal.php
Строк: 30
<?php
require ('lib/core.php');
$title="$log: Тренировочный зал";
require ('theme/header.php');
require ('lib/zag.php');
if($user['level']>='21'){
header('Location: /city');
exit;
}
switch($sd){
default:
$q = mysql_query("SELECT * FROM `l2_all_mobs` WHERE `location`='0'");
While($w = mysql_fetch_assoc($q)){
$l4=$user['level']-4;
$l7=$user['level']-7;
$l9=$user['level']-9;
$ll4=$user['level']+4;
$ll7=$user['level']+7;
$ll9=$user['level']+9;
$l2=$user['level']-2;
$ll2=$user['level']+2;
if($w['level']>=$l9){$mc = "<font color=blue>";}
if($w['level']>=$l7){$mc = "<font color=#6666FF>";}
if($w['level']>=$l4){$mc = "<font color=#33CC33>";}
if($w['level']>=$l2 or $w['level']>=$ll2){$mc = "<font color=white>";}
if($w['level']>=$ll4){$mc = "<font color=yellow>";}
if($w['level']>=$ll7){$mc = "<font color=#CC6666>";}
if($w['level']>=$ll9){$mc = "<font color=red>";}
if($user['translate']=='0'){echo "$mc $w[lat]</font> ";}
if($user['translate']=='1'){echo "$mc $w[name]</font> ";}
$url_g = dsCrypt('mob'.$w['id']);
if($w['hp']>'0' and $w['user']=='0'){echo " <small>($w[level] ур. <font color=red>$w[hp]</font>/<font color=red>$w[hpall]</font>)</small><br><img src='/pic/Swords.png'> <a href='/url_hundler/mob/$url_g'>Атаковать</a>";}
if($w['hp']<='0' and $w['time']>'0'){echo "(<small><font color=grey>Воскреснет через: ".time_left($w['time']-time())."</font></small>)";}
$us = mysql_fetch_assoc(mysql_query("SELECT * FROM `l2_user` WHERE `id`='$w[user]'"));
if($w['user']!=='0'){echo "(<small><font color=#5F4C0B>В бою с <a href='/info/pers/$w[user]'>$us[login]</a></font></small>)";}
echo "<br>";
}
break;
}
require ('lib/down.php');
require ('theme/foot.php');
?>