Файл: news_index.php
Строк: 43
<?php
include 'mysql.php';
include 'include/sesi.php';
include_once("include/golova.php");
list($msec,$sec)=explode(chr(32),microtime());
$HeadTime=$sec+$msec;
//////////////////////
$file="MySql/base123/online.dat";
$lines=file("$file");
$online=count($lines);
/////////////////////
$online=round($online*9);
$novs = sizeof(file('MySql/base123/novs.dat'));
echo"Новостей -$novs<br/><hr>";
/////////////////////
$file = @file("MySql/base123/novs.dat");
$total=count($file);
$file = array_reverse($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 5){ $end = $total; }
else {$end = $start + 5; }
for ($i = $start; $i < $end; $i++){
$udata = explode("||",$file[$i]);
echo"<b>$udata[0]</b> [$udata[1]]<br/>$udata[2]<hr>";
}
if($total>0){
$ba=ceil($total/5);
$ba2=$ba*5-5;
$asd=$start-(5*3);
$asd2=$start+(5*4);
if($asd<$total && $asd>0){echo ' <a href="news_index.php?start=0&'.$sd.'">1</a> ... ';}
for($i=$asd; $i<$asd2;){
if($i<$total && $i>=0){
$ii=floor(1+$i/5);
if ($start==$i) {
echo ' <b>('.$ii.')</b>';
}else{
echo ' <a href="news_index.php?start='.$i.'&'.$sd.'">'.$ii.'</a>';
}}
$i=$i+5;}
if($asd2<$total){echo ' ... <a href="news_index.php?start='.$ba2.'&'.$sd.'">'.$ba.'</a>';}
}
echo"
<br/><a href="index.php?$sd">[Главная]</a><br/>";
echo'<a href="http://waplog.net/c.shtml?349409"><img src="http://c.waplog.net/349409.cnt" alt="waplog" /></a><br/>';
echo"<tr><td bgcolor="black" style="background-image: url(pic/exp.gif)" align="center">";
list($msec,$sec)=explode(chr(32),microtime());
echo "<font color="#ffffff"><b>[".round((($sec+$msec)-$HeadTime),4)."]</font>";
echo'</td></tr></table>
</body>
</html>
';
echo '</div><div class="foot">';
?>