Файл: vk.com_vhllam/news/nowosti.php
Строк: 40
<?
$q=mysql_query("SELECT * FROM `news` WHERE `main_time` > '".time()."' ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q)==1 && !$set['web'] && $user['news_read']==0)
{
$news = mysql_fetch_assoc($q);
echo "<div class='news'>n";
echo "<img src='/style/icons/news_icons.png' alt='*' /> <a href='/news/news.php?id=$news[id]'>$news[title]</a>n";
echo "(".vremja($news['time']).")<br />n";
echo output_text($news['msg']).'<br />';
if ($news['link']!=NULL)
echo "<a href='".htmlentities($news['link'], ENT_QUOTES, 'UTF-8')."'>Подробности</a><br />n";
echo "<div class='lin'><img src='/style/icons/obcu.png' alt='*'><a href='/news/news.php?id=$news[id]'> Обсуждения</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = '$news[id]'"),0)."] | <a href='?news_read'><img src='/style/icons/news.srt.png' alt='*'> Скрыть</a></div></div>n";
}
?>