################# Шапка
if ($rights >= !$user_id)
{echo'<div class="header">';
echo '<div class="t">';
// Проверяем, есть ли новые письма
$countnew = mysql_result(mysql_query("SELECT COUNT(*) FROM `privat` WHERE `user` = '$login' AND `type` = 'in' AND `chit` = 'no'"), 0);
if ($countnew > 0) {
echo ($headmod != "mainpage" || ($headmod == 'mainpage' && $act)) ? "<a class='t_inbox' href='$home/str/pradd.php?act=in&new'><i></i>$countnew</a>" : '<a class="t search" href="' . $home . '/cab.php"><i></i></a>';
}else{
echo ($headmod != "mainpage" || ($headmod == 'mainpage' && $act)) ? '<a class="t mail" href="' . $home . '/str/pradd.php?act=in"><i></i></a>' : '<a class="t search" href="' . $home . '/cab.php"><i></i></a>';
}
echo '</div>';
echo'<div class="t">
<a class="t profil" href="' . $home . '/str/anketa.php"><i></i></a>
</div>';
echo '<div class="t">';
// Проверяем, есть ли новые письма
$countnew = mysql_result(mysql_query("SELECT COUNT(*) FROM `privat` WHERE `user` = '$login' AND `type` = 'in' AND `chit` = 'no'"), 0);
if ($countnew > 0) {
echo ($headmod != "mainpage" || ($headmod == 'mainpage' && $act)) ? '<a class="t center" href="' . $home . '">На главную</a>' :
"<a class='t center' href='$home/str/pradd.php?act=in&new'>$countnew Сообщения</a>";
}else{
echo ($headmod != "mainpage" || ($headmod == 'mainpage' && $act)) ? '<a class="t center" href="' . $home . '">На главную</a>' :
'<a class="t center" href="' . $home . '/str/pradd.php?act=in">Сообщения</a>';
}
echo '</div>';
echo '</div>';
}else{
echo '<div class="header">
<div class="t"><a class="t beka" href="' . $home . '/index.php"><i></i></a></div>
<div class="t"><a class="t login" href="' . $home . '/login.php"><i></i></a></div>
<div class="t"><a class="t center" href="' . $home . '/registration.php">Регистрация</a></div>
</div>';}
echo '<div class="loop">';
################################ Конец шапки
я поставил новую почту и нужно заменить в шапке
if($user_id) {
$out_msg = '';
$count_msg = mysql_result(mysql_query('SELECT COUNT(*) FROM `mail_msg` WHERE `id_kont`=' . $user_id . ' AND `sys`=1 AND `read`=1 AND `delete`!=' . $user_id . ' AND `spam`=1'), 0);
$count_training = mysql_result(mysql_query('SELECT COUNT(*) FROM `mail_msg` WHERE `id_kont`=' . $user_id . ' AND `sys`=4 AND `read`=1 AND `delete`!=' . $user_id . ' AND `spam`=1'), 0);
if($count_msg)
$out_msg = '<a href="' . $home . '/mess/index.php?act=dialogues">Вам ' . $count_msg . ' сообщение</a> ';
$count_sys_msg = mysql_result(mysql_query("SELECT COUNT(*) FROM `mail_msg` WHERE `id_kont`='" . $user_id . "' AND `read`=1 AND `sys`=2 AND `delete`!='" . $user_id . "'"), 0);
if($count_sys_msg)
$out_rass .= '<a href="' . $home . '/mess/index.php?act=systems">Рассылка ' . $count_sys_msg . '</a>';
if($out_msg)
echo '<div class="msg"><big>' . $out_msg . '</big></div>';
if($out_rass)
echo '<div class="msg"><big>' . $out_rass . '</big></div>';
if($count_training)
echo '<div class="h-title"><a href="' . $home . '/mess/index.php?act=training"><b><span style="color:red">Письма с лагеря ' . $count_training . '</span></b></a></div>';
}