Эрудит,может даже то не строка 18 я точно не знаю вот весь код <?
/**/
$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); // Почта
/**/
$ocenky = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_rating` WHERE `avtor` = '$user[id]' AND `read`='1'"
,0);
/**/
$new_g = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "
,0); // Обсуждения
/**/
$k_l = mysql_result(mysql_query("SELECT COUNT(*) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0'"
,0);
/**/
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"
, 0); // Уведомления
/**/
$new_gu = mysql_result(mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `id_ank` = '$user[id]' AND `read`='1'"
,0);
/**/
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?>
<div id="head">
<?echo "<a id='logo' href='/'><span>".$set['title']."</span></a>";?>
</div>
<?
} else {
?><table id='head' style="width:100%" cellspacing="0" cellpadding="0"><tr><?
echo "<td id='lo'><a href='/'><img src='/style/icons/logo_head.png'></a></td>";
/*
=================================
Оповещения
=================================
*/
if($k_notif > 0)
{
echo "<td id='lgo'><a href='/user/notification/index.php'><img src='/style/icons/notif_head.png' alt='*' /><span class='count'>+$k_notif</span></a></td>";
} else {
$k_f = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"
, 0);
if ($k_f > 0)
echo " <td id='lgo'><a href='/user/frends/new.php'><img src='/style/icons/notif_head.png' alt='*' /><span class='count'>+$k_f</span></a></td>";
}
/*
=================================
Почта
=================================
*/
if ($k_new != 0 && $k_new_fav == 0)
{
echo "<td id='lgo'><a href='/new_mess.php'><img src='/style/icons/pochta_head.png' alt='Почта' /><span class='count'>+$k_new</span></a></td>";
}
/*
=================================
Обсуждения
=================================
*/
if($new_g!=0)
{
echo "<td id='lgo'><a href='/user/discussions/index.php'><img src='/style/icons/discussions_head.png'><span class='count'>+$new_g</span></a></td>";
}
/*
=================================
Лента
=================================
*/
if($k_l!=0) {
echo "<td id='lgo'><a href='/user/tape/'><img src='/style/icons/lenta_head.png'><span class='count'>+$k_l</span></a></td>";
}
/*
=================================
Гости
=================================
*/
if($new_gu != 0)
{
echo "<td id='lgo'><a href='/user/myguest/index.php'><img src='/style/icons/guests_head.png' alt='Гости' /><span class='count'>+$new_gu</span></a></td>";
}
/*
=================================
Оценки
=================================
*/
if($ocenky != 0)
{
echo "<td id='lgo'><a href='/user/info/ocenky.php'><img src='/style/icons/ocenky_head.png' alt='Оцнеки' /><span class='count'>+$ocenky</span></a></td>";
}
/*
=================================
Конец
=================================
*/
?></td></tr></table><?
}
?>