File size: 945B
<?php
$title='Топ-лист';
require"../system/config.php";
require"../system/func.php";
require"../system/head.php";
require"../system/error.php";
echo'<div class="i">'.$title.'<br></div>';
$total=mysql_result(mysql_query("SELECT COUNT(*) `cn`, `id_user` FROM `forum_messages` GROUP BY `id_user` ORDER BY `cn`"),0);
$page = abs((int)$_GET['page']);
if($page < 0 || $page > $total) $page = 0;
if ($total < $page + 10) $end = $total;
else $end = $page + 10;
$qury=mysql_query("SELECT COUNT(*) `cn`, `id_user` FROM `forum_messages` GROUP BY `id_user` ORDER BY `cn` DESC");
while($data=mysql_fetch_array($qury)){echo'<div class="p">'.nik_one($data['id_user']).' ['.$data['cn'].']</div>';}
echo'<div class="p">';
strpage($page, 10, $total, "top-list.php");
echo'</div><div class="p"><img src="'.$dirsite.'/design/default/act.gif" alt=""> <a href="index.php">в форум</a></div>';
require"../system/foot.php";
?>