<?




function title($title=NULL)
{

global $set;
global $user;


$title=$set['title'];

echo '<div class="rekl"> ';
rekl(1);

//// $c = 1; // кол-во выводимой рекламы
echo "</div></div>\n";
if (isset($user)){

$knm=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($knm>0)echo "<img src='/img/img/pochta.png' alt=''/> <a href=\"/mail.php\" title=\>Вам SMS-ka <font color='#FF0000'> +$knm</font></a><br/>\n";

$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($nj>0)echo "<img src='/img/tabor/bell.png' alt=''/> <a href=\"/jurnal.php\">Журнал <font color='#FF0000'>+$nj</font></a><br/>\n";


$lenta = mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
if($lenta>0) echo "<img src='/img/tabor/4gif.gif' alt=''/> <a href='/lenta.php'>Лента <b>+$lenta</b></a><br/>";

$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `notspam` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($nj>0)echo "<img src='/img/tabor/bell.png' alt=''/> <a href=\"/spamer.php\" title=\"Журнал\">Спам (+$nj)</a><br/>\n";


$bcomm=mysql_result(mysql_query("SELECT COUNT(*) FROM `blogs_comments` WHERE `bautor_id` = '$user[id]' AND `read` = '0'"), 0);
if ($bcomm>0)echo "<img src='img/tabor/pen.gif' alt=''/> <a href=\"/b_comm.php\">Комментарии дневнике <font color='#FF0000'> +$bcomm</font></a><br />";
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"), 0) > 0)

{
echo '<img src="/img/tabor/add_frends.gif" alt=""/> <a href="/frend_new.php">Предложение дружбы</a><br />';
}

$k_n_s_zak=0;
$q23=mysql_query("SELECT `id_them`, `time` FROM `forum_zakl` WHERE `id_user` = '$user[id]'");
while ($zakl = mysql_fetch_array($q23))
{
$k_n_s_zak+=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `id_them` = '$zakl[id_them]' AND `time` > '$zakl[time]'"),0);

}
if ($k_n_s_zak>0)echo "<img src='/img/tabor/forum.gif' alt=''/> <a href=\"/zakl.php\">Сообщения в закладках ($k_n_s_zak)</a><br/>";
}
$msgfotokom="Обитатель $user[nick] Комментируют фото [b]$foto[name][/b] в вашем альбоме [b]$gallery[name][/b]: ".mysql_real_escape_string($msg)."";
}







?>