Размер файла: 2.71Kb
<?
require_once'../../core/system.php';
echo only_reg();
echo ban();
echo blok();
$header='Тропа Призраков';
require_once'../../core/head.php';
mysql_query("DELETE FROM `hik_otk` WHERE `time`<='".$time."'");
mysql_query("UPDATE `user` set `mesto` = 'Поиск команд', `battle` = '0' where `id` = '".$user['id']."'");
if($user['level'] < 50){
header('location: /');
$_SESSION['err'] = 'Доступно только с 50 уровня';
}
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."') and `status`=''");
$avto = mysql_num_rows($req);
if($avto>0){
header('location: /hiking/ghost-trail/');
}
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."') and `status`>'0'");
$avto = mysql_num_rows($req);
if($avto>0){
header('location: /');
$_SESSION['err'] = 'Ошибка';
}
$req = mysql_query("SELECT * FROM `hiking` where `id`='".intval($_GET['id'])."'");
$hik = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($avto==0 or $id<=0){
header('location: /');
$_SESSION['err'] = 'Команда не найдена';
}
echo "<div class='but-list-light'><a href='search'><img src='/images/icon/r.png'> Поиск команд</a></div><div class='line'></div>";
if($hik['open']==0 and $hik['kol']<4){
echo"<div class='foot'><a class='inpc-ar center' href='join?id=".intval($_GET['id'])."'><img src='/images/icon/stat/sila.png'> Присоединиться</a></div></div><div class='line'></div>";
}
echo"<div class='head center'><div class='empty2'></div>Состав команды (".$hik['kol']."/4) </div>";
$q = mysql_query("SELECT * FROM `user` WHERE (`id`='".$hik['lider']."' || `id`=".$hik['usr1']." || `id`=".$hik['usr2']." || `id`=".$hik['usr3'].") LIMIT 4");
echo "<div class='d-List'><div class='head'>";
while($post = mysql_fetch_array($q)) {
if($post['prava']=="5"){$status="<font color='ffc22b'>[A]</font>";$color="#F7990D";}
if($post['prava']=="4"){$status="<font color='ffc22b'>[a]</font>";$color="EBC621";}
if($post['prava']=="3"){$status="<font color='ffc22b'>[M]</font>";}
if($post['prava']=="2"){$status="<font color='ffc22b'>[m]</font>";}
echo '<a href="/user/'.$post['id'].'/">';
echo"<div class='empty'></div>";
echo online($post['id']);
echo' <font color="'.$post['font'].'">'.$post['nick'].'</font>';
if($post['prava']>"1"){echo" $status";}echo', <img src="/images/icon/level.png">'.$post['level'].', ';
if($hik['lider']==$post['id']){echo' <img src="/images/icon/rating_'.$hik['imp'].'.png">, ';}echo'('.$post['mesto'].') </a>';
}
echo "</div></div>";
require_once'../../core/foot.php';
?>