Файл: setk/sys/fnc/aut.php
Строк: 215
<?
function title(){
global $user,$set;
$test=array
(
array('d67c7c','8e5252','ce8686','a36161'),
array('d69a7c','8e6652','ce9e86','a37761'),
array('d6b87c','8e7a52','ceb686','a38d61'),
array('d6d67c','8e8e52','cece86','a3a361'),
array('b8d67c','7a8e52','b6ce86','8da361'),
array('9ad67c','668e52','9ece86','77a361'),
array('7cd67c','528e52','86ce86','61a361'),
array('7cd69a','528e66','86ce9e','61a377'),
array('7cd6b8','528e7a','86ceb6','61a38d'),
array('7cd6d6','528e8e','86cece','61a3a3'),
array('7cb8d6','527a8e','86b6ce','618da3'),
array('7c9ad6','52668e','869ece','6177a3'),
array('7c7cd6','52528e','8686ce','6161a3'),
array('9a7cd6','66528e','9e86ce','7761a3'),
array('b87cd6','7a528e','b686ce','8d61a3'),
array('d67cd6','8e528e','ce86ce','a361a3'),
array('d67cb8','8e527a','ce86b6','a3618d'),
array('d67c9a','8e5266','ce869e','a36177'),
array('b2b2b2','4c4c4c','afafaf','939393'),
array('cccccc','666666','c9c9c9','adadad'),
array('e5e5e5','7f7f7f','e2e2e2','c6c6c6'),
array('995858','512f2f','825454','5b3737'),
array('996e58','513a2f','826354','5b4337'),
array('998358','51462f','827254','5b4f37'),
array('999958','51512f','828254','5b5b37'),
array('839958','46512f','728254','4f5b37'),
array('6e9958','3a512f','638254','435b37'),
array('589958','2f512f','548254','375b37'),
array('58996e','2f513a','548263','375b43'),
array('589983','2f5146','548272','375b4f'),
array('589999','2f5151','548282','375b5b'),
array('588399','2f4651','547282','374f5b'),
array('586e99','2f3a51','546382','37435b'),
array('585899','2f2f51','545482','37375b'),
array('635482','43375b','6e5899','3a2f51'),
array('835899','462f51','725482','4f375b'),
array('995899','512f51','825482','5b375b'),
array('995883','512f46','825472','5b374f'),
array('99586e','512f3a','825463','5b3743'),
array('666666','000000','636363','474747'),
array('7f7f7f','191919','7c7c7c','606060'),
array('999999','333333','969696','7a7a7a')
);
if (!isset($user))
{
$test[$user['panel']][0]='7c9ad6';
$test[$user['panel']][1]='52668e';
$test[$user['panel']][2]='869ece';
$test[$user['panel']][3]='6177a3';
$per='6780b2';
}
else $per=$user['panel_style'];
?>
<style>
.panelD {
position:relative;
background:#<?echo $per;?>;
background:#<?echo $test[$user['panel']][0].';'?>);
}
.footer{
padding:8px;
color:#fff;
text-align:center;
background:#<?echo $test[$user['panel']][0].';'?>);
}
.footer a{
color:#fff;
}
a.panel_link {
display:block;
text-align:center;
transition:0.5s;
height:28px;
}
a.panel_link:hover{
background:#<?echo $per;?>;
}
.text {
color:#3196BD;
text-decoration:none;
font-size:small;
}
#panel_n table a{
}
.ncount {
border-radius: 10px 0px;
padding: 1px 4px 4px 4px;
float: right;
color: #fff;
background: white;
}
.time {
padding:3px;
background:#d0d2d6;
border-left:1px solid #cccaca;
border-right:1px solid #cccaca;
border-bottom:1px solid #b3b3b3;
font-size:small;
text-align:right;
color:#000000;
}
.icon{
margin-bottom:4px;
margin-top:4px;
}
</style>
<?
if ($set['web']==false){
if (isset($user)){
$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);
$jn = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$ln = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0); // Лента
$dn = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0);
$zn = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
if ($ln > 0)$j2 = 'tape';
elseif ($jn > 0)$j2 = 'discussions';
elseif ($zn > 0)$j2 = 'notification';
else $j2 = 'tape';
$k_l = $ln+$jn+$zn;
echo '<div id="panel_n" class=" ">
<div class="panelD"><table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;border-right:none !important;"><a class="panel_link user_color_link" href="/" style="text-align: center; display: block; padding:2px;" title="Обновить">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/head_menu.png" alt="Главная"/>':'<span class="text">Главная</span>').'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/'.($k_new==0 && $k_new_fav==0?'konts':'new_mess').'.php" style="text-align: center; display: block; padding:2px;" title="Почта">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/head_mail'.($k_new_fav!=0?'_2':null).'.png" alt="Почта"/>':'<span class="text">Поч</span>').' '.($k_new!=0?'<span class="ncount">'.($k_new).'</span>':null).'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/user/tape/index.php" style="text-align: center; display: block; padding:2px;" title="Уведомления">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/head_jornal.png" alt="Уведомления"/>':'<span class="text">Увед</span>').' '.($k_l!=0?'<span class="ncount">'.$k_l.'</span>':null).'</a></td>
'.($dn!=0?'<td style="vertical-align:top;width:20% ;"><a class="panel_link user_color_link" href="/user/frends/new.php" style="text-align: center; display: block; padding:2px;" title="Дружба">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/4.png" alt="Дружба"/>':'<span class="text">Друж</span>').' <span class="ncount">'.$dn.'</span></a></td>':null).'
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;border-right:none !important;"><a class="panel_link user_color_link" href="/user/notification/" style="text-align: center; display: block; padding:2px;" title="Лента">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/head_lenta.png" alt="Лента"/>':'<span class="text">Обнов</span>').'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;border-right:none !important;"><a class="panel_link user_color_link" href="/info.php?id='.$user['id'].'" title="'.$user['nick'].'"style="text-align: center; display: block; padding:2px;" >'.($user['panel_vid']==0?'<img class ="photo" style = "-webkit-border-radius: 20px;-=8khtml-border-radius: 20px;border-radius: 20px; width:34px; height:28px;" '.avatar($user['id']).' ':'<span class="text">'.$user['nick'].'</span>').'</a></td>
</tr></table></div></div>
'.($user['p_time']==1?'<div class="time">'.date('H:i').'</div>':null);
}
else {
echo '
<div class="panelD">
<table style="width:100%" cellspacing="0" cellpadding="0">
</table>
</div>';
}}}
?>