<?php
 include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';

$set['title']='Рыбалка онлайн';
include_once '../sys/inc/thead.php';
title();
aut();

if(!isset($user)){
  header("Location:/index.php");
  exit;
}





include_once 'inc/start.php';
$posts=array();


$all=mysql_query("SELECT * FROM `fish_m`");
if(isset($_GET['id']) && $_GET['id']<6 && $_GET['id']>0 && is_numeric($_GET['id'])){
$all1=mysql_query("SELECT * FROM `fish_m` WHERE `id`='".intval($_GET['id'])."'");
$arrs=mysql_fetch_array($all1);
if($arrs['level']<=$fish['level']){
mysql_query("UPDATE `fish_u` SET `loc`='".$arrs['id']."' WHERE `id_u`='".$user_id."'");
mes('Локация успешно изменена');
}
}
$fishes=mysql_query("SELECT * FROM `fish`");
$ar1=array();
$ar2=array();
$ar3=array();
$ar4=array();
$ar5=array();
$i=0;
while($a=mysql_fetch_array($fishes)){
$i=$a['m_id'];
$ar[$i][]=$a['name'].',';
}
echo implode($ar2);
while($arr=mysql_fetch_array($all)){
$i=$arr['id'];
$posts[]=array('icon'=>'<img src="m/'.$arr['id'].'.jpg"/>','title'=>"<a href='map.php?id=".$arr['id']."'>".$arr['name']."</a><br/>",
'post'=>$arr['opis'].'<br/>
Водятся : '.implode($ar[$i]).'
');
}
$count=count($posts);
for($i=0;$i<$count;$i++){
if($i%2)
echo "<div class='p_m'>".implode($posts[$i])."</div>";
else
echo "<div class='p_t'>".implode($posts[$i])."</div>";
}

ret('В игру','index.php');
include_once '../sys/inc/tfoot.php';
?>