View file on/index1.php

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>&#x422;&#x43E;&#x43F;-&#x441;&#x442;&#x430;&#x442;&#x438;&#x441;&#x442;&#x438;&#x43A;&#x430; &#x440;&#x435;&#x433;&#x438;&#x441;&#x442;&#x440;&#x430;&#x446;&#x438;&#x439; &#x441;&#x447;&#x451;&#x442;&#x447;&#x438;&#x43A;&#x43E;&#x432;</b><br/>

&#x0412;&#x0441;&#x0435;&#x0433;&#x043E; &#x0440;&#x0435;&#x0433;&#x0438;&#x0441;&#x0442;&#x0430;&#x0446;&#x0438;&#x0439;: $vsego<br/>
&#x0410;&#x043A;&#x0442;&#x0438;&#x0432;&#x043D;&#x044B;&#x0445;: $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>(&#x0440;&#x0435;&#x0433;. N$elsort[$tm]) </small><br/><small>
	&#x041E;&#x043D;&#x043B;&#x0430;&#x0439;&#x043D;: "; 
	if($ni>0) {print"<a href=\"online.php?on=$elsort[$tm]&amp;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\">&#x0414;&#x0430;&#x043B;&#x0435;&#x0435;</a><br/></small>";}

$prev=$tm-12;
if($tm>7) {print"<small><a href=\"index1.php?tm=$prev\">&#x041D;&#x0430;&#x0437;&#x0430;&#x0434;</a><br/>
<a href=\"index1.php\">&#x0412; &#x043D;&#x0430;&#x0447;&#x0430;&#x043B;&#x043E;</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/>&#169; starwap.ru</small></p></card></wml>";
?>