Файл: ecscl_design/sys/fnc/aut.php
Строк: 118
<?
/*--Design by Sergej2015------------------------*/
/*--E-mail: Sergej.Pogrebnoj2015@gmail.com-----*/
//Скачано с waphp.ru by victorovich
function title()
{
global $user;
if (isset($user))
{
global $set;
if ($set['web'] == false)
{
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?><table class="aut_i" cellspacing="0" cellpadding="0"><tr><?
}
else
{
?><table class="aut" cellspacing="0" cellpadding="0"><tr><?
}
$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); // Почта
$lenta = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0); // Лента
$discuss = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$k_frend = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0); // Друзья
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
/*--Заголовок страницы--*/
?>
<td class="aut_01">
<span class='title'><?=$set['title']?></span>
<?
/*--Страничка--*/
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?>
<td class="aut_02">
<a href="/info.php?id=<?=$user['id']?>"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/user.png"/></center></a>
</td>
<?
}
else
{
/*--Домой--*/
?>
<td class="aut_02">
<a href="/"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/home.png"/></center></a>
</td>
<?
}
/*--Почта--*/
?><td class="aut_02"><?
if ($k_new != 0 && $k_new_fav == 0)
{
?><a href="/new_mess.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/mess.png"/><span class='aut_count'><?=$k_new?></span></center></a><?
}
else
{
?><a href="/konts.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/mess.png"/></center></a><?
}
?></td><?
/*--Друзья--*/
if ($k_frend > 0)
{
?>
<td class='aut_02'>
<a href="/user/frends/new.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/frends.png"/><span class='aut_count'><?=$k_frend?></span></center></a>
</td>
<?
}
/*--Лента--*/
if ($lenta > 0)
{
$j2 = 'tape';
}
elseif ($discuss > 0)
{
$j2 = 'discussions';
}
elseif ($k_notif > 0)
{
$j2 = 'notification';
}
else
{
$j2 = 'tape';
}
?>
<td class='aut_02'>
<a href="/user/<?=$j2?>/index.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/lenta.png"/>
<?
// Cкладываем сумму счетчиков
$k_l = $lenta + $k_notif + $discuss;
if($k_l > 0)
{
?>
<span class='aut_count'><?=$k_l?></span>
<?
}
?>
</center></a>
</td>
<?/*--Обновить--*/?>
<td class='aut_02'>
<a href="<?=text($_SERVER['REQUEST_URI'])?>"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/refresh.png"/></center></a>
</td>
</tr></table>
<?
}
}
else
{
global $set;
if ($set['web'] == false)
{
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?><table class="aut_i" cellspacing="0" cellpadding="0"><tr><?
}
else
{
?><table class="aut" cellspacing="0" cellpadding="0"><tr><?
}
/*--Заголовок страницы--*/
?>
<td class="aut_01">
<span class='title'><?=$set['title']?></span>
<?
/*--Просто иконка =)--*/
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?>
<?
}
else
{
/*--Домой--*/
?>
<td class="aut_02">
<a href="/"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/home.png"/></center></a>
</td>
<?
}
/*--Вход--*/
?>
<td class="aut_02">
<a href="/aut.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/aut.png"/></center></a>
</td>
<?
/*--Регистрация--*/
?>
<td class="aut_02">
<a href="/reg.php"><center><img src="/style/themes/<?=$set['set_them']?>/icons/aut/reg.png"/></center></a>
</td>
</tr></table>
<?
}
}
if ($_SERVER['PHP_SELF'] != '/index.php')
{
echo "<div style='height: 70px;'></div>";
}
}
?>