Файл: news/news.php
Строк: 67
<?
include_once('../apahe/ini.php');
$news = mysql_fetch_assoc(mysql_query("SELECT * FROM `news` WHERE `id` = '".int($_GET['id'])."'"));
$urlup='/news/index';
$inc['title'] = ''.$news['name'].'';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if (!$news){
header ('location: /news/index.dll');
exit;
}
echo '<div class="main-text">';
echo '<a href="index.dll" title="Новости">Новости</a>';
echo '</div>';
echo '<div class="main-href">';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
echo '<tr><td class="apa-l">';
icons('news');
echo '<name>'.$news['name'].'</name> ';
echo '</td>';
echo '<td class="apa-r">';
echo '<time>'.vtime($news['date']).'</time>';
echo '</td></tr>';
echo '</table>';
echo ''.out($news['message']).'</br>';
echo 'С уважением <a href="/id-'.int($news['id-apache']).'.dll" title="'.name($news['id-apache']).'">'.name($news['id-apache']).'</a>';
echo '</div>';
echo '<a class="main-href" href="message-'.int($news['id']).'.dll" title="Обсудить новость">';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
echo '<tr><td class="apa-l">';
icons('news');
echo 'Обсудить новость';
echo '</td>';
echo '<td class="apa-r">';
$news_m = mysql_result(mysql_query("SELECT COUNT(*) FROM `news-m` WHERE `id-news` = '".int($news['id'])."'"), 0);
$news_m_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `news-m` WHERE `id-news` = '".int($news['id'])."' and `date` > '".(time()-86400)."'"), 0);
echo '<time>'.$news_m.'';
if ($news_m_new!=0)echo '<new>+'.$news_m_new.'</new>';
echo '</time>';
echo '</td></tr>';
echo '</table>';
echo '</a>';
include_once('../apahe/bottom.php');
?>