Файл: sys/fnc/aut.php
Строк: 67
<?
function title()
{
global $user;
if (isset($user))
{
global $set;
if ($set['web'] == false)
{
?><table style="width:100%" cellspacing="0" cellpadding="0"><tr><?
$k_new = mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_new_fav = mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0); // Почта
$lenta = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0); // Лента
$discuss = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$k_frend = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0); // Друзья
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
/*
=================================
Страничка
=================================
*/
if ($k_new != 0 && $k_new_fav == 0)
{
?>
<td class="auts">
<a href="/new_mess.php"><center><img src="/style/icons/mail-new.gif" alt="DS" /><font color="#9ACD32">(<?=$k_new?>)</font></center></a><?
}
if ($k_frend > 0)
{
?>
<td class='auts'>
<a href="/user/frends/new.php"><center><img src="/style/icons/group_link.gif" alt="DS" /><font color='red'>(<?=$k_frend?>)</font></center></a>
</td>
<?
}
/*
=================================
Почта
=================================
*/
?>
<td class="auts">
<a href="/index.php"><center><img src="/style/icons/home.gif" alt="DS" /></center></a>
</td>
<?
?>
<td class="auts"><?
{
?><a href="/umenu.php"><center><img src="/style/icons/door.gif" alt="S" /></center></a><?
}
/*
=================================
Лента
=================================
*/
?>
<td class='auts'>
<a href="/chat/"><center><img src="/style/icons/chat.gif" alt="DS" /> <font color="#9ACD32"><?=mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_who`"),0).' ';
/*
=================================
Друзья
=================================
*/
/*
=================================
Обновить
=================================
*/
?>
<td class='auts'>
<a href="/obmen/"><center><img src="/style/icons/files.gif" alt="DS" /></center></a>
</td>
</tr></table>
<?
}
}
}
?>