Файл: chat_usr.php
Строк: 39
<?
define('PROTECTOR', 1);
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
$textl='Кто в чате?';
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
echo '<table width=100%>
<tr>
<td width=35%>
<a href=chat.php><div style="background: #882222; border-radius: 7px 0 0 7px" class="m p bts bbs brs bls" align=center>В Чат</div></a>
</td><td>';
echo '<a href=?><div class="line bts brs bls bbs p m" style="border-radius: 0 7px 7px 0">
<font color=#ffffff>Кто в Чате?
</font>
</div></a></td></tr></table>';
echo '<div class="bat bts brs bls bbs p">';
if ($_GET['page'] == "" || $_GET['page'] < 0 || $_GET['page'] == "0")
{
$_GET['page'] = 0;
}
$next = $_GET['page'] + 1;
$back = $_GET['page'] - 1;
$num = $_GET['page'] * 10;
if($_GET['page'] == "0")
{$i = 1;}
else{$i = ($_GET['page']*10)+1;}
$viso = mysql_num_rows(mysql_query("SELECT * FROM users"));
$puslap = floor($viso/10);
$lv=time()-1800;
$users=mysql_query("SELECT * FROM `users` WHERE `lv`>'".$lv."' and `mesto`='Общий чат' ORDER BY `lv` DESC LIMIT $num,10");
while($us=mysql_fetch_array($users))
{
if($us['admin']>0 and $us['admin']<6)
{
echo '<img src=img/main/md.png> ';
}
if($us['admin']>5)
{
echo '<img src=img/main/admin.png> ';
}
echo '<img src=img/main/c'.$us['klass'].'.png> <img src=img/main/r'.$us['rasa'].'.png>
<a href=info.php?id='.$us['id'].'>'.$us['usr'].'</a> <img src=img/main/p10.png>'.$us['lvl'].'<br>';
}
if ($_GET['page'] > 0)
{
echo "<a href="?page=$back">Назад</a>";
}
elseif ($_GET['page'] == 0)
{
echo "Назад";
}
echo" | ";
if($_GET['page'] < $puslap || $_GET['page'] == "" || $_GET['page'] == 0)
{echo "<a href="?page=$next">Далее</a>";}
else
{echo "Далее";}
echo '</div></div>';
include('files/down.php');
?>