Просмотр файла visavi_top/index.php

Размер файла: 3.36Kb
<?
include "config2.php";	
$link=mysql_connect ($DB_HOST, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME);
if(!$o) $o = 'h';
if($o=='h') $arr=mysql_query("select * from users order by counthost desc;");
if($o=='hi') $arr=mysql_query("select * from users order by today desc;");
if($o=='a') $arr=mysql_query("select * from users order by allday desc;");

$i=mysql_num_rows($arr);

///////////////////////////////
while ($data=@mysql_fetch_array($arr))
{
if($cid==$data['id']) $start=count($ids);
$titles[] = $data['title'];
$links[] = $data['link'];
$ids[] = $data['id'];
$abouts[] = $data['about'];
$today[] = $data['today'];
$host[] = $data['counthost'];
$online[] = $data['online'];
$allday[] = $data['allday'];
$cin[] = $data['cin'];
$out[] = $data['out'];
}



///////////////////////////////
function go()
{$currHour=date("H",time());///////////   
$currDate=date("d F Y", time());
$curr=date("i:s", time());
$currTime=date("$currHour:i:s", time());
 $currDate = str_replace("January","Января",$currDate);
$currDate = str_replace("February","Февраля",$currDate);
$currDate = str_replace("March","Марта",$currDate);
$currDate = str_replace("April","Апреля",$currDate);
$currDate = str_replace("May","Мая",$currDate);
$currDate = str_replace("June","Июня",$currDate);
$currDate = str_replace("July","Июля",$currDate);
$currDate = str_replace("August","Августа",$currDate);
$currDate = str_replace("September","Сентября",$currDate);
$currDate = str_replace("October","Октября",$currDate);
$currDate = str_replace("November","Ноября",$currDate);
$currDate = str_replace("December","Декабря",$currDate); 

include "../top.php";
echo "<div class=\"blue\"><font color=\"#FF0000\">VISAVI.NET</font><br/></div><div>$currDate<br/><small>$currTime</small></div><div>";

print"<small>"; 
include"uch.php";
print"</small><hr/>";

};
/////////////////////////////////
function ending()
{
print "</div>
</body>
</html>";
};
/////////////////////////////////
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++)



	
if(!$today[$i]=="0")	
{

$n=$i+1;
if(5%$i!=0||$i==1) $br="<br/>"; 
print "<div class=a><div class=b><b><img src=\"star.gif\" alt=\"\"/> $n. </b><b><a href=\"out.php?sid=$ids[$i]\">$titles[$i]</a></b> <a href=\"inf.php?sid=$ids[$i]\"> [+]</a>";
print "<br/>Описание: $abouts[$i]";

print "<br/>Сегодня <br/>&#x445;&#x43E;&#x441;&#x442;&#x43E;&#x432;:<b> $host[$i]</b>";
print "<br/>&#x445;&#x438;&#x442;&#x43E;&#x432;:<b> $today[$i]</b>";
print "<br/>Всего:<b> $allday[$i]</b>";
print "<br/>in: <b>$cin[$i]</b> | out: <b>$out[$i]</b></div></div>";
}
echo"<hr/>";
if($count1>$start+5)
{
print "<br/><a href=\"index.php?start=".($start+5)."\">&#x414;&#x430;&#x43B;&#x435;&#x435;</a>";
}
if($start!=0)
{
print "<br/><a href=\"index.php?start=".($start0)."\">&#x412; &#x43D;&#x430;&#x447;&#x430;&#x43B;&#x43E;</a>";
}
print "<br/><a href=\"faq.php\">FAQ по счетчикам</a><br/><a href=\"predreg.php\">Регистрация</a><br/><a href=\"pro.php\">Профиль</a><br/><a href=\"http://visavi.net\">На главную</a><br/>";

list($msec,$sec)=explode(chr(32),microtime());
echo "</div><div align=\"center\"><img src=\"http://top.pizdec.ru/c.php?id=1&amp;img=2\" alt=\"\"/>";
ending();
mysql_close($link);
?>