Просмотр файла top/inf.php

Размер файла: 3.57Kb
<?
include "config2.php";

list($msec,$sec)=explode(chr(32),microtime()); 
$HeadTime=$sec+$msec;		

$linkk=mysql_connect($DB_HOST, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME);

$arr=mysql_query("select * from users where id='".$sid."'");
$i=mysql_num_rows($arr);
///////////////////////////////
$data=mysql_fetch_array($arr);

if($sid==$data['id']) $start=count($ids);
$title = $data['title'];
$link = $data['link'];
$id = $data['id'];
$about = $data['about'];
$today = $data['today'];
$den1 = $data['yesterday'];
$den2 = $data['bef1yes'];
$den3 = $data['bef2yes'];
$host1 = $data['1host'];
$host2 = $data['2host'];
$host3 = $data['3host'];
$all = $data['allday'];
$host = $data['counthost'];
$online = $data['online'];
//

if ($den3!=0 && $den2!=0 & $den1!=0) 
{
$mid=($den1+$den2+$den3)/3;
}

elseif ($den3==0 && $den2==0) 
{
$mid=$den1;
}

elseif ($den1==0 && $den2==0) 
{
$mid=$den3;
}

elseif ($den1==0 && $den3==0) 
{
$mid=$den2;
}

elseif ($den3==0) 
{
$mid=($den1+$den2)/2;
}

elseif ($den2==0) 
{
$mid=($den1+$den3)/2;
}

elseif ($den1==0) 
{
$mid=($den2+$den3)/2;
}

$mid=round($mid,2);

//
if ($host3!=0 && $host2!=0 & $host1!=0) 
{
$hmid=($host1+$host2+$host3)/3;
}

elseif ($host3==0 && $host2==0) 
{
$hmid=$host1;
}

elseif ($host1==0 && $host2==0) 
{
$hmid=$host3;
}

elseif ($host1==0 && $host3==0) 
{
$hmid=$host2;
}

elseif ($host3==0) 
{
$hmid=($host1+$host2)/2;
}

elseif ($host2==0) 
{
$hmid=($host1+$host3)/2;
}

elseif ($host1==0) 
{
$hmid=($host2+$host3)/2;
}

$hmid=round($hmid,2);

///////////////////////////////
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
///////////////////////////////
function go()
{
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">";
include "config3.php";
print "<wml>
<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>
<card title=\"$topic\">
<p>";
};
/////////////////////////////////
function ending()
{
print "</p>
</card>
</wml>";
};
/////////////////////////////////
go();
$count=$i;
$count1=$count;
if(empty($start))
$start=0;
$start=intval($start);
if($start<0)
$start=0;
if($count>$start+5) $count=$start+5;
for($i=$start;$i<$count;$i++)
{
$n=$i+1;
print "<small>$title<br/>";
print "<b>ID:</b> $id<br/>";
print "<b>&#x418;&#x43D;&#x444;&#x430;:</b> $about<br/>";
print "<b>Url:</b> <a href=\"out.php?id=$id\">$link</a><br/>";

print"<table columns='6' align='LL'><tr>
<td><b>;-)</b></td>
<td><b>В среднем</b></td>
<td><b>Сегодня</b></td>
<td><b>1 &#x434;&#x435;&#x43D;&#x44C; &#x43D;&#x430;&#x437;&#x430;&#x434;</b></td>
<td><b>2 &#x434;&#x43D;&#x44F; &#x43D;&#x430;&#x437;&#x430;&#x434;</b></td>
<td><b>3 &#x434;&#x43D;&#x44F; &#x43D;&#x430;&#x437;&#x430;&#x434;</b></td>
</tr><tr>
<td><b>Хосты</b></td>
<td>$hmid</td>
<td>$host</td>
<td>$host1</td>
<td>$host2</td>
<td>$host3</td>
</tr><tr>
<td><b>Хиты</b></td>
<td>$mid</td>
<td>$today</td>
<td>$den1</td>
<td>$den2</td>
<td>$den3</td>
</tr>
</table>";
print "<br/><b>Всего:</b> $all";
print "<br/></small>";
}
print "<br/><a href=\"index.php?cid=$sid\">&#x41D;&#x430;&#x437;&#x430;&#x434; &#x432; &#x440;&#x435;&#x439;&#x442;&#x438;&#x43D;&#x433;</a>";
include "config3.php";
print "<br/><a href=\"$sait\">&#169; $name</a><br/>";
list($msec,$sec)=explode(chr(32),microtime());
echo "<small>[".round(($sec+$msec)-$HeadTime,4)."]</small>";
ending();
mysql_close($linkk);
?>