Просмотр файла darkworld/news.php

Размер файла: 0.98Kb
<?
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"<small><b>$udata[0]</b> [$udata[1]]<br/>$udata[2]</small><br/><br/>";
}

if ($start != 0) {echo "<small><a href=\"news.php?start=".($start - 5)."&amp;log=".$log."&amp;pas=".$pas."\">Назад</a> </small>";}

if ($total > $start + 5) {echo " <small><a href=\"news.php?start=".($start + 5)."&amp;log=".$log."&amp;pas=".$pas."\">Далее</a></small>";}


}else{echo"<small>&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x438;&#x43B;&#x438; &#x43B;&#x43E;&#x433;&#x438;&#x43D; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x435;&#x43D;!</small>";}

include_once"files/down.php";
?>