Файл: DARK WARS/dark_war/hunting_shop/my_huntin.php
Строк: 32
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Мои вещи');
$pages = new pages;
$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_hshop_u` WHERE `id_player` = '$player->id' "), 0);
$pages->this_page();
$dispatch = array();
$q=mysql_query("SELECT * FROM `dark_war_hshop_u` WHERE `id_player` = '$player->id'
LIMIT {$pages->my_start()}, {$pages->items_per_page}");
while ($post = mysql_fetch_array($q)) {
$action = array();
$list = $post['name'] . ($post['type'] == 2 ? " - Стрел $post[boom]" : "");
$img = '/dark_war/all_img/hunting_shop/'.$post['img'].'.png';
$link = "my_info.php?id=" . $post['id'] . "".(isset($_GET['page'])?'&page='.$_GET['page'].'' : '')."";
$descrip = $post['description'];
$action[] = array('link' => 'take.php?id='.$post['id'].'', 'name' => 'Взять');
if ($post['active'] == 1) {
$action[] = array('link' => 'take_off.php?id='.$post['id'].'', 'name' => 'Снять');
}
if ($post['type'] == 2) {
$action[] = array('link' => 'buy_boom.php?id='.$post['id'].'', 'name' => 'Пополнить');
}
$action[] = array('link' => "sell.php?id=".$post['id']."".(isset($_GET['page'])?'&page='.$_GET['page'].'' : '')."", 'name' => 'Продать');
$dispatch[] = array ('title' => $list, 'img' => $img, 'link' => $link, 'descrip' => $descrip, 'action' => $action);
}
if (!$dispatch) {
$dispatch[] = array ('title' => 'У вас нет артефактов');
}
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
$pages->listing("?"); // вывод страниц
$doc->ret('/dark_war/my_profil.php', 'Персонаж'); // выводит ссылки шаги на зад
?>