<?php
defined('_IN_JOHNCMS') or die('Error: restricted access');
$headmod = isset($headmod) ? mysql_real_escape_string($headmod) : '';
$textl = isset($textl) ? $textl : $set['copyright'];
/*
-----------------------------------------------------------------
Выводим HTML заголовки страницы, подключаем CSS файл
-----------------------------------------------------------------
*/
if (stristr(core::$user_agent, "msie"
&& stristr(core::$user_agent, "windows"
) {
// Выдаем заголовки для Internet Explorer
header("Cache-Control: no-store, no-cache, must-revalidate"
;
header('Content-type: text/html; charset=UTF-8');
} else {
// Выдаем заголовки для остальных браузеров
header("Cache-Control: public"
;
header('Content-type: application/xhtml+xml; charset=UTF-8');
}
header("Expires: " . date("r", time() + 60));
echo'<?xml version="1.0" encoding="utf-8"?>' . "\n" .
"\n" . '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">' .
"\n" . '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">' .
"\n" . '<head>' .
"\n" . '<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>' .
"\n" . '<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>' .
"\n" . '<meta http-equiv="Content-Style-Type" content="text/css" />' .
"\n" . '<meta name="Generator" content="JohnCMS,
http://johncms.com" />' . // ВНИМАНИЕ!!! Данный копирайт удалять нельзя
(!empty($set['meta_key']) ? "\n" . '<meta name="keywords" content="' . $set['meta_key'] . '" />' : '') .
(!empty($set['meta_desc']) ? "\n" . '<meta name="description" content="' . $set['meta_desc'] . '" />' : '') .
"\n" . '<link rel="stylesheet" href="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/style.css" type="text/css" />' .
"\n" . '<script type="text/javascript" src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/jquery-1.11.1.min.js"></script>' .
"\n" . '<script type="text/javascript" src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/jquery.event.swipe.js"></script>' .
"\n" . '<script type="text/javascript" src="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/menu_nav.js"></script>' .
"\n" . '<link rel="shortcut icon" href="' . $set['homeurl'] . '/favicon.ico" />' .
"\n" . '<link rel="alternate" type="application/rss+xml" title="RSS | ' . $lng['site_news'] . '" href="' . $set['homeurl'] . '/rss/rss.php" />' .
"\n" . '<title>' . $textl . '</title>' .
"\n" . '</head><body>' . core::display_core_errors();
/*
-----------------------------------------------------------------
Рекламный модуль
-----------------------------------------------------------------
*/
$cms_ads = array();
if (!isset($_GET['err']) && $act != '404' && $headmod != 'admin') {
$view = $user_id ? 2 : 1;
$layout = ($headmod == 'mainpage' && !$act) ? 1 : 2;
$req = mysql_query("SELECT * FROM `cms_ads` WHERE `to` = '0' AND (`layout` = '$layout' or `layout` = '0') AND (`view` = '$view' or `view` = '0') ORDER BY `mesto` ASC"
;
if (mysql_num_rows($req)) {
while (($res = mysql_fetch_assoc($req)) !== FALSE) {
$name = explode("|", $res['name']);
$name = htmlentities($name[mt_rand(0, (count($name) - 1))], ENT_QUOTES, 'UTF-8');
if (!empty($res['color'])) $name = '<span style="color:#' . $res['color'] . '">' . $name . '</span>';
// Если было задано начертание шрифта, то применяем
$font = $res['bold'] ? 'font-weight: bold;' : FALSE;
$font .= $res['italic'] ? ' font-style:italic;' : FALSE;
$font .= $res['underline'] ? ' text-decoration:underline;' : FALSE;
if ($font) $name = '<span style="' . $font . '">' . $name . '</span>';
Удалён .= '<a href="' . ($res['show'] ? functions::checkout($res['link']) : $set['homeurl'] . '/go.php?id=' . $res['id']) . '">' . $name . '</a><br/>';
if (($res['day'] != 0 && time() >= ($res['time'] + $res['day'] * 3600 * 24)) || ($res['count_link'] != 0 && $res['count'] >= $res['count_link']))
mysql_query("UPDATE `cms_ads` SET `to` = '1' WHERE `id` = '" . $res['id'] . "'"
;
}
}
}
/*
-----------------------------------------------------------------
Рекламный блок сайта
-----------------------------------------------------------------
*/
if (isset($cms_ads[0])) echo $cms_ads[0];
/*
-----------------------------------------------------------------
Выводим логотип и переключатель языков
-----------------------------------------------------------------
*/
// echo '<table style="width: 100%;" class="logo"><tr>' .
// '<td valign="bottom"><a href="' . $set['homeurl'] . '">' . functions::image('logo.gif', array('class' => '')) . '</a></td>' .
// ($headmod == 'mainpage' && count(core::$lng_list) > 1 ? '<td align="right"><a href="' . $set['homeurl'] . '/go.php?lng"><b>' . strtoupper(core::$lng_iso) . '</b></a> <img src="' . $set['homeurl'] . '/images/flags/' . core::$lng_iso . '.gif" alt=""/> </td>' : '') .
// '</tr></table>';
/*
-----------------------------------------------------------------
Выводим верхний блок с приветствием
-----------------------------------------------------------------
*/
// echo '<div class="header"> ' . $lng['hi'] . ', ' . ($user_id ? '<b>' . $login . '</b>!' : $lng['guest'] . '!') . '</div>';
/*
-----------------------------------------------------------------
Главное меню пользователя
-----------------------------------------------------------------
*/
// echo '<div class="tmn">' .
// (isset($_GET['err']) || $headmod != "mainpage" || ($headmod == 'mainpage' && $act) ? '<a href=\'' . $set['homeurl'] . '\'>' . functions::image('menu_home.png') . $lng['homepage'] . '</a><br/>' : '') .
// ($user_id && $headmod != 'office' ? '<a href="' . $set['homeurl'] . '/users/profile.php?act=office">' . functions::image('menu_cabinet.png') . $lng['personal'] . '</a><br/>' : '') .
// (!$user_id && $headmod != 'login' ? functions::image('menu_login.png') . '<a href="' . $set['homeurl'] . '/login.php">' . $lng['login'] . '</a>' : '') .
// '</div><div class="maintxt">';
?>
<div class="logo">
<p align="center"><a href="/">
<img src="<?php echo' ' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/images/logo.png ';?>"/>
</a></p></div>
<div id="mobileContainer">
<div id="page">
<div class="menu">
<div class="lol">
<a href="javascript:void(0);" id="lines" class="btn"></a>
<div id="menu"></div>
<ul class="nav">
<li class="admin">
<?php if ($user_id) {
echo'
<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);">Меню<span id="arrow"></span> </a>
<ul class="dropdown-menu">
<li><a href="' . $set['homeurl'] . '/users/profile.php?act=office">Өздүк</a></li>
<li><a href="' . $set['homeurl'] . '/mail/index.php?act=input">Каттар</a></li>
<li><a id="none" href="' . $set['homeurl'] . '/users/profile.php?act=friends">Досторум</a></li>
</ul>
';
} else {
echo '<a class="dropdown-toggle" href="' . $set['homeurl'] . '/login.php">' . $lng['login'] . '</a>';
}
?>
</li>
</ul>
<div class="clear"></div>
</div>
</div>
<div class="main">
<?php
/*
-----------------------------------------------------------------
Рекламный блок сайта
-----------------------------------------------------------------
*/
if (!empty($cms_ads[1])) echo '<div class="gmenu">' . $cms_ads[1] . '</div>';
где то тут