Просмотр файла users.php

Размер файла: 1.38Kb
<?
error_reporting(0); 
include "config.php";
include "header.php";
if (!empty($pass))
{
$viewmess = file("data/$name.$antihak.txt");
$viewmess = explode("|", $viewmess[0]);
$nick_user = $viewmess[0];
$pass_user = $viewmess[1];
$status = $viewmess[11];
}
if ($pass==$pass_user)
{
echo "Пользователи нашего чата";
$num_sep =10;
$preview="users.txt";
$preview = file($preview);
$count = count($preview);
$num_page=1;
if (isset($HTTP_GET_VARS['page'])) {
   if (($HTTP_GET_VARS['page']>0) and ($HTTP_GET_VARS['page']<=ceil($count/$num_sep))) $num_page=$HTTP_GET_VARS['page'];
}
for ( $i=($num_page-1)*$num_sep; $i<=(($num_page*$num_sep<$count) ? $num_page*$num_sep-1: $count-1); $i++) 
{
$viewmess = file("users.txt");
$viewmess = explode("|", $viewmess[$i]);
$nick_user = $viewmess[0];
$user_pol = $viewmess[1];
if (!empty($nick_user))
{
echo "</center>
$user_pol <a href=\"anketa.php?user=$nick_user&name=$name&pass=$pass\">$nick_user</a>";
if($status==Админ)
{
echo "
 [<a href=\"user_del.php?str=$i&user=$nick_user&name=$name&pass=$pass\">x</a>]<br/>";
}
echo "
<center>* * *<br/>";
}
}
if ($count>$num_sep)
nav_page(ceil($count/$num_sep),(isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page']: 1),"users.php?pass=$pass&name=$name&page=");
echo "
<a href=\"index.php?pass=$pass&name=$name\">В чат</a><br/>";
}
else
{
echo "Ошибка авторизации";
}
echo "$bottom";
?>