Файл: public_html/sys/inc/news_main.php
Строк: 25
<?
$q=mysql_query("SELECT * FROM `news` WHERE `main_time` > '".time()."' ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q)==1 && !$set['web'])
{
$news = mysql_fetch_assoc($q);
echo "<div class='news'>n";
echo "<div class='p_t'>n";
echo "<img src='/news/img/rss.png'/> ".htmlspecialchars($news['title'])."n";
echo " (".vremja($news['time']).")n";
echo "</div>n";
echo "<div class='p_m'>n";
echo "<a href='/news/?new=$news[id]'>Обсудить</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = '$news[id]'"),0).")<br />n";
echo "</div>n";
echo "</div>n";
}
?>