Файл: mydcms.tk/sys/inc/news_main.php
Строк: 31
<?
$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 "<table class='post'><tr><td class='icon14'>
<img src='/style/icons/mini_news.png'></td>
<td class='p_t'>
$news[title]</a> (".vremja($news['time']).")</td>
</tr></table>";
echo "<div class='wm'>n";
echo output_text($news['msg'])."<br />n";
echo "</div>n";
echo "<div class='wm'>n";
if ($news['link']!=NULL)echo "<a href='".htmlentities($news['link'], ENT_QUOTES, 'UTF-8')."'>Обсудить</a><br />n";
echo "<img src='/style/icons/obs.png'> <a href='/news/komm.php?id=$news[id]'>Обсудить</a> | <a href='/news/'>Архив</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `news` ",$db), 0)."]<br />n";
echo "</div>n";
}
?>