View file top-elena/24.php

File size: 1.7Kb
<?
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
@include "config.php";
$uid=$_GET['uid'];
$uid=@mysql_escape_string($uid);

?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card title="&#x423;&#x43D;&#x438;&#x43A;&#x430;&#x43B;&#x44C;&#x43D;&#x44B;&#x435; &#x43F;&#x43E;&#x441;&#x435;&#x442;&#x438;&#x442;&#x435;&#x43B;&#x438;">
<p align="left">
<?
echo "IP &#x430;&#x434;&#x440;&#x435;&#x441;  |   <b>&#x411;&#x440;&#x430;&#x443;&#x437;&#x435;&#x440;</b>";
//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 "<br/>";
if ($page>1){
				$prev=$page-1;
				echo "<a href='24.php?uid=$uid&amp;page=$prev'>&#x41F;&#x440;&#x435;&#x434;.</a> ";
			}
			else echo "&#x41F;&#x440;&#x435;&#x434;.";
			echo " | ";
			if (!($page>=$i)){
				$next=$page+1;
				echo "<a href='24.php?uid=$uid&amp;page=$next'>&#x421;&#x43B;&#x435;&#x434;.</a>";
			}
			else echo "&#x421;&#x43B;&#x435;&#x434;.";

echo "<br/><br/><a href=\"./top.php?uid=$uid\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a>\n";
echo "<br/><a href=\"http://elena.nsk.ru\">elena.nsk.ru</a>\n";
?>

</p>
</card>
</wml>