File size: 1.22Kb
<?
session_start();
$title="Рефы\n";
include ("header.php");
echo $div["header"];
echo "<b>Рейтинг рефераловладельцев.</b>";
echo $div["end"];
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=20;
$arr = mysql_query("select * from `uzvers`");
$qi = mysql_query("select * from `uzvers` order by `col` desc limit $startan,$num_msgs_an;;");
if (mysql_affected_rows()==0)
{
echo "Нет сайтов!";
}
else
{
echo "id | кол-во <br/>";
for ($i=100; $i>0; $i--)
{
while($row=mysql_fetch_array($qi))
{
if ($row['col']!=0)
{
if ($i=$row['col'])
echo "".$row['id']." | ".$row['col']." <br/>";
}
}
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"reftop.php?".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("<<--")."</a>] ";
if($i>$startan+$num_msgs_an)
echo "[<a href=\"reftop.php?".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("-->>")."</a>";;
echo "<br/>#";echo "<a href=\"index.php?".session_name()."=".session_id()."\">На главную</a><br/>";
echo $div["end"];
include ("footer.php");
?>