Файл: accmarket.net/game/res.php
Строк: 40
<?php
define('_ON_CMS', 1);
require_once '../includes/start.php';
require_once '../includes/function.php';
require_once '../includes/header.php';
if($game==0 OR $level==0 OR $ban!=0){
header('Location: ../index.php');
}
$pl=$_GET['p'];
$q = mysql_query("SELECT * FROM `planet` WHERE `id`='".check(mysql_real_escape_string($pl))."'");
$f = mysql_fetch_array($q);
switch ($act) {
default:
echo '<div class="top">Добыча ресурсов</div>';
$PAGINGS = mysql_query("SELECT * FROM `planet` WHERE `uid` = '".$use_id."' ORDER BY `id` ASC");
if($PAGINGS > 0)
{
while($row = mysql_fetch_array($PAGINGS))
{
echo '<div class="conts">';
echo '<a href="sector.php?x='.$row['x'].'&y='.$row['y'].'"><img src="../images/planet_small/'.$row['type'].'.jpg" alt="" /></a> <a href="?act=list&p='.$row['id'].'">'.$row['name'].'</a> [x:'.$row['x'].' y:'.$row['y'].']';
echo '</div>';
}
}
break;
case 'list':
echo '<div class="top">Планета '.$f['name'].'</div>';
echo '<div class="conts">
<img src="../images/min.gif" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=2">Минералы</a><br/>
<img src="../images/gas.gif" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=3">Газ Веспен</a><br/>
<img src="../images/metall.gif" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=4">Металлы</a><br/>
<img src="../images/water.png" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=5">Вода</a><br/>
<img src="../images/kred.png" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=6">Кредиты</a><br/>
<img src="../images/prov.png" alt="" /> <a href="?act=pl&p='.$f['id'].'&t=7">Провизия</a></div>';
echo '<div class="conts"><a href="res.php"><<Назад</a></div>';
break;
case 'pl':
$tres=$_GET['t'];
if($f['uid']==$use_id AND $tres!='' AND $tres>=2 AND $tres<=7){
echo '<div class="top">Планета '.$f['name'].'</div>';
$PAGINGS = mysql_query("SELECT * FROM `planet_loc` WHERE `uid` = '".$use_id."' AND `planet_id`='".$f['id']."' AND `occupy`=0 AND `type`='".check($tres)."'");
if($PAGINGS > 0)
{
while($row = mysql_fetch_array($PAGINGS))
{
$s='s'.$row['type'].'';
$science = mysql_result(mysql_query("SELECT ($s) FROM `science` WHERE `planet_id`='".$f['id']."';"), 0);
echo '<div class="conts">';
echo '<a href="production.php?p='.$row['planet_id'].'&l='.$row['id'].'">'.res($row['type']).'</a>: '.$row['res'].' (-'.$row['rab'].'/+'.$row['rab']*($science*0.3).')<br/>'.rab($rasa).': '.$row['rab'].'<br/>';
echo '</div>';
}
}
echo '<div class="conts"><a href="res.php"><<Назад</a></div>';
}
break;
}
div('<a href="../">В игру</a>','conts');
require_once '../includes/footer.php';
?>