<?
echo "<div class='menu_razd'><img src='/icons/blk.png' alt='' /> <b>Информация</b></div>\n";
$strl="999";
$q=mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q)==1 && !$set['web'])
{
$news = mysql_fetch_assoc($q);
$hide=mysql_result(mysql_query("SELECT count(*) FROM `news_hide` WHERE nid='".$news['id']."' AND uid='".$user['id']."'"),0);
if($hide==0){

echo "<div class='news_index'>\n";
echo "<a href='/news/'><img src='/icons/nws.png' alt='' /> <b>$news[title]</b></a>\n";
echo "<font color='gray'>(".vremja($news['time']).")</font>\n";
echo "</div>\n";
echo "<div class='txt'>\n";
$xt=strlen($news['msg']);
$tx=substr($news['msg'],0,$strl);
$tx=output_text($tx);
if($xt>$strl){$txx="......";} else {$txx="";}
echo $tx.$txx."<br />\n";
if ($news['link']!=NULL)echo "<a href='".htmlentities($news['link'], ENT_QUOTES, 'UTF-8')."'>Подробности</a><br />\n";
echo "<img src='/icons/mnen.png' alt='' /> <a href='/news/komm.php?id=$news[id]'>Мнения</a> <font color='gray'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = '$news[id]'"),0).")</font>\n";
if (isset($user))
{
echo "<a href='/news/hide.php?id=$news[id]'/><img src='/icons/hide_news.png' alt='' align='right' /></a>";
}

echo "</div>\n";
echo "</div>\n";
}
else{
 echo '<div class="main_menu"><img src="/icons/nws.png" alt="" /> <a href="/news/">Новости</a> (';include_once 'news/count.php';echo ')</div>';
}
}
?>