вот код хеада который нужно вставить правельно
[code] /*
-----------------------------------------------------------------
Ссылки на непрочитанное
-----------------------------------------------------------------
*/
if ($user_id) {
$list = array();
$new_sys_mail = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `cms_mail` WHERE `from_id`=\'$user_id\' AND `read`=\'0\' AND `sys`=\'1\' AND `delete`!=\'$user_id\';\"
, 0);
if ($new_sys_mail) $list[] = \'<a href=\"\' . $home . \'/mail/index.php?act=systems\">Система</a> (+\' . $new_sys_mail . \')\';
$new_mail = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `cms_mail` LEFT JOIN `cms_contact` ON `cms_mail`.`user_id`=`cms_contact`.`from_id` AND `cms_contact`.`user_id`=\'$user_id\' WHERE `cms_mail`.`from_id`=\'$user_id\' AND `cms_mail`.`sys`=\'0\' AND `cms_mail`.`read`=\'0\' AND `cms_mail`.`delete`!=\'$user_id\' AND `cms_contact`.`ban`!=\'1\' AND `cms_mail`.`spam`=\'0\'\"
, 0);
if ($new_mail) $list[] = \'<a href=\"\' . $home . \'/mail/index.php?act=new\">\' . $lng[\'mail\'] . \'</a> (+\' . $new_mail . \')\';
if ($datauser[\'comm_count\'] > $datauser[\'comm_old\']) $list[] = \'<a href=\"\' . core::$system_set[\'homeurl\'] . \'/users/profile.php?act=guestbook&user=\' . $user_id . \'\">\' . $lng[\'guestbook\'] . \'</a> (\' . ($datauser[\'comm_count\'] - $datauser[\'comm_old\']) . \')\';
$new_album_comm = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = \'\" . core::$user_id . \"\' AND `unread_comments` = 1\"
, 0);
if($new_album_comm) $list[] = \'<a href=\"\' . core::$system_set[\'homeurl\'] . \'/users/album.php?act=top&mod=my_new_comm\">\' . $lng[\'albums_comments\'] . \'</a>\';
if (!empty($list)) echo \'<div class=\"rmenu\"><img src=\"\' . $set[\'homeurl\'] . \'/theme/\' . $set_user[\'skin\'] . \'/images/letter.png\" alt=\"\"/>\' . $lng[\'unread\'] . \': \' . functions::display_menu($list, \', \') . \'</div>\';[/code]