Файл: titwar.ru/sack.php
Строк: 59
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {
header('location: /');
exit;
}
$title = 'Resources';
include './system/h.php';
?>
<div class='line'></div><div class='menu'>
<?
$sack = mysql_query('SELECT * FROM `sack` WHERE `user` = "'.$user['id'].'"');
$sack = mysql_fetch_array($sack);
if(!$sack) {
mysql_query('INSERT INTO `sack` (`user`) VALUES ("'.$user['id'].'")');
}
$res = 0;
for($i = 1; $i < 10; $i++) {
if($sack[$i] > 0) {
$res++;
switch($i) {
case 1:
$name = 'Diamond';
$about = 'You can use it for improve your equipment';
break;
case 2:
$name = 'Corundum';
$about = 'You can use it for improve your equipment';
break;
case 3:
$name = 'Obsidian';
$about = 'You can use it for improve your equipment';
break;
case 4:
$name = 'Graphite';
$about = 'You can use it for improve your equipment';
break;
case 5:
$name = 'Onyx';
$about = 'You can use it for improve your equipment';
break;
case 6:
$name = 'Ambrosia';
$about = 'You can use it for create a potion';
break;
case 7:
$name = 'Mint';
$about = 'You can use it for create a potion';
break;
case 8:
$name = 'Air';
$about = 'You can use it for create a potion';
break;
case 9:
$name = 'Rowanberry';
$about = 'You can use it for create a potion';
break;
}
?>
<li><table cellpadding='0' cellspacing='0'>
<tr>
<td><img src='/images/res/<?=$i?>.png' alt='*'/></td>
<td valign='top' style='padding-left: 5px;'><?=$name?> (<?=$sack[$i]?> <font color='#9bc'>pc.</font>)<br/><small>
<font color='#999'><?=$about?></font>
</small></td></tr></table></li>
<?
}
}
if($res == 0) {
?>
<li><font color='#999'>You have no resources</font></li>
<?
}
?>
<li class='no_b'></li>
</div>
<?
include './system/f.php';
?>