Файл: s-klub/thems/s-klub_web_black/auter.php
Строк: 107
<?
echo "<div class='auter_f'>";
echo "<table><tr>";
echo "<td class='logo'>";
echo "<a href='/index.php'><img src='/s-klub/images/logo.png' alt='' /></a>";
echo "</td>";
echo "<td class='auter_m'>";
if (isset($user))
{
if ($user['pol'] == 1)
{
echo '<a href="/info.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/man.png" alt="" title="Личная страница" width="24" height="24"/></span></a>';
}else{
echo '<a href="/info.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/man2.png" alt="" title="Личная страница" width="24" height="24"/></span></a>';
}
$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);
if ($k_new!=0 && $k_new_fav==0)
{
echo '<a href="/new_mess.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/mail_plus.png" alt="" title="Входящие сообщения + '.$k_new.'" width="24" height="24"/><b>+'.$k_new.'</b></span></a>';
}
if ($k_new_fav!=0)
{
echo '<a href="/new_mess.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/mail-share.png" alt="" title="Входящие сообщения + '.$k_new_fav.'" width="24" height="24"/><b>'.$k_new_fav.'</b></span></a>';
}
if ($k_new==0 && $k_new_fav==0)
{
echo '<a href="/konts.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/mail.png" alt="" title="Контакты" width="24" height="24"/></span></a>';
}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `id_ank` = '".$user['id']."' AND `sogl` = '0' LIMIT 1"), 0) > 0)
{
$friends=mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `id_ank` = '".$user['id']."' AND `sogl` = '0'"), 0);
echo '<a href="/frends/new.php"><span class="auter_l"><img src="/s-klub/ank/frend_add.png" alt="" title="Предложения дружбы + '.$friends.'" width="24" height="24"/><b>'.$friends.'</b></span></a>';
}
echo '<a href="/umenu.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/umenu.png" alt="" title="Кабинет" width="24" height="24"/></span></a>';
$k_n_s_zak=mysql_result(mysql_query("SELECT COUNT(`forum_zakl`.`id_them`) FROM `forum_zakl` LEFT JOIN `forum_p` ON `forum_zakl`.`id_them` = `forum_p`.`id_them` AND `forum_p`.`time` > `forum_zakl`.`time` WHERE `forum_zakl`.`id_user` = '".$user['id']."' AND `forum_p`.`id` IS NOT NULL"),0);
if ($k_n_s_zak>0)
{
echo '<a href="/zakl.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/zakl.png" alt="" title="Сообщения в закладках + '.$k_n_s_zak.'" width="24" height="24"/><b>+'.$k_n_s_zak.'</b></span></a>';
}
$for=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal_forum` WHERE `id_user` = '$user[id]' AND `upset` = '1' AND `otkl` = '0' "), 0);
if ($for!=0)
{
echo '<a href="/jur_forum/jurnal_up.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/j-f-add.png" alt="" title="Извещений с форума - '.$for.'" width="24" height="24"/><b>+'.$for.'</b></span></a>';
}else{
echo '<a href="/jur_forum/jurnal_vse.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/j-f.png" alt="" title="Извещения с форума" width="24" height="24"/></span></a>';
}
echo '<a href="/exit.php"><span class="auter_l"><img src="/s-klub/thems/'.$set["set_them"].'/panel/exit.png" alt="" title="Покинуть сайт" width="24" height="24"/></span></a>';
}else{
echo "<a href='/aut.php'><span class='auter_l'><img src='/s-klub/thems/".$set['set_them']."/panel/aut.png' width='24' height='24'> <b>Авторизация</b></span></a>";
echo "<a href='/reg.php'><span class='auter_l'><img src='/s-klub/thems/".$set['set_them']."/panel/reg.png' width='24' height='24'> <b>Регистрация</b></span></a>";
}
echo "</td>";
echo "</tr></table>";
echo "</div>";
?>