Файл: DarkAge/news.php
Строк: 16
<?
include_once("files/zag.php");
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
$file = @file("data/news.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 '<div id="menu"><div id="line"><b>'.$udata[0].'</b></div> ['.$udata[1].']<br/><i>'.$udata[2].'</i><br/></div>';
}
if ($start != 0) {echo "<a href="news.php?start=".($start - 5)."&log=".$log."&pas=".$pas."">Назад</a> ";
}
if ($total > $start + 5) {echo " <a href="news.php?start=".($start + 5)."&log=".$log."&pas=".$pas."">Далее</a>";}
echo '<a href="javascript:history-back(1)"><b>Назад</b></a><br />';
}else{echo"Пароль или логин неверен!";}
include_once"files/down.php";
?>