<?php

define('_IN_JOHNCMS', 1);

$headmod = 'users';
require_once("../incfiles/core.php");
$textl = '' . $copyright . ' - Пользователи';
require_once("../incfiles/head.php");

echo '<div class="phdr"><b>Список пользователей</b></div>';
echo '<div class="phdr">Все | <a href="' . $home . '/users_boys.html">Парни</a> | <a href="' . $home . '/users_girls.html">Девушки</a> | <a href="' . $home . '/users_birsd.html">Именин.</a> | <a href="' . $home . '/users_admin.html">Админ.</a></div>';
$req = mysql_query("SELECT COUNT(*) FROM `users`");
$total = mysql_result($req, 0);
$req = mysql_query("SELECT `id`, `name`, `sex`, `age`, `live`, `lastdate`, `datereg`, `statusik`, `statusik_img`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 ORDER BY `datereg` DESC LIMIT $start, $kmess");
while ($res = mysql_fetch_assoc($req)) {
    echo ($i % 2) ? '<div class="list2">' : '<div class="list1">';
    echo show_user($res, 1, (($rights > 1) ? 2 : 0)) . '</div>';
    ++$i;
}
echo '<div class="phdr">Всего: ' . $total . '</div><p>';
if ($total > $kmess) {
    echo '<p>' . pagenav('' . $home . '/str/users.php?', $start, $total, $kmess) . '</p>';
    echo '<p><form action="' . $home . '/str/users.php" method="post"><input type="text" name="page" size="2"/><input type="submit" value="К странице &gt;&gt;"/></form></p>';
}
echo '<img src="' . $home . '/images/act3.gif" width="7" height="10" alt="-" /> <a href="' . $home . '/str/users_search.php">Поиск пользователя</a><br /></p>';

require_once("../incfiles/end.php");

?>