Файл: sys/inc/main_menu.php
Строк: 129
<?php
$rekl = mysql_result(mysql_query("SELECT COUNT(*) FROM `rekl` WHERE `sel` = '2'"), 0);
if ($rekl > 0) {
echo "<div class = 'rekl'>";
rekl(2);
echo "</div>";
}
echo "<a href = '/menu.php'>";
echo "<div class = 'razd'>";
echo "<span class = 'icon icon176'></span> <b><font color = 'green'>К разделам</font></b> ";
echo "</div></a>";
$mail = mysql_result(mysql_query("SELECT COUNT(DISTINCT `mail`.`id_user`) 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 = 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);
if ($k_new == 0) {
$k_new = "";
} else {
$k_new = "<span class = 'count'>" . 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) . "</span>";
}
echo "<a href = '/mails.php'>";
echo "<div class = 'razd'>";
echo "<span class = 'icon icon125'></span> Мои сообщения $k_new</div></a>";
echo "<a href = '/user/blacklist/'>";
echo "<div class = 'razd'>";
echo "<span class = 'icon icon35'></span> Мой черный список</div></a>";
if (isset($user)) {
$friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends_new` WHERE `to` = '$user[id]'"), 0);
if ($friends == 0) {
$friends = "";
} else {
$friends = "<span class = 'count'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `friends_new` WHERE `to` = '$user[id]'"), 0) . "</span>";
}
echo "<a href = '/user/friends/'>";
echo "<div class = 'razd'><span class = 'icon icon127'></span> Мои друзья ";
echo "$friends";
echo "</div></a>";
$new_g = mysql_result(mysql_query("SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = '$user[id]' AND `read` = '1'"), 0);
if ($new_g == 0) {
$new_g = "";
} else {
$new_g = "<span class = 'count'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = '$user[id]' AND `read` = '1'"), 0) . "</span>";
}
echo "<a href = '/user/guests.php'>";
echo "<div class = 'razd'><span class = 'icon icon84'></span> Мои гости ";
echo "$new_g";
echo "</div></a>";
echo "<a href = '/foto/$user[id]/'>";
echo "<div class = 'razd'><span class = 'icon icon147'></span> Мои фотографии ";
echo "</div></a>";
$notification = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_kont` = '$user[id]' AND `read` = '0' "), 0);
if ($notification == 0) {
$notification = "";
} else {
$notification = "<span class = 'count'>" . mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_kont` = '$user[id]' AND `read` = '0' "), 0) . "</span>";
}
echo "<a href = '/user/notification.php'>";
echo "<div class = 'razd'><span class = 'icon icon42'></span> Мои уведомления ";
echo "$notification";
echo "</div></a>";
echo "<a href = '/info.php?id=$user[id]'>";
echo "<div class = 'razd'><span class = 'icon icon144'></span> Моя стена ";
echo "</div></a>";
echo "<a href = '/user/bookmark/'>";
echo "<div class = 'razd'><span class = 'icon icon22'></span> Закладки ";
echo "</div></a>";
echo "<a href = '/diary/?id=$user[id]'>";
echo "<div class = 'razd'><span class = 'icon icon60'></span> Мои дневнеки ";
echo "</div></a>";
echo "<a href = '/pages/search/'>";
echo "<div class = 'razd'><span class = 'icon icon198'></span> Поиск ";
echo "</div></a>";
}