Файл: core/cuctema/function/aut.php
Строк: 809
<?
function aut()
{
global $set;
global $user;
if (isset($user))
{
?>
<style>
#logo_panel {
border-radius: 9px 8px 0px 0px;
background: #FFFFFF;
border-bottom: 1px solid #CCCACA;
border-top: 1px solid #CCCACA;
border-right: 1px solid #CCCACA;
border-left: 1px solid #CCCACA;
padding: 10px 10px;
}
.overfl_hid, #logo_panel, .pre_content_wrap, .preview_widget div, .preview_widget, .bookmark_block, #mads {
overflow: hidden;
}
.lh150, #logo_panel {
line-height: 150%;
}
.left2, #logo_link, .edit_bokkmark_item, .item_pic img {
float: left;
}
.middle, {
vertical-align: middle;
}
.right2, .authors_comment, .file_size, .service_information, .comment_date, .percentage, div.date {
float: right;
}
.service_links_block {
color: #B3B3B3;
}
a.service_link, a.service_link span, .service_item {
color: #006666;
}
</style>
<div id="logo_panel" style="line-height:normal;" >
<span class="left2">
<a href="http://7emka.ru"><img id="site_logo" src="/index/include/logo.png" alt="7emka" class="middle" style="margin-top:-2px;" /></a>
</span>
<span class="right2 top_user_links service_links_block" style="margin-top:3px;">
<a href="/id<?echo $user['id']?>" class="user_link ">
<span style="color:#79358c"><?echo $user['nick']?></span></a>
<?
if ($_SERVER['PHP_SELF']=='/index.php') {
?>
| <a href="/?act=exit_yes_no"><span style="color: #006666;">Выход</span></a>
<?}?>
</span>
</div>
<?
}
if ($set['web']==false)
{
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('#up-browser|blackberry|windows ce|symbian|palm|nokia#i', $_SERVER["HTTP_USER_AGENT"]))
$webbrowser=false;
elseif (isset($_SERVER["HTTP_USER_AGENT"]) && (preg_match('#windows#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#linux#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#bsd#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#x11#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#unix#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#macos#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#macintosh#i', $_SERVER["HTTP_USER_AGENT"])))
$webbrowser=true;else $webbrowser=false; // определение типа браузера
if ($webbrowser == true)
{
$web = true;
} else $web = false;
global $user;
if (isset($user))
{
$count_mail = mysql_result(mysql_query( "SELECT COUNT(*) FROM `mail` WHERE `id_user` = '$user[id]' AND `type` = 'to' AND `read` = '0'"), 0);
$nl=mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
//$gb=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `type` = 'guestbook' AND `read` = '0'"), 0);
//$gb=mysql_result(mysql_query("SELECT COUNT(*) FROM `guestbook` WHERE `id_user_adm` = '$user[id]' AND `id_user` != '$user[id]' AND `time` > '$user[guest_time]'"),0);
$color['fon'] = '#'.$user['panel_fon'];
$color['link'] = '#'.$user['panel_link'];
$color['focus_fon'] = '#'.$user['panel_focus_fon'];
$color['focus_link'] = '#'.$user['panel_focus_link'];
$color['border'] = '#'.$user['panel_border'];
$color['newevent'] = '#'.$user['panel_newevent'];
$panel = array();
$panel['font_size'] = $user['panel_font_size'];
if ($user['panel']==1) {
////это первая панель
if ($user['panel_icons']==0) {
$panel['home']=($web==true?"<img class='icon' src='/images/panel/0/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/0/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/0/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/0/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/0/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/0/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/0/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/0/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/0/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/0/search.png' width='16' height='16' alt='Поиск' >");
}
//else//эта функция уже ненужна :D//
////это вторая панель
if ($user['panel_icons']==1){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/1/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/1/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/1/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/1/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/1/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/1/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/1/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/1/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/1/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/1/search.png' width='16' height='16' alt='Поиск' >");
}
////это третья панель
if ($user['panel_icons']==2){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/2/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/2/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/2/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/2/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/2/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/2/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/2/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/2/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/2/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/2/search.png' width='16' height='16' alt='Поиск' >");
}
////это четвёртая панель
if ($user['panel_icons']==3){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/3/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/3/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/3/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/3/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/3/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/3/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/3/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/3/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/3/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/3/search.png' width='16' height='16' alt='Поиск' >");
}
////это пятая панель
if ($user['panel_icons']==4){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/4/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/4/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/4/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/4/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/4/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/4/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/4/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/4/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/4/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/4/search.png' width='16' height='16' alt='Поиск' >");
}
////это шестая панель
if ($user['panel_icons']==5){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/5/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/5/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/5/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/5/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/5/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/5/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/5/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/5/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/5/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/5/search.png' width='16' height='16' alt='Поиск' >");
}
////это седьмая панель
if ($user['panel_icons']==6){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/6/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/6/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/6/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/6/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/6/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/6/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/6/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/6/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/6/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/6/search.png' width='16' height='16' alt='Поиск' >");
}
////это восьмая панель
if ($user['panel_icons']==7){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/7/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/7/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/7/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/7/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/7/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/7/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/7/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/7/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/7/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/7/search.png' width='16' height='16' alt='Поиск' >");
}
////это девятая панель
if ($user['panel_icons']==8){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/8/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/8/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/8/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/8/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/8/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/8/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/8/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/8/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/8/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/8/search.png' width='16' height='16' alt='Поиск' >");
}
////это десятая панель
if ($user['panel_icons']==9){
$panel['home']=($web==true?"<img class='icon' src='/images/panel/9/home.png' alt='Старт' >":"<img class='icon' src='/images/panel/9/home.png' width='16' height='16' alt='Старт' >");
$panel['mail']=($web==true?"<img class='icon' src='/images/panel/9/mail.png' alt='Почта' >":"<img class='icon' src='/images/panel/9/mail.png' width='16' height='16' alt='Почта' >");
$panel['journal']=($web==true?"<img class='icon' src='/images/panel/9/jornal.png' alt='Журнал' >":"<img class='icon' src='/images/panel/9/jornal.png' width='16' height='16' alt='Журнал' >");
$panel['lenta']=($web==true?"<img class='icon' src='/images/panel/9/lenta.png' alt='Лента' >":"<img class='icon' src='/images/panel/9/lenta.png' width='16' height='16' alt='Лента' >");
$panel['search']=($web==true?"<img class='icon' src='/images/panel/9/search.png' alt='Поиск' >":"<img class='icon' src='/images/panel/9/search.png' width='16' height='16' alt='Поиск' >");
}
} elseif ($user['panel']==2) {
$panel['home']='Старт';
$panel['mail']='Почта';
$panel['journal']='Жур';
$panel['lenta']='Лента';
$panel['search']='Поиск';
} else {
$panel['home']='С';
$panel['mail']='Пч';
$panel['journal']='Ж';
$panel['lenta']='Л';
$panel['search']='Пс';
}
?>
<style>
a.top_menu_link {
text-align: center;
display: block;
padding: 3px;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
table {
border-collapse: separate;
//border-spacing: 2px;
border-color: gray;
}
#navi {
color: <? echo $color['border'];?>;
font-size: <? echo $panel['font_size'];?>;
padding:6px 2px;
background-color:<? echo $color['fon'];?>;
border: 1px solid #445988;
}
#navi a:link,#navi a:visited {
color:<? echo $color['link'];?>;
text-decoration:none;
font-size: <? echo $panel['font_size'];?>;
}
#navi a:focus,#navi a:hover,#navi a:active {
color:<? echo $color['focus_link'];?>;
background-color:<? echo $color['focus_fon'];?>;
}
#time {
background-color:#ccc;
color:#000;
font-size:medium;
text-align:right;
padding:0px 10px 0px 0px;
}
.newevent {
color:<? echo $color['newevent'];?>;
font-size: <? echo $panel['font_size'];?>;
vertical-align:bottom;
}
/*
.time {
background-color: #ccc;
color: #000;
font-size: small;
text-align: right;
padding: 0px 10px 0px 0px;
}
.time {
background: #F5F5F5;
border-bottom: 1px solid #A9B6C9;
color: #000000;
font-size: small;
padding: 6px;
text-align: right;
border-left:1px solid #B3B3B3;
border-right:1px solid #B3B3B3;
}
*/
</style>
<?
//vk_ok();
//logo();
if ($user['id']==0 || $user['id']==0){
?>
<div id="navi" >
<table style='width:100%' cellspacing='0' cellpadding='0'><tr>
<td style="vertical-align:top;width:19%;border-right:solid; border-width:1px">
<a class="top_menu_link user_color_link" href="/users/startpage/" title="Старт">
<? echo $panel['home'];?>
</a>
</td>
<td style="vertical-align:top;width:20%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/mail/" title="Почта">
<? echo $panel['mail'];?>
<? if ($count_mail!=0)echo "<span class='newevent'>$count_mail</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:19%;<?if ($nl!=0)echo "border-right:solid;";?>border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/jurnal/?link_id=<?echo "".$user['id']."";?>&jsort=1&filter=0" title="Журнал">
<? echo $panel['journal'];?>
<? if ($nj!=0)echo "<span class='newevent'>$nj</span>n";?>
</a>
</td>
<?if ($nl!=0){?>
<td style="vertical-align:top;width:21%;border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/lenta/" title="Лента">
<? echo $panel['lenta'];?>
<? if ($nl!=0)echo "<span class='newevent'>$nl</span>n";?>
</a>
</td>
<?}?>
</tr></table>
<?
echo '</div>';
}else{
?>
<div id="navi" >
<table style='width:100%' cellspacing='0' cellpadding='0'><tr>
<td style="vertical-align:top;width:19%;border-right:solid; border-width:1px">
<a class="top_menu_link user_color_link" href="/users/startpage/" title="Старт">
<? echo $panel['home'];?>
</a>
</td>
<td style="vertical-align:top;width:20%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/mail/" title="Почта">
<? echo $panel['mail'];?>
<? if ($count_mail!=0)echo "<span class='newevent'>$count_mail</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:19%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/jurnal/?link_id=<?echo "".$user['id']."";?>&jsort=1&filter=0" title="Журнал">
<? echo $panel['journal'];?>
<? if ($nj!=0)echo "<span class='newevent'>$nj</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:21%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/users/lenta/" title="Лента">
<? echo $panel['lenta'];?>
<? if ($nl!=0)echo "<span class='newevent'>$nl</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:19%">
<a class="top_menu_link user_color_link" href="/users/search/" title="Поиск">
<? echo $panel['search'];?>
</a>
</td>
</tr></table>
<?
echo '</div>';
}
///////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($user) && $user['set_times']==1){ echo"<div class='time'>";//просмотр страниц!
$new_g=mysql_result(mysql_query("SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = '$user[id]' AND `read`='1'"),0);
if($new_g!=0)echo "<span style='float:left'><img src='/images/anywhere/oko.png' alt='' /> <a href='/pages/servis/'><u>+ $new_g</u></a> n";
echo "</span>".vremja($user['date_last'])."</div>";
//echo "</div>";
}
if (user_access('adm_panel_show')){
echo '<div class="arslan">
<table style="width:100%" cellspacing="0" cellpadding="0">
<tbody>
<tr><td style="vertical-align:top;width:14%;border-right: 1px solid #a9b6c9;white-space: nowrap;">
<a href="/adm_panel/?link_id='.$user['id'].'" style="text-align:center;display:block;padding:5px;font-size: small;">
<span style="color:#ccc;"><img class="icon" src="/adm_panel/images/1.png" alt="А" ></a></td>
<td style="vertical-align:top;width:14%;border-right: 1px solid #a9b6c9;white-space: nowrap;">
<a href="/adm_panel/settings_sys.php" style="text-align:center;display:block;padding:5px;font-size: small;">
<span style="color:#ccc;"><img class="icon" src="/adm_panel/images/2.png" alt="А" ></a></td>
<td style="vertical-align:top;width:14%;border-right: 1px solid #a9b6c9;white-space: nowrap;">
<a href="/adm_panel/settings_user.php" style="text-align:center;display:block;padding:5px;font-size: small;">
<span style="color:#ccc;"><img class="icon" src="/adm_panel/images/3.png" alt="А" ></a></td>
<td style="vertical-align:top;width:14%;border-right: 1px solid #a9b6c9;white-space: nowrap;">
<a href="/adm_panel/ban_ip.php" style="text-align:center;display:block;padding:5px;font-size: small;">
<span style="color:#ccc;"><img class="icon" src="/adm_panel/images/4.png" alt="А" ></a></td>
<td style="vertical-align:top;width:14%;white-space: nowrap;">
<a href="/adm_panel/mon.php" style="text-align:center;display:block;padding:5px;font-size: small;">
<span style="color:#ccc;"><img class="icon" src="/adm_panel/images/5.png" alt="А" ></a></td>
</tr></tbody></table></div>';
}
//echo "<u>Время: ".vremja($user['date_last'])."</u></div>";
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
location_bar();
from();
}
else
{
//echo "<marquee>Для того, чтобы пользоваться всеми возможностями сайта необходимо пройти <a href='/aut.php'>Авторизацию</a>. Если Вы еще не зарегистрированы, то Вам необходимо пройти процесс <a href='/reg.php'>Регистрации</a>.</marquee>n";
//echo "<div class='location_bar line_175' style='text-align: right;border-bottom: 1px solid #CCCACA;'>n";
///++++
?>
<style>
#logo_panel {
border-bottom: 1px solid #CCCACA;
border-radius: 9px 8px 0px 0px;
background: #FFFFFF;
border-top: 1px solid #CCCACA;
border-right: 1px solid #CCCACA;
border-left: 1px solid #CCCACA;
padding: 10px 10px;
}
.overfl_hid, #logo_panel, .pre_content_wrap, .preview_widget div, .preview_widget, .bookmark_block, #mads {
overflow: hidden;
}
.lh150, #logo_panel {
line-height: 150%;
}
.left2, #logo_link, .edit_bokkmark_item, .item_pic img {
float: left;
}
.middle, {
vertical-align: middle;
}
.right2, .authors_comment, .file_size, .service_information, .comment_date, .percentage, div.date {
float: right;
}
.service_links_block {
color: #B3B3B3;
}
a.service_link, a.service_link span, .service_item {
color: #006666;
}
</style>
<div id="logo_panel" style="line-height:normal;" >
<span class="left2">
<a href="http://7emka.ru"><img id="site_logo" src="/index/include/logo.png" alt="m.7emka" class="middle" style="margin-top:-2px;" /></a>
</span>
<span class="right2 top_user_links service_links_block" style="margin-top:3px;">
<a href="/?act=avtorize" class="user_link ">
<span style="color:#226FC2">Вход</span></a>
<?
?>
| <a href="/?act=registration"><span style="color: #399C21;">Регистрация</span></a>
</span>
</div>
<?
}
echo "</div>n";
}
}
?>