Файл: modules/user/list.php
Строк: 59
<?
if(isset($user)) {
switch(@$_GET['act']){
default:
$locate = 'in_users';
$title = $lang->word('users');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('users'));
$users_admin = $db->query("SELECT * FROM `users` WHERE `level` > '1'")->rowCount();
$tpl->div('menu', img('1_admin.png').' <a href="/users/?act=admins">'.$lang->word('admins').'</a> ['.$users_admin.']<br/>');
$tpl->div('menu', USERS_ICON .' <a href="/users/?act=users">'. $lang->word('users') .'</a> '. $stat->users() .'<br/>');
$tpl->div('block', HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
break;
case 'users';
$locate = 'in_users';
$title = $lang->word('users');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('users'));
$users_a = $db->query("SELECT * FROM `users`")->rowCount();
$pages = new Paginator($users_a, $ames);
if($users_a == 0) {
$tpl->div('menu', $lang->word('not_users'));
} else {
$users_q = $db->query("SELECT * FROM `users` ORDER BY id ASC LIMIT $start, $ames");
while($users = $users_q->fetch()) {
$tpl->div('menu', nick($users['id']));
}
$pages->view('/users/?act=users&');
}
$tpl->div('block', USERS_ICON .' <a href="/users/">'. $lang->word('users') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
break;
case 'admins';
$locate = 'in_users';
$title = $lang->word('admins');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('admins'));
$users_a = $db->query("SELECT * FROM `users` WHERE `level` >= '2'")->rowCount();
$pages = new Paginator($users_a, $ames);
if($users_a == 0) {
$tpl->div('menu', $lang->word('not_users'));
} else {
$users_q = $db->query("SELECT * FROM `users` WHERE `level` >= '2' ORDER BY level DESC LIMIT $start, $ames");
while($users = $users_q->fetch()) {
$tpl->div('menu', nick($users['id']).' ['.level($users['level']).']');
}
$pages->view('/users/?act=admins&');
}
$tpl->div('block', USERS_ICON .' <a href="/users/">'. $lang->word('users') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
break;
}
} else {
$locate = 'in_users';
$title = 'Пользователи';
require_once(SYS.'/view/header.php');
$tpl->div('title', 'Пользователи');
$tpl->div('menu', '<center>Пользователи доступны только зарегистрированным пользователям!</center>');
$tpl->div('block',HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
}
?>