Файл: DARK WARS/dark_war/pets.php
Строк: 19
<?php
include_once './start.php';
$doc = new document();
$doc->title('Мои животные');
if(isset($_GET['id'])){
$ar = mysql_fetch_assoc(mysql_query("SELECT * FROM `dark_war_pets_u` WHERE `id_user` = '{$player->id}' AND `id` = '".$_GET['id']."' LIMIT 1"));$img = "<img src='$ar[img]' alt='!' />";$request[] = "Название: $ar[name]";
$request[] = "Бартнер: $ar[bartner]";$request[] = "Атака: $ar[attack]";$request[] = "Уровень: $ar[lvl]";
$list = array('img' => $img, 'title' => $title, 'request' => $request, 'action' => $action);$doc->assign('list', $list);
$doc->display('view_info.tpl');exit;
}$pages = new pages;$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_pets_u` WHERE `id_user` = '{$player->id}' "), 0);$pages->this_page();
$q=mysql_query("SELECT * FROM `dark_war_pets_u` WHERE `id_user` = '{$player->id}' ORDER BY `id` ASC LIMIT {$pages->my_start()}, {$pages->items_per_page}");while ($post = mysql_fetch_array($q)) {
$list = $post['name'];$img = $post['img'];$link = "./pets.php?id=" . $post['id'] . "".(isset($_GET['page'])?'&page='.$_GET['page'].'' : '')."";$dispatch[] = array ('title' => $list, 'img' => $img, 'link' => $link, 'descrip' => $descrip);
}if(!$dispatch){$dispatch[] = array ('title' => 'У вас нет животных.');}$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');$pages->listing("pets.php?type=$type&");$doc->ret('/dark_war/donat/pets', 'Зоомагазин');
?>