Файл: DARK WARS/dark_war/place/view.php
Строк: 20
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Монстры');
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
$doc->err('Ошибка, не выбран отдел');
exit();
}
$id = (int)$_GET['id'];
$pages = new pages;
$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_place_creeps`
WHERE `id_place` = '$id'"), 0);
$pages->this_page();
$q = mysql_query("SELECT * FROM `dark_war_place_creeps` WHERE `id_place` = '$id'
LIMIT {$pages->my_start()}, {$pages->items_per_page}");
while ($post = mysql_fetch_assoc($q)) {
$list = $post['name'];
$img = '/dark_war/all_img/place/creeps/littel/'.$post['img'].'.jpg';
$link = "new_attack.php?id=$post[id]";
$descrip = "<img src='/dark_war/all_img/14/hp.png' alt='' />$post[hp] ";
$descrip .= "<img src='/dark_war/all_img/14/sword.png' alt='' />$post[dmg] ";
$descrip .= "<img src='/dark_war/all_img/14/shield1.png' alt='' />$post[armor] ";
$descrip .= "<img src='/dark_war/all_img/14/shield.png' alt='' />$post[magicr] ";
$descrip .= "<img src='/dark_war/all_img/14/level.png' alt='' />$post[level] ";
$dispatch[] = array ('title' => $list, 'img' => $img, 'link' => $link, 'descrip' => $descrip);
}
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
$pages->listing("view.php?id=$id&"); // вывод страниц
$doc->ret("/dark_war/place/", "Местности");
?>