File size: 3.04Kb
<?
/////////////////////////// разработка StarWap-Group ///////////////////////////////
Error_Reporting(E_ALL & ~E_NOTICE);
header("Content-type:text/vnd.wap.wml;charset=utf-8"); //////// тип и кодировка документа
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
<wml><card id=\"mas\" title=\"Top-online\"><p align=\"center\">";
$currDate=date("d", time());
$vsego = @implode("",@file("vsego.vr"));
$k=1;
$time=time();
$timeof=$time-500;
while($k<=$vsego)
{$mas = @implode("",@file("rekd/rekds=$k.dat"));
$mas=trim($mas);
$prdat = @implode("",@file("rekd/data=$k.dat"));
$prdat=trim($prdat);
if($prdat!=$currDate) {$mas="";}
if($mas==0) {$mas="";}
if($mas!=""){$elmas[$k]=$mas;}
$k=$k+1;
};
$m=1;
arsort($elmas);
foreach($elmas as $key => $val)
{
$elsort[$m]=$key; $sortpos[$m]=$val; if($key==$nc) {$tm=$m-2;} $m=$m+1;
}
$m=$m-1;
print"<small><b>Топ-статистика регистраций счётчиков</b><br/>
Всего регистаций: $vsego<br/>
Активных: $m</small><br/><br/>";
if($tm=="") {$tm=1;}
if($tm<=0) {$tm=1;}
$mk=$tm+6;
while($tm<$mk)
{if($elsort[$tm]!=""){$obsh=@implode("",@file("rekd/rekdo=$elsort[$tm].dat"));
$par=@file("konf/$elsort[$tm].konf");
$konf=explode(":||:",$par[0]);
$imja=trim($konf[0]);
$adres=trim($konf[1]);
$opis=trim($konf[2]);
$onfile="rekd/online=$elsort[$tm].dat";
$online = @implode("",@file("$onfile"));
$online=trim($online);
$ss = file("$onfile");
$strok = sizeof($ss);
$ns=0;
$ni=0;
while($ns < $strok)
{$inkl=@file("$onfile");
$unkl=explode("::",$inkl[$ns]);
$timepr=trim($unkl[0]);
if($timeof<$timepr) {$ni=$ni+1;}
$ns=$ns+1; }
print"
$tm. <b><a href=\"$adres\">$imja</a></b><br/>
<small>(рег. N$elsort[$tm]) </small><br/><small>
Онлайн: ";
if($ni>0) {print"<a href=\"online.php?on=$elsort[$tm]&tm=$tm\">$ni</a>";} else {print"$ni";}
print"</small><br/>* * * * *<br/>";} $tm=$tm+1;
};
if($tm<=$m) {print"<small><a href=\"index1.php?tm=$tm\">Далее</a><br/></small>";}
$prev=$tm-12;
if($tm>7) {print"<small><a href=\"index1.php?tm=$prev\">Назад</a><br/>
<a href=\"index1.php\">В начало</a><br/></small>";}
print "<br/><small><a href=\"http://starwap.ru\">starwap.ru</a><br/><a href=\"http://starwap.ru/on/online.php?on=1\"><img src=\"http://starwap.ru/on/counter1.php?nc=1\" alt=\"online\"/></a><br/>© starwap.ru</small></p></card></wml>";
?>