Файл: style/head.php
Строк: 179
<?php
$gen = microtime (1 );
//error_reporting(E_ALL); #Режим отладки включен
ob_start();
/*
*
* Автор - Александр Каплин (TheAlex, Саня)
* Все права принадлежат CreaWap.Ru
* Дата и время - 03.05.2015 г. 22:40
* Включаем кеширование страныцы на сервере кроме заголовков
*/
//Инклюдим файл функций
include_once($_SERVER["DOCUMENT_ROOT"].'/system/function.php');
?>
<!DOCTYPE HTML>
<head>
<link rel="yandex-tableau-widget" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#0F656B">
<title><?=$title?></title>
<link rel="shortcut icon" href="/style/images/ico/favicon.ico">
<?
if(isset($user['id'])){
$design = $db->query("SELECT * FROM `designs` WHERE `id`='".$user['design']."'")->fetch_assoc();
if(empty($user['design'])){
$design = $db->query("SELECT * FROM `designs` WHERE `default`=1")->fetch_assoc();
?>
<link rel="stylesheet" href="/style/themes/<?=$design['system_name']?>/style.css">
<?
}else{
?>
<link rel="stylesheet" href="/style/themes/<?=$design['system_name']?>/style.css">
<?
}
}else{
$design = $db->query("SELECT * FROM `designs` WHERE `default`=1")->fetch_assoc();
?>
<link rel="stylesheet" href="/style/themes/<?=$design['system_name']?>/style.css">
<?
}
?>
</head>
<div class="head">
<a href="/"><img src="/style/themes/<?=$design['system_name']?>/images/logo.png"></a>
</div>
<?
$q = $db->query("SELECT * FROM `ads_link` WHERE `time2`>=".time()." AND `moderation`='1'");
while($a = $q->fetch_assoc()){
?>
<div class="ads"><a href="http://<?=$a['link']?>" style="<?if(!empty($a['color'])){?>color: #<?=$a['color']?>;<?}?> <?if(!empty($a['bold'])){?>font-weight: 600;<?}?> <?if(!empty($a['italic'])){?>font-style: italic;<?}?>"><?=htmlspecialchars($a['name'])?></a></div>
<?
}
?>
<?
//Если пользователь не авторизован, то
if(!isset($user)){
//Выводим ссылки на регистрацию и авторизацию
?>
<div class="nvgup">
<a href="/login">Авторизация</a> <a href="/reg">Регистрация</a>
</div>
<?
}else{
//Или выводим ссылки на личный кабинет и выход
?>
<div class="nvgup">
<?php
if($user['msg']=="new"){
echo' <a href="/mail"><font style="color:red;">Новая почта</font></a>';
}
?>
<a href="/cab">Личный кабинет</a>
<?
if($db->query("SELECT * FROM `notifications` WHERE `id_us`='".$user['id']."' AND `read`='0'")->num_rows!=0){
?>
<a href="/cab/notifications">Оповещения <font color="red">+<?=$db->query("SELECT * FROM `notifications` WHERE `id_us`='".$user['id']."' AND `read`='0'")->num_rows;?></font></a>
<?
}
if($user['level']>=1){
if($db->query("SELECT * FROM `zc_file` WHERE `moderation`='0'")->num_rows!=0){
?>
<a href="/admin/zc/moderation">Модерация файлов <font color="red">+<?=$db->query("SELECT * FROM `zc_file` WHERE `moderation`='0'")->num_rows?></font></a>
<?
}
if($db->query("SELECT `id` FROM `forum_complaint` WHERE `status`='0'")->num_rows!=0){
?>
<a href="/admin/forum/complaint">Модерация жалоб <font color="red">+<?=$db->query("SELECT `id` FROM `forum_complaint` WHERE `status`='0'")->num_rows?></font></a>
<?
}
if($db->query("SELECT `id` FROM `phpcodes_codes` WHERE `moderation`='0'")->num_rows!=0){
?>
<a href="/admin/phpcodes/moderation">Модерация кодов <font color="red">+<?=$db->query("SELECT `id` FROM `phpcodes_codes` WHERE `moderation`='0'")->num_rows?></font></a>
<?
}
}
if($user['level']>=3){
if($db->query("SELECT `id` FROM `confirmation` WHERE `status`='0'")->num_rows!=0){
?>
<a href="/admin/billing/confirmation">Подтверждение данных <font color="red">+<?=$db->query("SELECT `id` FROM `confirmation` WHERE `status`='0'")->num_rows?></font></a>
<?
}
if($db->query("SELECT `id` FROM `billing_output` WHERE `status`='0'")->num_rows!=0){
?>
<a href="/admin/billing/output">Вывод средств <font color="red">+<?=$db->query("SELECT `id` FROM `billing_output` WHERE `status`='0'")->num_rows?></font></a>
<?
}
if($db->query("SELECT `id` FROM `ads_link` WHERE `moderation`='0'")->num_rows!=0){
?>
<a href="/admin/billing/ads/moderation">Модерация рекламы <font color="red">+<?=$db->query("SELECT `id` FROM `ads_link` WHERE `moderation`='0'")->num_rows?></font></a>
<?
}
}
if(isset($user['id']) AND $db->query("SELECT `id` FROM `billing_score` WHERE `recipient`='".$user['id']."' AND `status`='0'")->num_rows!=0){
?>
<a href="/billing/score/received">Неоплаченные счета <font color="red">+<?=$db->query("SELECT `id` FROM `billing_score` WHERE `recipient`='".$user['id']."' AND `status`='0'")->num_rows?></font></a>
<?
}
if(isset($user['id']) AND $user['level']>=1 AND $db->query("SELECT `id` FROM `shop_goods` WHERE `moderation`=0")->num_rows!=0){
?>
<a href="/admin/shop/moderation_list">Модерация товаров <font color="red">+<?=$db->query("SELECT `id` FROM `shop_goods` WHERE `moderation`=0")->num_rows?></font></a>
<?
}
if(isset($user['id']) AND $user['level']>=1 AND $db->query("SELECT `id` FROM `complaint_goods` WHERE `moderation`=0")->num_rows!=0) {
?>
<a href="/admin/shop/moderation_complaint_goods">Модерация жалоб на товары <font color="red">+<?=$db->query("SELECT `id` FROM `complaint_goods` WHERE `moderation`=0")->num_rows?></font></a>
<?
}
if(isset($user['id']) AND $user['level']>=1 AND $db->query("SELECT `id` FROM `arbitration` WHERE `moderation`=0")->num_rows!=0) {
?>
<a href="/arbitration/moderation/">Модерация отзывов в арбитраже <font color="red">+<?=$db->query("SELECT `id` FROM `arbitration` WHERE `moderation`=0")->num_rows?></font></a>
<?
}
if(isset($user['id']) AND $user['level']>=1 AND $db->query("SELECT `id` FROM `users` WHERE `moderation`=0")->num_rows!=0) {
?>
<a href="/admin/moderation_users/">Модерация пользователей <font color="red">+<?=$db->query("SELECT `id` FROM `users` WHERE `moderation`=0")->num_rows?></font></a>
<?
}
?>
</div>
<?
}
if($db->query("SELECT * FROM `ban` WHERE `id_us`='".$user['id']."' AND `time2`>='".time()."'")->num_rows!=0 AND $_SERVER["REQUEST_URI"]!='/ban'){
header('location:/ban');
}
if(isset($user['id']) AND $user['moderation']==0 AND $_SERVER["REQUEST_URI"]!='/moderation/wait'){
header('location:/moderation/wait');
}
if(isset($user['id']) AND $user['moderation']==2 AND $_SERVER["REQUEST_URI"]!='/moderation/no'){
header('location:/moderation/no');
}
?>