Файл: news/index.php
Строк: 39
<?
include_once('../apahe/ini.php');
$urlup='/news/index';
$inc['title'] = 'Новости';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
$news_s = mysql_fetch_assoc(mysql_query("SELECT * FROM `news-s` WHERE `id` = '1'"));
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `news`"), 0);
nav_start($total, $news_s[total]);
if ($total != 0){
$news_c = mysql_query("SELECT * FROM `news` ORDER BY `date` LIMIT $start, $news_s[total]");
while ($news = mysql_fetch_assoc($news_c)){
echo '<a class="main-href" href="news-'.int($news['id']).'.dll" title="'.$news['name'].'">';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
echo '<tr><td class="apa-l">';
icons('news');
echo ''.$news['name'].'';
echo '</td>';
echo '<td class="apa-r">';
echo '<time>'.vtime($news['date']).'</time>';
echo '</td></tr>';
echo '</table>';
echo '</a>';
}}else{
error('Новости еще не создавались.');
}
view_nav('/news/index.dll?');
include_once('../apahe/bottom.php');
?>