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

Размер файла: 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&#x0432;oc&#x0442;&#x0438;";
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&amp;ver=$ver\">Ha&#x0437;a&#x0434;</a><br/>"; }
If ((ceil($kol/$kolich_adm))>$page) { $page++;    echo "

<a href=\"news.php?page=$page&amp;ver=$ver\">&#x0414;a&#x043B;&#x044C;&#x0448;e</a><br/>";}

echo "<br/><a href=\"index.php?ver=$ver\">Ha &#x0433;&#x043B;a&#x0432;&#x043D;y&#x044E;</a><br/><br/> $sme";
@include "ber.php";
 print $endpage;


?>