<?
/*echo "<div class=\"title\">\n";
echo "СВЕЖа<font color=\"#20b2aa\">Ya</font> НоВоСт<font color=\"#20b2aa\">Ъ</font>";
echo "</div>\n";*/
$q43 = mysql_query("SELECT COUNT(id) FROM `$mysql[pref]news`;");
if (mysql_result($q43, 0)>0)
{



$q = mysql_query("SELECT * FROM `$mysql[pref]news` ORDER BY `time` DESC LIMIT 1;");
$news = mysql_fetch_array($q);

$q = mysql_query("SELECT * FROM `$mysql[pref]users` WHERE `nickname` = '$news[nick]' ORDER BY `level` DESC LIMIT 1;");
$news_creator = mysql_fetch_array($q);



$q = mysql_query("SELECT * FROM `$mysql[pref]forum_p` WHERE `id_f` = '$id_news_forum' AND `id_r` = '$id_news_razd' AND `id_t` = '$news[id_t]' ORDER BY `time` DESC LIMIT 1;");
$komm = mysql_fetch_array($q);
$komm['id_user'] = $komm['id_us'];


$q = mysql_query("SELECT COUNT(id) FROM `$mysql[pref]forum_p` WHERE `id_t` = '$news[id_t]';");


//echo "<img src=\"".BASEDIR."SYSTEM/themes/$them/img/news.gif\" alt=\"\" /> ";
echo "<font color=\"#20b2aa\"><b><a href=\"news/\">$news[title]</a></b></font><br />\n";

//echo "<b>Добавил <a href=\"info.php?id=$news_creator[id]\"><span style=\"color:$color[mess_nick]\">$news[nick]</span></a></b><br />\n";
//echo "<a href=\"info.php?id=$komm[id_user]\"><span style=\"color:$color[mess_nick]\">$komm[nick]</span></a>]</b><br />\n";


//echo "[<a href=\"forum/index.php?id_forum=$id_news_forum&amp;id_razd=$id_news_razd&amp;id_them=$news[id_t]\">".vremja($news['time']+$timesdvig)."</a>/<a href=\"forum/index.php?id_forum=$id_news_forum&amp;id_razd=$id_news_razd&amp;id_them=$news[id_t]&amp;page=end\">".vremja($komm['time']+$timesdvig)."</a>]<br />\n";
echo "<small>Обсудить <a href=\"forum/index.php?id_forum=$id_news_forum&amp;id_razd=$id_news_razd&amp;id_them=$news[id_t]\">".vremja($news['time']+$timesdvig)."</a> [".mysql_result($q, 0)."]</small><br />\n";



/*echo "<img src=\"".BASEDIR."SYSTEM/themes/$them/img/voice.gif\" alt=\"\" /> ";
echo "<a href=\"news/arhiv.php\">все новости>></a><br />\n";
*/
echo "<small>Новость просмотрели $news[times_read] ".plural_form($news['times_read'], "раз", "раза", "раз").".</small>\n";

}
?>