Размер файла: 817B
<?
$q=mysql_query("SELECT * FROM `news` WHERE `main_time` > '".time()."' ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q)==1)
{
$news = mysql_fetch_assoc($q);
?>
<table class='table_block2' cellspacing="0" cellpadding="0">
<tr>
<td class='m1'>
<a href='/news/'><?echo $news['title'];?></a>
</td>
</tr>
<tr>
<td class='m2'>
<div class='news'>
<?
echo trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($news['msg'])))))))."<br />\n";
if ($news['link']!=NULL)echo "<a href='$news[link]'>Подробности</a><br />\n";
echo "<a href='/news/komm.php?id=$news[id]'>Комментарии</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = '$news[id]'"),0).")<br />\n";
?>
</div>
</td>
<tr>
<td class='m3'>
</td>
</tr>
</table>
<?
}
?>