Файл: transformerss/pages/_top_chat.php
Строк: 18
<?PHP
$_OPTIMIZATION["title"] = "ТОП 7";
$user_id = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>
<div class="s-bk-lf">
<div class="acc-title">ТОП 10 общительных</div>
</div>
<div class="silver-bk"><div class="clr"></div>
<?PHP
$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;
$db->Query("SELECT * FROM db_users_b ORDER BY chat DESC LIMIT 10");
if($db->NumRows() > 0){
?>
<table width="100%" border="0">
<tr bgcolor="#efefef">
<td align="center" width="75">Место</td>
<td align="center">Пользователь</td>
<td align="center">Сообщений</td>
</tr>
<?PHP
$i = 0;
while($data = $db->FetchArray()){
$i=$i+1;
?>
<tr class="htt">
<td align="center"><?=$i; ?></td>
<td align="center"><?=$data["user"]; ?></td>
<td align="center"><?=$data["chat"]; ?></td>
</tr>
<?PHP
}
?>
</table>
<BR />
<?PHP
}
?>
</div>
<div class="clr"></div>