Вход Регистрация
Файл: wap/inc/last_news.php
Строк: 20
<?php
include $DOCUMENT_ROOT.'/wap/inc/db/config.php';
#########################################################
if (empty($page)) $page = 0;
if (
$page < 0) $page = 0;
#########################################################
#########################################################
$count_query = 'select count(*) from news where 1 ;';
$total_mess = mysql_query ($count_query);
$total_count = mysql_fetch_array ($total_mess);
$count = $total_count ['count(*)'];
##########################################################
$query = 'select * from news where 1 ORDER BY `date` DESC  LIMIT '.$page.', '.$max_mess.';'; 
$result = mysql_query($query);
if (!
$result)
{
echo 
"Error! mysql_query".mysql_error();
exit;
}

echo 
"&#x0412;&#x0441;&#x0435;&#x0433;&#x043E; &#x041D;&#x043E;&#x0432;&#x043E;&#x0441;&#x0442;&#x0435;&#x0439;: ".$count;
$row_date = htmlspecialchars(mysql_result($result, $i, "date"));
$row_category = htmlspecialchars(mysql_result($result, $i, "category"));
$row_name = htmlspecialchars(mysql_result($result, $i, "name"));
$row_news = htmlspecialchars(mysql_result($result, $i, "news"));
echo 
"<br/>:::<br/>";
echo 
$row_date;
echo 
'<br/> ';
echo 
$row_news;
echo 
'<br/> ';
echo 
'&#x0414;&#x043E;&#x0431;&#x0430;&#x0432;&#x0438;&#x043B;:'.$row_name;
echo 
'<br/> ';
echo 
'<a href="/wap/mod/'.$row_category.'">&#x041F;&#x0435;&#x0440;&#x0435;&#x0439;&#x0442;&#x0438;</a>';
echo 
'<br/>:::<br/> ';
?>
Онлайн: 2
Реклама