File size: 1.17Kb
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
session_name("SESID");
session_start();
require("./mysql.php");
require ("config.php");
if ($themes=="")
{
header ("Location: install.php");
}
require ("themes/$themes.php");
require ("ban.php");
$page=$_GET['page'];
if ($page<=0)
{$page=1;}
$q = mysql_query("select * from `users`;");
$count = mysql_num_rows($q);
$i=1;
while($arr = mysql_fetch_array($q)) {
if ($i<=$page*10 & $i>=($page-1)*10)
{
print "<div class='b'>$i. <a href='search.php?user=".$arr[id]."'>$arr[name]</a></div>";
}
++$i;
}
if ($count>10 and $count>10*($page))
{
$next=$page+1;
print "<div><a href='allusers.php?page=".$next."'>Вперёд</a></div>";
}
$prev=$page-1;
if ($prev!=0)
{
print "<div><a href='allusers.php?page=".$prev."'>Назад</a></div>";
}
echo "<div>Пользователей: $count</div>";
require ("foot.php"); #Вставляем низ сайта. (templates/foot.php)
?>