Размер файла: 3.09Kb
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS Mobile Content Management System //
// Project site: http://johncms.com //
// Support site: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer: Oleg Kasyanov (AlkatraZ) [email protected] //
// Development Team: Eugene Ryabinin (john77) [email protected] //
// Dmitry Liseenko (FlySelf) [email protected] //
////////////////////////////////////////////////////////////////////////////////
*/
defined('_IN_JOHNADM') or die('Error: restricted access');
echo '<div class="phdr"><a href="index.php"><b>' . $lng['admin_panel'] . '</b></a> | ' . $lng['users_list'] . '</div>';
$sort = isset($_GET['sort']) ? trim($_GET['sort']) : '';
echo '<div class="topmenu"><span class="gray">' . $lng['sorting'] . ':</span> ';
switch ($sort) {
case 'nick':
$sort = 'nick';
echo '<a href="index.php?act=users&sort=id">ID</a> | ' . $lng['nick'] . ' | <a href="index.php?act=users&sort=ip">IP</a></div>';
$order = '`name` ASC';
break;
case 'ip':
$sort = 'ip';
echo '<a href="index.php?act=users&sort=id">ID</a> | <a href="index.php?act=users&sort=nick">' . $lng['nick'] . '</a> | IP</div>';
$order = '`ip` ASC';
break;
default :
$sort = 'id';
echo 'ID | <a href="index.php?act=users&sort=nick">' . $lng['nick'] . '</a> | <a href="index.php?act=users&sort=ip">IP</a></div>';
$order = '`id` ASC';
}
$req = mysql_query("SELECT COUNT(*) FROM `users`");
$total = mysql_result($req, 0);
$req = mysql_query("SELECT * FROM `users` WHERE `preg` = 1 ORDER BY $order LIMIT $start,$kmess");
while ($res = mysql_fetch_array($req)) {
$link = '';
if ($rights >= 7)
$link .= '<a href="../users/profile.php?act=edit&id=' . $res['id'] . '">' . $lng['edit'] . '</a> | <a href="index.php?act=usr_del&id=' . $res['id'] . '">' . $lng['delete'] . '</a> | ';
$link .= '<a href="../users/profile.php?act=ban&mod=do&user=' . $res['id'] . '">' . $lng['ban_do'] . '</a>';
echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
echo functions::display_user($res, array('header' => ('<b>ID:' . $res['id'] . '</b>'), 'sub' => $link));
echo '</div>';
++$i;
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
echo '<p>' . functions::display_pagination('index.php?act=users&sort=' . $sort . '&', $start, $total, $kmess) . '</p>';
echo '<p><form action="index.php?act=users&sort=' . $sort . '" method="post"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>';
}
echo '<p><a href="index.php?act=usr_search">' . $lng['search_user'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
?>