File size: 1.39Kb
<?
$start_time = microtime();
$start_array = explode(" ",$start_time);
$start_time = $start_array[1] + $start_array[0];
header("Cache-Control: no-cache");
include "xconf.php";
$title="Hoвocти";
include "header.php";
print $begin;
$kolich_adm=10;
$res=mysql_query("select * from `news` order by `id` desc");
$kol=mysql_num_rows($res);
If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;
}else $page=$_GET['page'];
echo "$p_l $sm $d_fl";
for ($i=($page-1)*$kolich_adm;$i<($kolich_adm*$page);$i++){
If ($i>=$kol) break;
$n=mysql_result($res,$i,"id");
$title=mysql_result($res,$i,"title");
$data=date("d.m.Y ","$title()");
$time=date("H:i","$title()");
$times="$data $time";
$mess=mysql_result($res,$i,"mess");
$ress=mysql_query("select * from `news_komm` where n='$n'");
$kols=mysql_num_rows($ress);
echo "$d_msl $d_qq $uu<b>$times</b>$ue<br/>$d_e
$mess<br/>$d_e-----<br/>";
}
If ($page>1) { $pagep=$page-1; echo "
<a href=\"news.php?page=$pagep&ver=$ver\">Haзaд</a><br/>"; }
If ((ceil($kol/$kolich_adm))>$page) { $page++; echo "
<a href=\"news.php?page=$page&ver=$ver\">Дaльшe</a><br/>";}
echo "<br/><a href=\"index.php?ver=$ver\">Ha глaвнyю</a><br/><br/> $sme";
@include "ber.php";
print $endpage;
?>