Файл: top/24.php
Строк: 24
<?
print "<?xml version="1.0" encoding="utf-8"?>";
include("verh.php");
@include "config.php";
$uid=$_GET['uid'];
$uid=@mysql_escape_string($uid);
echo "<div class='hefo'>IP|<b>UserAgent</b></div>";
echo "<div class="cent">";
//uid=$uid;
$sql=mysql_query("select count(*) from hits_ip ");
$cc=mysql_fetch_array($sql);
$total_pages=ceil($cc[0]/15);
if (($page<1) || (!$page))
{
$page=1;
}
elseif ($page>$total_pages)
{
$page=$total_pages;
}
$frp=($page-1)*15;
$sql=mysql_query("select ip, ua from hits_ip WHERE uid=$uid order by uid desc limit $frp,15");
for ($i=0; $i<mysql_num_rows($sql); $i++)
{
$stat=mysql_fetch_array($sql);
$u=strtok($stat[ua],'(');
echo ("<br/>$stat[ip]|<b>$u</b>");
}
echo "<div align="center">";
if ($page>1){
$prev=$page-1;
echo "<small><a href='24.php?uid=$uid&page=$prev'>Пред.</a></small> ";
}
else echo "Пред.";
echo " | ";
if (!($page>=$i)){
$next=$page+1;
echo "<small><a href='24.php?uid=$uid&page=$next'>След.</a></small>";
}
else echo "След.";
echo "</div></div>n";
echo "<div class='hefo' align='center'><a href='http://top.ruwab.com/index.php?uid=$uid'>Назад</a></div>n";
include "niz.php";
?>