Файл: DARK WARS/dark_war/masteries/my_masteries.php
Строк: 28
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Мои умения');
$pages = new pages;
$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_masteries_u` WHERE `id_player` = '$player->id' "), 0);
$pages->this_page();
$q=mysql_query("SELECT * FROM `dark_war_masteries_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'];
$img = '/dark_war/all_img/masteries/'.$post['img'].'.png" ';
$link = "my_info.php?id=" . $post['id'] . "".(isset($_GET['page'])?'&page='.$_GET['page'].'' : '')."";
$descrip = text::length($post['description'], 40);
$action[] = array('link' => 'take.php?id='.$post['id'].'', 'name' => 'Взять');
if ($post['active'] == 1) {
$action[] = array('link' => 'take_off.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', 'Персонаж'); // выводит ссылки шаги на зад
?>