Файл: play_gamescool/fish/shop.php
Строк: 111
<?php
include_once '../../connect.php';
$title = $title.' :: Онлайн рыбалка :: Магазин';
include_once '../../head.php';
if(!isset($u)){
header("Location:/index.php");
exit;
}
include_once 'inc/start.php';
if(!isset($_GET['act']) || $_GET['act']>8 || !is_numeric($_GET['act']) || $_GET['act']==0){
$posts=array();
$posts[]=array('icon'=>'<img src="shop.png"/>','title'=>'Магазин');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=1">Удочки</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=2">Леска</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=3">Крючки</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=4">Наживка</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=5">Подкормка</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=6">Напитки</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=7">Еда</a>');
$posts[]=array('icon'=>'<img src="s.png"/>','title'=>'<a href="shop.php?act=8">Талисманы</a>');
}
elseif($_GET['act']==1){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Удочки');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='y'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr>','post'=>'<tr><td>'.$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==2){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Леска');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='l'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==3){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Крючки');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='k'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==4){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Наживка');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='n'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==5){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Подкормка');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='p'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==6){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Напитки');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='nap'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==7){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Еда');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='e'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
elseif($_GET['act']==8){
$posts=array();
$posts[]=array('icon'=>'<img src="money.png"/>','title'=>'Сегодня в продаже<br/>','post'=>'Талисманы');
$query=mysql_query("SELECT * FROM `fish_pod` WHERE `type`='t'");
while($arr=mysql_fetch_array($query)){
$posts[]=array('icon'=>'<td rowspan="2"><img src="i/'.$arr['id'].'.jpg"/></td>','title'=>'<td><b>'.$arr["name"].'</b></td></tr><tr><td>','post'=>$arr['opis'].'<br/>
<img src="rubi.png" alt="" /><a href="buy.php?id='.$arr["id"].'&r">'.$arr["rub"].'</a>|<img src="d.png" alt="" /><a href="buy.php?id='.$arr["id"].'&d">'.$arr["cena"].'</a>
</td>');
}
ret('В магазин','shop.php');
}
$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>";
}
ret('В игру','index.php');
include_once '../../foot.php';
?>