Файл: play_gamescool/fish/cup_table.php
Строк: 24
<?php
include_once '../../connect.php';
include_once '../../head.php';
if(!isset($u)){
header("Location:/index.php");
exit;
}
include_once 'inc/start.php';
$posts=array();
$id=abs(intval($_GET['id']));
$query=mysql_query("SELECT * FROM `fish_cup` WHERE `id`='".$id."'");
if(mysql_num_rows($query)==0)
$posts[]=array('title'=>'Турнира нет');
else
{
$quert=mysql_query("SELECT * FROM `fish_yc` WHERE `id_cup`='".$id."' AND `max_ves`!='0' ORDER BY `max_ves` DESC");
while($arr=mysql_fetch_array($quert)){
$u=new_user($arr['id_u']);
$posts[]=array('title'=>'<a href="/id'.$u['id'].'">'.$u['login'].'</a><br/>',
'post'=>$arr["max_kogo"].' - '.$arr["max_ves"].' кг');
}
}
$count=count($posts);
for($i=0;$i<$count;$i++){
if($i%2)
echo "<div class='div'><table><tr>".implode($posts[$i])."</tr></table></div>";
else
echo "<div class='div'><table><tr>".implode($posts[$i])."</tr></table></div>";
}
if ($u['admin']==1){
ret('В админку','cup_admin.php');}
ret('В игру','index.php');
include_once '../../foot.php';
?>