View file topca/top/index2.php

File size: 3.26Kb
<?
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 where category=2 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\">MotoForum</font><br/></div><div>$currDate<br/><small>$currTime</small></div><div>";
print"<small>";
include"ach2.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/>хостов:<b> $host[$i]</b>";
print "<br/>хитов:<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=\"index2.php?start=".($start+5)."\">Далее</a>";
}
if($start!=0)
{
print "<br/><a href=\"index2.php?start=".($start0)."\">В начало</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://ruinter.net.ru\">На главную</a><br/>";
list($msec,$sec)=explode(chr(32),microtime());

ending();
mysql_close($link);
?>