Код панельки:
/*
-----------------------------------------------------------------
Выводим логотип и тд
-----------------------------------------------------------------
*/
if ($user_id) {
if ($headmod == 'mainpage') {
echo '<table cellspacing="0" cellpadding="0" width="100%"><tr>';
echo '<td width="95%" class="logo"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/images/logo.png" alt="В джоне" /></td>';
$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)
{
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php?act=systems" style="display:block;"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail_new.png" alt="@" /></a></td>';
} else {
$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)
{
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php?act=new" style="display:block"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail_new.png" alt="@" /></a></td>';
} else {
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php" style="display:block"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail.png" alt="@" /></a></td>';
}
}
echo '</tr></table>';
require_once ($rootpath . '/login_home.php');
} else {
echo '<table cellspacing="0" cellpadding="0" width="100%"><tr><td width="5%" class="logo2" style="text-align:center;"><a href="' . $set['homeurl'] . '" style="display:block;"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/m_logo.png" alt="В" /></a></td><td width="90%" style="text-align:center;" class="logo"><b>' . $textl . '</b></td>';
$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)
{
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php?act=systems" style="display:block;"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail_new.png" alt="@" /></a></td>';
} else {
$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)
{
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php?act=new" style="display:block"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail_new.png" alt="@" /></a></td>';
} else {
echo '<td width="5%" class="logo2" style="text-align:center;"><a href="' . $home . '/mail/index.php" style="display:block"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/mail.png" alt="@" /></a></td>';
}
}
echo '</tr></table>';
require_once ($rootpath . '/login_home.php');
}
} else {
if ($headmod == 'mainpage') {
echo '<div class="logo"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/images/logo.png" alt="В джоне" /></div>';
require_once ($rootpath . '/login_home.php');
} else {
echo '<table cellspacing="0" cellpadding="0" width="100%"><tr><td width="5%" class="logo2" style="text-align:center;"><a href="' . $set['homeurl'] . '" style="display:block;"><img src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] .
'/images/m_logo.png" alt="В" /></a></td><td width="95%" style="text-align:center;" class="logo"><b>' . $textl . '</b></td></tr></table>';
require_once ($rootpath . '/login_home.php');
}
}
А вот код на непрочитанное:
/*
-----------------------------------------------------------------
Ссылки на непрочитанное
-----------------------------------------------------------------
*/
if ($user_id) {
$list = array();
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">' . $lng['unread'] . ': ' . functions::display_menu($list, ', ') . '</div>';
}