File size: 0.99Kb
<?php
require_once "../system/connect.php";
require_once "../system/config.php";
require_once "../system/functions.php";
require_once "../system/dannuser.php";
require_once "../system/start.php";
echo '<title>новости</title>';
if(empty($_GET['start'])) { $start=0; }
else { $start=$_GET['start']; }
$totalnews=mysql_query("SELECT COUNT(*) FROM `news`;");
$countnews=mysql_result($totalnews,0);
$q=mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT $start,$num;");
while($v=mysql_fetch_array($q)) {
echo "Добавил: $v[login]/";
if($v['date']==$date) { echo "сегодня<br>"; }
else { echo "$v[date]<br>"; }
echo "Тема: $v[tema]<br>";
echo "Текст: $v[news]<br><br>"; }
if($start!=0) { echo '<a href="index.php?start='.($start-$num).'">Назад</a>'; } else { echo "Назад"; }
echo " | ";
if($countnews>$start+$num) { echo '<a href="index.php?start='.($start+$num).'">Далее</a><br>'; } else { echo "Далее"; }
require_once "../foot.php";
?>