Файл: themes/default/header.php
Строк: 186
<?
ob_start();
?><!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<span id="realtitle"><title><?= $system['title']?></title></span>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name='yandex-verification' content='49648f7b8180b68e' />
<meta name="application-name" content=""/>
<meta name="msapplication-tooltip" content=""/>
<meta name="msapplication-starturl" content="//<?= urlencode($_SERVER['SERVER_NAME'])?>/index.php"/>
<meta name="keywords" content="<?= $system['meta_keyword']?>">
<meta name="description" content="<?= $system['meta_description']?>" />
<link href="<?= CSS?>bootstrap.css?t=<?=time()?>" rel="stylesheet">
<link href="<?= CSS?>bootstrap-responsive.css?t=<?=time()?>" rel="stylesheet">
<link href="<?= CSS?>ic.css?t=<?=time()?>" rel="stylesheet">
<link href="<?= CSS?>main.css?t=<?=time()?>" rel="stylesheet">
<link rel="yandex-tableau-widget" href="test.json" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script src="<?= JSC?>bootstrap.min.js" type="text/javascript"></script>
<? /*
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6277418502067253",
enable_page_level_ads: true
});
</script>
*/
?>
<link rel="shortcut icon" href="<?= ICONS?>favicon.png">
<?
$sban = $sql -> fetch("SELECT * FROM `ban` WHERE `id_ban` = '".$user['id']."' AND `time` > '$time' ORDER BY `time` DESC LIMIT 1");
if ($user['id'] != $sban['id_ban']) {
//if (!$func == 'user.reg')
if ($level > 0 && $func != 'user.reg') { ?>
<script>
function titleshow()
{
$.ajax(
{
url: "/AjaxSend.php",
cache: false,
success: function(html)
{
if (html != 'NO')
{
$('#realtitle>title').replaceWith(html);
}
}
});
}
$(document).ready(function(){
titleshow();
setInterval('titleshow()',10000);
});
</script>
<script>
function getCounterUpdate() {
$.ajax({
url: '/api.php',
dataType: 'json',
success: function(data) {
$.each(data, function(key, val) {
if (val == 0) {
document.getElementById(key).style.display = 'none';
} else {
document.getElementById(key).style.display = '';
$('#' + key).html('<span class="counter">' + val + '</span>');
}
});
}
});
}
setInterval(function() { getCounterUpdate() }, 10000);
</script>
<?}
}
?>
</head>
<body>
<div class="body">
<div class="logotype">
<div class="brands"><a href="/"><i class="ic-cart ic-logo"></i> Магазин</a></div>
</div>
<div class="nav-panel">
<ul>
<?
//<span class="hidden-phone">
if ($level > 0) { ?>
<li><a href="/?func=user.main"><i class="ic-user"></i><span class="hidden-phone">Кабинет </span></a></li>
<li><a href="/?func=user.contacts"><i class="ic-mail-4"></i><span class="hidden-phone">Почта </span><span id="counterMail"><?= ($counter['mail'] > 0 ? '<span class="counter">'.$counter['mail'] . '</span>' : '')?></span></a></li>
<li><a href="/?func=user.journal"><i class="ic-bell-alt"></i><span class="hidden-phone">Журнал </span><span id="counterJurnal"><?= ($counter['journal'] > 0 ? '<span class="counter">'.$counter['journal'] . '</span>' : '')?></span></a></li>
<? if ($level > 1) { ?>
<li><a href="/?func=admin"><i class="ic-th-large"></i><span class="hidden-phone">Админка </span><span id="counterAdmin"><?= ($counter['admin'] > 0 ? '<span class="counter">'.$counter['admin'] . '</span>' : '')?></span></a></li>
<? } ?>
<? } else { ?>
<li><a href="/?func=user.auth"><i class="ic-lock-open-filled"></i>Вход</a></li>
<li><a href="/?func=user.reg"><i class="ic-pencil"></i>Регистрация</a></li>
<? } ?>
</ul>
</div>
<div class="header-title">
<div class="title-text"><?= $system['title']?></div>
</div>
<?
if (isset($err)) {
if (is_array($err)) {
foreach ($err AS $_err) {
?>
<div class="alert alert-error" style="margin: 2px;">
<button type="button" class="close" data-dismiss="alert">×</button>
<?= $_err?>
</div>
<?
}
} else {
?>
<div class="alert alert-error" style="margin: 2px;">
<button type="button" class="close" data-dismiss="alert">×</button>
<?= $err?>
</div>
<?
}
}
if (isset($_SESSION['message']) && $_SESSION['message']) {
$messages = $_SESSION['message'];
$_SESSION['message'] = null;
}
if (isset($messages)) {
if (is_array($messages)) {
foreach ($messages AS $_messages) {
?>
<div class="alert alert-success" style="margin: 2px;">
<button type="button" class="close" data-dismiss="alert">×</button>
<?= $_messages?>
</div>
<?
}
} else {
?>
<div class="alert alert-success" style="margin: 2px;">
<button type="button" class="close" data-dismiss="alert">×</button>
<?= $messages?>
</div>
<?
}
}
?>
<?
if ($func == 'home') {
$ads_rekl = $sql -> select("SELECT * FROM `ads` WHERE `pays` = '1' AND `time_last` > '" . time() . "' AND `type` = 'goods' ORDER BY `time_pays` DESC LIMIT 5");
if (is_array($ads_rekl)) {
?>
<div class="main_razd">
<b>Рекомендуем</b>
</div>
<div class="nav1">
<?
foreach($ads_rekl AS $rekl) {
$goods = $sql -> fetch("SELECT * FROM `shop_goods` WHERE `id` = '$rekl[id_goods]'");
echo '<a href="/goods/' . $rekl['id_goods'] . '" style="' . ($rekl['color'] ? 'color: ' . $rekl['color'] . '; ' : '') .
($rekl['fonts'] == 1 ? 'font-weight: bold;' : '') . '"><i class="icon-thumbs-up"></i> ' . text($rekl['name']) . '</a> <span class="on">' . $goods['wmr'] . ' wmr</span><br />';
}
?></div><?
}
}
if ($system['title'] != null AND isset($user))
{
$url_title = esc($system['title']);
$url = esc($_SERVER['REQUEST_URI']);
if ($user['url_set'] == 0)
{
$url_title = 'Неизвестно';
$url = '/';
}
$sql -> update("UPDATE `users` SET `url_title` = '{$url_title}' , `url_city` = '{$url}' WHERE `id` = '{$user['id']}' LIMIT 1");
}
?>