Файл: Arhmobi_esdcms/games/zverek/top_k.php
Строк: 23
<?php
include_once '../../sys/inc/start.php';
$doc = new document();
$doc->ret(__('Назад'), './');
$pages = new pages;
$res = $db->query("SELECT COUNT(*) FROM `users` WHERE `zverek_kapkan`");
$pages->posts = $res->fetchColumn();
$doc->title = __('Топ больных (%s)', $pages->posts);
$q = $db->query("SELECT `id`FROM `users` WHERE `zverek_kapkan` ORDER BY `zverek_kapkan` DESC LIMIT " . $pages->limit);
$listing = new listing();
if ($arr = $q->fetchAll()) {
foreach ($arr AS $ank) {
$p_user = new user($ank['id']);
$post = $listing->post();
$post->title = $p_user->nick();
$post->url = '/profile.view.php?id=' . $p_user->id;
$post->image = $p_user->ava();
$post->content .= __('укусов змеи') . ': ' . $p_user->zverek_kapkan . '<br />';
}
}
$listing->display(__('Нет пользователей'));
$pages->display('?');