Файл: eventnews_index.php
Строк: 52
<?php
include_once("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);
echo'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta forua="true" http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate"/><title>Lineage2</title></head>
<link rel="stylesheet" href="img/style.css" type="text/css" />
<center>
';
$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="eventnews_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="eventnews_index.php?start='.$i.'&'.$sd.'">'.$ii.'</a>';
}}
$i=$i+5;}
if($asd2<$total){echo ' ... <a href="eventnews_index.php?start='.$ba2.'&'.$sd.'">'.$ba.'</a>';}
}
echo"<hr>";
echo"<b><a href="index.php?$sd">На главную</a></b><br/>";
echo"<hr>";
echo '©darkl2.Ru, 2011<br/>';
echo"".date("H:i:s")."<br/>";
?>