|
<?php
/*
-----------------------------------------
Файл: header.php
-------------------------------------------
*/
echo '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>';
/******** Переменная вывода настроек сайта ******/
$sql = mysql_fetch_assoc(mysql_query("SELECT * FROM `settings` WHERE `id` = '1'"));
/******************* Вывод **********************/
echo '<meta name="description" content="'.$sql['des'].'" />
<meta name="keywords" content="'.$sql['key'].'" />
<link rel="shortcut icon" href="'.$HOME.'/favicon.ico"/>
<link rel="stylesheet" href="'.$HOME.'/design/themes/default/style.css" type="text/css"/>
<meta name="Reply-to" content="diz-top@inbox.ru"/>
<meta name="copyright" content="'.$HOME.'" />
<meta name="author" content="Chebyrek и OneMobi"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<title>'.$title.'</title>
</head>
<body>';
$t = microtime(1);
$len = mysql_result(mysql_query("SELECT COUNT(id) FROM `lenta` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);
$mes = mysql_result(mysql_query("SELECT COUNT(id) FROM `message` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);
echo '<link rel="stylesheet" href="/highlight/styles/tomorrow.css">
<script src="/highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>';
echo '<div class="share42init" data-top1="150" data-top2="20" data-margin="-70"></div>
<script type="text/javascript" src="http://piknik.mobi/share42/share42.js"></script>';
###########################моя панелька####################
echo '<div class="'.$users['style_panel'].'"><div align="center"><a href="'.$HOME.'/user/cab.php"><img src="/images/panel/10.png"></a><a href="'.$HOME.'/mes"><img src="/images/panel/5.png"><font color="white"><b> ('.$mes.') </b></font></a><a href="'.$HOME.'/lenta.php"><img src="/images/panel/3.png"> <font color="white"><b>('.$len.')</b></font></a><a href="'.$HOME.'/exit.php"><img src="/images/panel/12.png"></div></a></div>';
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$ipod = strpos($user_agent,"iPod");
$iphone = strpos($user_agent,"iPhone");
$android = strpos($user_agent,"Android");
$symb = strpos($user_agent,"Symbian");
$winphone = strpos($user_agent,"WindowsPhone");
$wp7 = strpos($user_agent,"WP7");
$wp8 = strpos($user_agent,"WP8");
$operam = strpos($user_agent,"Opera M");
$palm = strpos($user_agent,"webOS");
$berry = strpos($user_agent,"BlackBerry");
$mobile = strpos($user_agent,"Mobile");
$htc = strpos($user_agent,"HTC_");
$fennec = strpos($user_agent,"Fennec/");
if ($ipod || $iphone || $android || $symb || $winphone || $wp7 || $wp8 || $operam || $palm || $berry || $mobile || $htc || $fennec) {
} else {
if(!$user['id']) {
############ДЛЯ ГОСТЕЙ#################
echo '<div class="block_stat_guest">';
echo '<div class="podmenu"><b>Сегодня:</b><br>';
echo date('G:i:s');
echo '
';
$mes = array('','Января','Февраля','Марта','Апреля','Мая','Июня','Июля','Августа','Сентября','Октября','Ноября','Декабря');
$m = date('n');
echo date('d '.$mes[$m].' Y');
$dn = array('Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота');
$w = date('w');
echo '
'.$dn[$w];
echo '</div>';
#####################################
echo '</div>';
}else{
###############ДЛЯ ПОЛЬЗОВАТЕЛЕЙ########
$t_f = mysql_result(mysql_query('select count(`id`) from `forum_tema`'),0);
echo '<a href="'.$HOME.'/user_'.$user['id'].'"><div class="block_stat">';
echo '<div class="block_nick">';echo (empty($user['avatar'])?'<img src="/files/ava/net.jpg" alt="*" style="max-width: 50px; max-height: 50px; -o-border-radius: 10px; border-radius: 10px; -moz-border-radius: 10px;">':'<img src="/files/ava/'.$user['avatar'].'" alt="*" style="max-width: 50px; max-height: 50px; -o-border-radius: 10px; border-radius: 10px; -moz-border-radius: 10px;">');
echo ' <b>'.$user['login'].'</b></div></a>';
echo '<div class="podmenu3">Меню пользователя</div>';
echo '<a href="'.$HOME.'/user/info.php?id='.$user['id'].'"><div class="podmenu"><img src="/images/user/anketa.png"> Анкета</div></a>';
echo '<a href="'.$HOME.'/user/guest/index.php?id='.$user['id'].'"><div class="podmenu"><img src="/images/user/guestbook.gif"> Гостевая <div class="st">('.mysql_result(mysql_query('select count(`id`) from `gues` where `ukogo` = "'.$user['id'].'" '),0).')</div></div></a>';
echo '<a href="'.$HOME.'/user/friend.php?id='.$user['id'].'"><div class="podmenu"><img src="/images/user/friends.gif"> Друзья <div class="st">('.mysql_result(mysql_query('select count(`id`) from `friend` where `id` = "'.$user['id'].'" AND `i` = "1" '),0).')</div></div></a>';
echo '<a href="'.$HOME.'/user/nar.php?id='.$user['id'].'"><div class="podmenu"><img src="/images/user/bb.secure.png"> Нарушения <div class="st">('.mysql_result(mysql_query('select count(`id`) from `nar` where `komy` = "'.$user['id'].'" '),0).')</div></div></a>';
echo '<div class="podmenu3">Статистика</div>';
if($user['level'] == 0){ $dol = '<b>Пользователь</b>';}
elseif($user['level'] == 1){ $dol = '<b>Модератор</b>';}
elseif($user['level'] == 2){ $dol = '<b>Администратор</b>';}
elseif($user['level'] == 3){ $dol = '<b>Бог</b>';}
echo '<div class="podmenu"> <img src="/images/user/rating.png"> Рейтинг: <b>'.$user['reiting'].'</b><br>
<img src="/images/user/ico_mone.png"> Монеты: <b>'.$user['monet'].'</b><br>
<img src="/images/user/stat.png"> Уровень: '.$dol.'</a>
</div>';
echo '<div class="podmenu3">Меню сайта</div>';
echo '<a href="'.$HOME.'/forum/"><div class="podmenu"><img src="/design/themes/default/img/3.png"> <b>Форум</b> <span class="st">('.$t_f.' <font color="red"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_tema` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font> | '.mysql_result(mysql_query('select count(`id`) from `forum_post`'),0).' <font color="green"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_post` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font> )</span></div></a>';
echo '<a href="'.$HOME.'/blog/"><div class="podmenu"><img src="/design/icons/blog.gif"> <b>Блоги</b> <span class="st">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `blog_stat`"),0).') <font color="green">+'.mysql_result(mysql_query("SELECT COUNT(*) FROM `blog_stat`WHERE `time` > '".(time()-86400)."' "),0).'</font></span></div></a>';
echo '<a href="'.$HOME.'/guest"><div class="podmenu"><img src="'.$HOME.'/design//icons/guest.gif" alt="Чат" title="Гостевая" /> <b>Гостевая</b> <span class="st">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `guest`"),0).') <font color="green">+'.mysql_result(mysql_query("SELECT COUNT(*) FROM `guest`WHERE `time` > '".(time()-86400)."' "),0).'</font></span></div></a>';
echo '<a href="'.$HOME.'/chat"><div class="podmenu"><img src="'.$HOME.'/design//icons/chat.gif" alt="Чат" title="Чат" /> <b>Чат</b> <span class="st">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `chat_post`"),0).') <font color="green">+'.mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_post`WHERE `time` > '".(time()-86400)."' "),0).'</font></span></div></a>';
echo '<a href="'.$HOME.'/stol.php"><div class="podmenu"><img src="'.$HOME.'/design//icons/acn.png" alt="Стол заказов" title="Стол заказов" /> <b>Стол заказов </b><div class="st">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `stol` WHERE `status`= '0' "),0).')</div></div></a>';
echo '<a href="'.$HOME.'/down/"><div class="podmenu"><img src="'.$HOME.'/design/themes/default/img/1.png" alt="*" title="Загрузки" /> <b>Загрузки</b> <div class="st">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `load_file`"),0).') <font color="green">+'.mysql_result(mysql_query("SELECT COUNT(*) FROM `load_file`WHERE `time` > '".(time()-86400)."' "),0).'</font></div></div></a>';
echo '</div>';
}
#####################################
}
?>