Файл: okr.php
Строк: 305
<?
define('PROTECTOR', 1);
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
$textl='Окрестности';
include($path.'files/core.php');
if(isset($_GET['oz']))
{
$_GET['oz']=mysql_real_escape_string($_GET['oz']);
if($_GET['oz']>0 and $_GET['oz']<5)
{
mysql_query("DELETE FROM `okr_usrs` WHERE `usr`='".$udata['id']."'");
mysql_query("UPDATE `users` SET `okr`='".$_GET['oz']."', `ok_x`='1', `ok_y`='1' WHERE `id`='".$udata['id']."'");
$tt=time()+300;
mysql_query("INSERT INTO `okr_usrs` SET `id`='', `usr`='".$udata['id']."', `okr`='".$_GET['oz']."', `time`='".$tt."'");
header('location: ?ou='.$_GET['oz'].'');exit;
}
}
$ou=mysql_real_escape_string($_GET['ou']);
$num=mysql_num_rows(mysql_query("SELECT * FROM `okr_usrs` WHERE `usr`='".$udata['id']."'"));
if($num==0){$ou=false;}
$or=mysql_fetch_array(mysql_query("SELECT * FROM `okr_usrs` WHERE `usr`='".$udata['id']."'"));
if(isset($_GET['step']))
{
$x_m=$udata['ok_x']-1;
$x_mx=$udata['ok_x']+1;
$y_m=$udata['ok_y']-1;
$y_mx=$udata['ok_y']+1;
$ok_t=time()+3;
$_GET['step']=htmlspecialchars($_GET['step']);
if($udata['ok_t']<=time())
{
if($_GET['step']=='right')
{
if($x_mx<8){
mysql_query("UPDATE `users` SET `ok_x`='".$x_mx."', `ok_t`='".$ok_t."' WHERE `id`='".$udata['id']."'");
}
}
if($_GET['step']=='left')
{
if($x_m>0){
mysql_query("UPDATE `users` SET `ok_x`='".$x_m."', `ok_t`='".$ok_t."' WHERE `id`='".$udata['id']."'");
}
}
if($_GET['step']=='up')
{
if($y_m>0){
mysql_query("UPDATE `users` SET `ok_y`='".$y_m."', `ok_t`='".$ok_t."' WHERE `id`='".$udata['id']."'");
}
}
if($_GET['step']=='down')
{
if($y_mx<8){
mysql_query("UPDATE `users` SET `ok_y`='".$y_mx."', `ok_t`='".$ok_t."' WHERE `id`='".$udata['id']."'");
}
}
}
else
{
mysql_query("INSERT INTO `user_log` SET
`usr`='".$udata['id']."',
`text`='Вы не можете передвигаться быстрее'
");
}
header('location: '.$_SERVER['HTTP_REFERER'].'');exit;
}
if(isset($_GET['say']))
{
$text=htmlspecialchars($_POST['text']);
if($text!='')
{
mysql_query("INSERT INTO `okr_chat` SET
`id`='',
`usr`='".$udata['id']."',
`text`='".$text."',
`time`='".time()."',
`okr`='".$udata['okr']."'
");
}
header('location: '.$_SERVER['HTTP_REFERER'].'');exit;
}
if(isset($_GET['ataka']))
{
$mob=mysql_real_escape_string($_GET['ataka']);
$mobs=mysql_num_rows(mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$udata['okr']."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."' and `id`='".$mob."'"));
if($mobs!=0 and $or['enemy']==0)
{
$min_hp=$st['hp_max']*0.05;
if($st['hp']<$min_hp)
{
mysql_query("INSERT INTO `user_log` SET
`usr`='".$udata['id']."',
`text`='Вы ранены. Минимальное здоровье для атаки: <font color=#ff2222>".round($min_hp)."</font>'
");
}
else
{
$mbs=mysql_fetch_array(mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$udata['okr']."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."' and `id`='".$mob."'"));
mysql_query("UPDATE `okr_usrs` SET `enemy`='".$mbs['id']."', `att`='' WHERE `id`='".$or['id']."'");
mysql_query("UPDATE `users_stats` SET `hp_regen_activ`='0' WHERE `usr`='".$udata['id']."'");
}
}
header('location: '.$_SERVER['HTTP_REFERER'].'');exit;
}
////Атака Мобов////
///////////////////
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$or['okr']."' and `time`<='".time()."' and `sfer_5_time`<'".time()."'");
while($mv=mysql_fetch_array($mobas))
{
$enm=mysql_query("SELECT * FROM `okr_usrs` WHERE `enemy`='".$mv['id']."'");
$nev=mysql_num_rows($enm);
if($nev!=0)
{
if($nev>1){$nev=rand(1,$nev);}
else{$nev=$nev;}
$nev=$nev-1;
$emm=mysql_fetch_array(mysql_query("SELECT * FROM `okr_usrs` WHERE `enemy`='".$mv['id']."' LIMIT ".$nev.",1"));
$us=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$emm['usr']."'"));
$ust=mysql_fetch_array(mysql_query("SELECT * FROM `users_stats` WHERE `usr`='".$us['id']."'"));
$ptr=mysql_query("SELECT * FROM `pit` WHERE `usr`='".$emm['usr']."' and `status`='1' and `hp_st`>'0'");
$npit=mysql_num_rows($ptr);
if($npit!=0){$fpit=mysql_fetch_array($ptr);$eb=rand(1,2);}else{$eb=1;}
$m_sila=$mv['sila'];
$m_sila_fire=$mv['sila_fire'];
$m_sila_water=$mv['sila_water'];
$m_sila_air=$mv['sila_air'];
$m_sila_ground=$mv['sila_ground'];
if($mv['sfer_11_time']>=time())//ослабление
{$m_sila=round($m_sila-$m_sila/100*$mv['sfer_11_ef']);}
if($emm['sfer_6_time']>=time())//оборона
{$m_sila=round($m_sila-$m_sila/100*$emm['sfer_6_ef']);
}
$m_sila=round($m_sila);
$mohp=$mv['hp'];
if($eb==1){
$ehp=$ust['hp'];
$arm=$emm['arm'];
$arm_fire=$emm['arm_fire'];
$arm_water=$emm['arm_water'];
$arm_air=$emm['arm_air'];
$arm_ground=$emm['arm_ground'];
$blok=$ust['blok']*10;
}
elseif($eb==2){
$ehp=$fpit['hp_st'];
$arm=$fpit['arm'];
$arm_fire=0;
$arm_water=0;
$arm_air=0;
$arm_ground=0;
$blok=0;
}
$dmg=$m_sila-$arm;
if($dmg<$mv['sila']*0.1){$dmg=$mv['sila']*0.1;}
if($dmg<1){$dmg=1;}
$dmg=round($dmg);
$ydar_f=$m_sila_fire-$arm_fire;
if($ydar_f<0){$ydar_f=0;}
$ydar_w=$m_sila_water-$arm_water;
if($ydar_w<0){$ydar_w=0;}
$ydar_a=$m_sila_air-$arm_air;
if($ydar_a<0){$ydar_a=0;}
$ydar_g=$m_sila_ground-$arm_ground;
if($ydar_g<0){$ydar_g=0;}
if($ydar_f>0){$yf='<font color=#c70000>-'.$ydar_f.'</font>';}else{$yf='';}
if($ydar_w>0){$yw='<font color=#0084f0>-'.$ydar_w.'</font>';}else{$yw='';}
if($ydar_a>0){$ya='<font color=#999999>-'.$ydar_a.'</font>';}else{$ya='';}
if($ydar_g>0){$yg='<font color=#ab7d5c>-'.$ydar_g.'</font>';}else{$yg='';}
$bl=rand(1,1000);
if($blok>=$bl)
{
$att='Блок';
}
else
{
if($emm['mag_ney_time']>time() and $eb==2)
{
$att='Питомец увернулся';
}
else
{
$ep=$ehp-$dmg-$ydar_f-$ydar_w-$ydar_a-$ydar_g;
if($ep<=0)
{
$ep=0;
if($eb==2)
{
$att='Питомец убит';
}
else
{
if($mv['rang']=='D'){$c='#999999';}
elseif($mv['rang']=='C'){$c='#00cc00';}
elseif($mv['rang']=='B'){$c='#0000cc';}
elseif($mv['rang']=='A'){$c='#cc00cc';}
elseif($mv['rang']=='S'){$c='#ff9900';}
elseif($mv['rang']=='SS'){$c='#ff2222';}
mysql_query("INSERT INTO `user_log` SET
`usr`='".$udata['id']."',
`text`='<font color=".$c.">".$mv['name']."</font> убил вас'
");
mysql_query("UPDATE `okr_usrs` SET `enemy`='0', `att`='' WHERE `id`='".$emm['id']."'");
}
}
else
{
if($eb==2)
{
$att='Питомец - '.$dmg.' '.$yf.' '.$yw.' '.$ya.' '.$yg.'';
}
else
{
$att='Вы - '.$dmg.' '.$yf.' '.$yw.' '.$ya.' '.$yg.'';
if($emm['sfer_10_time']>time())
{
$plam=round($dmg/100*$emm['sfer_10_ef']);
if($plam<1){$plam=1;}
$att=$att.'(<font color=#00ff00>ОЖОГ - '.$plam.'</font>)';
$mohp=$mv['hp']-$plam;
if($mohp<1){$mohp=1;}
}
}
}
if($eb==2){mysql_query("UPDATE `pit` SET `hp_st`='".$ep."' WHERE `id`='".$fpit['id']."'");}
else{mysql_query("UPDATE `users_stats` SET `hp`='".$ep."' WHERE `id`='".$ust['id']."'");}
}
}
mysql_query("UPDATE `okr_usrs` SET `att`='".$att."' WHERE `id`='".$emm['id']."'");
$resp=time()+$mv['ataka'];
mysql_query("UPDATE `okr_mobs` SET `hp`='".$mohp."' WHERE `id`='".$mv['id']."'");
}
else
{
$resp=time()+round($mv['ataka']/2);
}
mysql_query("UPDATE `okr_mobs` SET `time`='".$resp."' WHERE `id`='".$mv['id']."'");
}
//////////////////
$ast=1;
$tt=time()+300;
mysql_query("UPDATE `okr_usrs` SET `time`='".$tt."' WHERE `usr`='".$udata['id']."'");
include($path.'files/head.php');
include($path.'files/zag.php');
echo '<table width=100%>
<tr>
<td width=35%>
<a href=game.php><div style="background: #882222; border-radius: 7px 0 0 7px" class="m p bts bbs brs bls" align=center>Главная</div></a>
</td><td>';
echo '<a href=?><div class="line bts brs bls bbs p m" style="border-radius: 0 7px 7px 0">
<font color=#ffffff>Окрестности
</font>
</div></a></td></tr></table>';
echo '<div class="bat bts brs bls bbs p">';
if(!$ou)
{
$okrest=mysql_query("SELECT * FROM `okr` ORDER BY `id` ASC");
while($ok=mysql_fetch_array($okrest))
{
echo '<a href=?oz='.$ok['id'].'><div style="background: url(img/okrest/main/'.$ok['img'].'.png) 0 50% no-repeat; background-size: cover; height: 100px; margin-top: 3px;"><div style="height: 70px; padding-left: 10px">
<div style="background: #000000; padding: 2px; width:50%; opacity: 0.9">
<img src=img/main/e28.png> <font color=#00cc00>Уровень:</font> <img src=img/main/p10.png> <font color=#ff9900><b>'.$ok['lvl'].'</b></font> </div>
</div>
<div style="background: #111111; padding: 3px; opacity: 0.7" align=center>
'.$ok['name'].'
</div>
</div></a>';
}
}
else
{
$okr=mysql_fetch_array(mysql_query("SELECT * FROM `okr` WHERE `id`='".$udata['okr']."'"));
echo '<center><a href=?ou='.$ou.'><b>'.$okr['name'].'</b></a></center>';
echo '</div><div class="bat brs bls bbs p">';
if(isset($_GET['mob']))
{
$mob=mysql_num_rows(mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."'"));
if($mob==0)
{
echo 'В текущем месте нет противников';
}
else
{
if($or['enemy']==0)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<div style="background: #222222; background: url(style/okr_mob.jpg) 0 50% no-repeat; background-size: cover; padding: 6px">';
echo '<table width=100%>';
echo '<tr>';
echo '<td width=70px><img src=img/mob/okr/'.htmlspecialchars($mb['img']).'.jpg></td>';
echo '<td>';
if($mb['rang']=='D'){$c='#999999';}
elseif($mb['rang']=='C'){$c='#00cc00';}
elseif($mb['rang']=='B'){$c='#0000cc';}
elseif($mb['rang']=='A'){$c='#cc00cc';}
elseif($mb['rang']=='S'){$c='#ff9900';}
elseif($mb['rang']=='SS'){$c='#ff2222';}
echo '<img src=img/main/e30.png> <font color='.$c.'>'.$mb['name'].'</font> <img src=img/main/p10.png>'.$mb['lvl'].'<br>';
$hpm=$mb['hp_max']/100;
$hpm=$mb['hp']/$hpm;
echo '<div class="brs bls bbs bts m" style="font-size: 15px; width: 97%">
<div style="background: #dd2222; width: '.$hpm.'%; height: 23px;"><div class="pers" align=left>'.$mb['hp'].'/'.$mb['hp_max'].'</div></div>
</div>';
echo '<form action=?ataka='.$mb['id'].' method=POST>
<input type=submit value="бой" style="background: #3c3047; padding: 3px; width:97%;
color:#ffff55; font-size: 100%;">
</form>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
}
}
else
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."' and `id`='".$or['enemy']."'");
$mb=mysql_fetch_array($mobas);
echo '<div style="background: #222222; background: url(style/okr_mob.jpg) 0 50% no-repeat; background-size: cover; padding: 6px">';
echo '<table width=100%>';
echo '<tr>';
echo '<td width=70px><img src=img/mob/okr/'.htmlspecialchars($mb['img']).'.jpg></td>';
echo '<td>';
if($mb['rang']=='D'){$c='#999999';}
elseif($mb['rang']=='C'){$c='#00cc00';}
elseif($mb['rang']=='B'){$c='#0000cc';}
elseif($mb['rang']=='A'){$c='#cc00cc';}
elseif($mb['rang']=='S'){$c='#ff9900';}
elseif($mb['rang']=='SS'){$c='#ff2222';}
echo '<img src=img/main/e30.png> <font color='.$c.'>'.$mb['name'].'</font> <img src=img/main/p10.png>'.$mb['lvl'].' <font color=#ff0000>'.$or['att'].'</font><br>';
$hpm=$mb['hp_max']/100;
$hpm=$mb['hp']/$hpm;
echo '<div class="brs bls bbs bts m" style="font-size: 15px; width: 97%">
<div style="background: #dd2222; width: '.$hpm.'%; height: 23px;"><div class="pers" align=left>'.$mb['hp'].'/'.$mb['hp_max'].'</div></div>
</div>';
$text='атака';
if($or['ataka_time']>time())
{
$tre=$or['ataka_time']-time();
$text='Через: '.$tre.'с.';
}
echo '<form action=b_okr_kick.php method=POST>
<input type=submit value="'.$text.'" style="background: #3c3047; padding: 3px; width:97%;
color:#ffff55; font-size: 100%;">
</form>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<table width=100%>';
echo '<tr>';
$tn=time();
$mobs=mysql_query("SELECT * FROM `mag` WHERE `usr`='".$udata['id']."' and `status`='on' ORDER BY `id`");
while($mag=mysql_fetch_array($mobs))
{
echo '<td align=center>';
if($mag['mag']==1)
{
$sn=1;
$name='заклинание удара';
}
if($mag['mag']==2)
{
$sn=14;
$name='заклинание случайности';
}
if($mag['mag']==3)
{
$sn=3;
$name='заклинание усиления';
}
if($mag['mag']==4)
{
$sn=9;
$name='заклинание пробивания';
}
if($mag['mag']==5)
{
$sn=13;
$name='заклинание стана';
}
if($mag['mag']==6)
{
$sn=2;
$name='заклинание обороны';
}
if($mag['mag']==7)
{
$sn=5;
$name='заклинание молний';
}
if($mag['mag']==8)
{
$sn=4;
$name='заклинание исцеления';
}
if($mag['mag']==9)
{
$sn=11;
$name='заклинание вампира';
}
if($mag['mag']==10)
{
$sn=10;
$name='заклинание возврата';
}
if($mag['mag']==11)
{
$sn=12;
$name='заклинание ослабления';
}
if($mag['mag']==12)
{
$sn=7;
$name='заклинание барьера';
}
if($mag['mag']==13)
{
$sn=8;
$name='заклинание сингулярности';
}
if($mag['mag']==14)
{
$sn=6;
$name='заклинание хаоса';
}
if($mag['time']<=$tn)
{
echo '<a href=b_okr_mag.php?mag='.$mag['mag'].'>
<div class="mag p" style=" margin-top: 3px;
margin-bottom: 2px;"><img src=img/mag/sfera_'.$sn.'.jpg></div></a>';
}
else
{
$mag['time']=$mag['time']-time();
$mag['time']=$mag['time']." с.";
echo '<a href=b_okr_mag.php?mag='.$mag['mag'].'>
<div class="mag p m" style="opacity: 0.8; margin-top: 3px;
margin-bottom: 2px;"><img src=img/mag/sfera_'.$sn.'.jpg>'.$mag['time'].'</div></a>';
}
echo '</td>';
}
echo '</tr>';
echo '</table>';
echo '<table width=100%>';
echo '<tr>';
$eq=mysql_query("SELECT * FROM `elic` WHERE `usr`='".$udata['id']."' and `tip`='hp' and `status`='on'");
while($el=mysql_fetch_array($eq))
{
echo '<td align=center>';
if($el['time']<=$tn)
{
echo '<a href=b_okr_elic.php?elic='.$el['id'].'>
<div class="p elic" style=" margin-top: 3px;
margin-bottom: 4px;">
<img src=img/elic/'.htmlspecialchars($el['tip']).''.$el['ef'].'.png></div></a> ';
}
else
{
$el['time']=$el['time']-time();
if($el['time']<60){
$el['time']=$el['time']." с.</font>";
}
echo '<div style="opacity: 0.8; margin-top: 3px;
margin-bottom: 4px;" class="p elic"><img src=img/elic/'.htmlspecialchars($el['tip']).''.$el['ef'].'.png> '.$el['time'].'</div>';
}
echo '</td>';
}
echo '</tr>';
echo '</table>';
echo '</div>';
}
}
}
else
{
echo '<center><table border=1px style="background: url(img/okrest/'.$okr['img'].'.png) 0 50% no-repeat; background-size: cover; height: 301px; width: 301px;">';
echo '<tr>';
$i=0;
$kletka=mysql_query("SELECT * FROM `okr_loc` ORDER BY `y` ASC, `x` ASC");
while($kl=mysql_fetch_array($kletka))
{
echo '<td style="width:43px; height:43px;">';
$x_m=$udata['ok_x']-1;
$x_mx=$udata['ok_x']+1;
$y_m=$udata['ok_y']-1;
$y_mx=$udata['ok_y']+1;
if($udata['ok_x']==$kl['x'] and $udata['ok_y']==$kl['y'])
{
echo '<div style="width:43px; height:43px; background: #ff0000; opacity: 0.6">';
$mob=mysql_num_rows(mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$udata['ok_x']."' and `y`='".$udata['ok_y']."'"));
if($mob!=0)
{
echo '<a href=?ou='.$ou.'&mob><center><img src=img/main/wr.png width=85%></center></a>';
}
echo'</div>';
}
elseif($x_mx==$kl['x'] and $udata['ok_y']==$kl['y'])
{
echo '<a href=?step=right><div style="width:43px; height:43px; background: #0000ff; opacity: 0.5">';
if($ast==1)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$kl['x']."' and `y`='".$kl['y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<img src=img/mob/okr/'.$mb['img'].'.jpg width=20px>';
}
}
echo'</div></a>';
}
elseif($x_m==$kl['x'] and $udata['ok_y']==$kl['y'])
{
echo '<a href=?step=left><div style="width:43px; height:43px; background: #0000ff; opacity: 0.5">';
if($ast==1)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$kl['x']."' and `y`='".$kl['y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<img src=img/mob/okr/'.$mb['img'].'.jpg width=20px>';
}
}
echo'</div></a>';
}
elseif($y_mx==$kl['y'] and $udata['ok_x']==$kl['x'])
{
echo '<a href=?step=down><div style="width:43px; height:43px; background: #0000ff; opacity: 0.5">';
if($ast==1)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$kl['x']."' and `y`='".$kl['y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<img src=img/mob/okr/'.$mb['img'].'.jpg width=20px>';
}
}
echo'</div></a>';
}
elseif($y_m==$kl['y'] and $udata['ok_x']==$kl['x'])
{
echo '<a href=?step=up><div style="width:43px; height:43px; background: #0000ff; opacity: 0.5">';
if($ast==1)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$kl['x']."' and `y`='".$kl['y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<img src=img/mob/okr/'.$mb['img'].'.jpg width=20px>';
}
}
echo'</div></a>';
}
else
{
echo '<div style="width:43px; height:43px;">';
if($ast==1)
{
$mobas=mysql_query("SELECT * FROM `okr_mobs` WHERE `okr`='".$ou."' and `x`='".$kl['x']."' and `y`='".$kl['y']."'");
while($mb=mysql_fetch_array($mobas))
{
echo '<img src=img/mob/okr/'.$mb['img'].'.jpg width=20px>';
}
}
echo'</div>';
}
echo '</td>';
$i++;
if($i==7){echo '</tr><tr>';$i=0;}
}
echo '</tr>';
echo '</table></center>';
}
echo '</div>';
echo '<div class="bts brs bls bbs p line m">';
echo 'Чат';
echo '</div><div class="bat brs bts bls bbs p">';
echo '<form action=?say method=POST>
<center><textarea name=text rows=2 style="width: 90%"></textarea></center>
<div align=center><input type=submit value=отправить></div>
</form>';
echo '</div><div class="bat brs bts bls bbs p">';
$chat=mysql_query("SELECT * FROM `okr_chat` WHERE `okr`='".$ou."' ORDER BY `id` DESC LIMIT 5");
while($ch=mysql_fetch_array($chat))
{
$uss=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$ch['usr']."'"));
echo '<img src=img/main/c'.$uss['klass'].'.png> <img src=img/main/r'.$uss['rasa'].'.png>
<a href=info.php?id='.$uss['id'].'>'.$uss['usr'].'</a> '.$ch['text'].' ';
$time=time()-$ch['time'];
$h=floor($time/3600);
$m=floor(($time-($h*3600))/60);
$s=$time-($h*3600)-($m*60);
$tim=$h.':'.$m.':'.$s;
echo '<font color=#0099ff>'.$tim.'</font><br>';
}
echo '</div>';
echo '<div class="bts brs bls bbs p line m">';
echo 'Игроки в локации';
echo '</div><div class="bat brs bts bls bbs p">';
$users=mysql_query("SELECT * FROM `okr_usrs` WHERE `okr`='".$ou."'");
while($use=mysql_fetch_array($users))
{
$us=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$use['usr']."'"));
echo '<img src=img/main/c'.$us['klass'].'.png> <img src=img/main/r'.$us['rasa'].'.png>
<a href=info.php?id='.$us['id'].'>'.$us['usr'].'</a> <img src=img/main/p10.png>'.$us['lvl'].' ['.$us['ok_y'].'-'.$us['ok_x'].'], ';
}
}
echo '</div>';
include('files/down.php');
?>