-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathheader.php
210 lines (182 loc) · 5.76 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php
/**
*
* @package HEADER
* @version $Id: header.php 0999 2009-12-12 15:35:19Z Aneeshtan $
* @copyright (c) Marlik Group http://www.MarlikCMS.com
* @license http://creativecommons.org/licenses/by-nc-sa/3.0 Attribution-Noncommercial-Share Alike
*
*/
if (stristr(htmlentities($_SERVER['PHP_SELF']), "header.php")) {
show_error(HACKING_ATTEMPT."<br><b>header.php</b>");
}
define('NUKE_HEADER', true);
require_once("mainfile.php");
// mybb_bridge
if(file_exists('includes/inc_mybb.php')){
include_once('includes/inc_mybb.php');
}
//===================================================
//GOOGLE TAP FEATURE
//===================================================
if (!defined("ADMIN_FILE")) {nextGenTap(1,0,0); }
function head() {
global $db,
$ab_config,
$slogan,
$sitename,
$banners,
$nukeurl,
$Version_Num,
$artpage, $topic,
$hlpfile,
$user,
$userinfo,
$hr,
$theme,
$cookie,
$adminpage,
$userpage,
$pagetitle,
$loading,
$nukeNAV,
$currentlang,
$name;
if (!defined("ADMIN_FILE") AND !defined('FORUM_ADMIN')) {
// load main theme file theme.php
if (file_exists(THEME_FILE)) {include_once(THEME_FILE);}
// lets start our theme engine.!
require_once(THEME_ENGINE);
}
// Initialize CSS and JS arrays
$headCSS = array();
$headJS = array(); // added inside HEAD tags
$bodyJS = array(); // added at bottom of page, before </BODY>
$baseUrl = rtrim((string)dirname($_SERVER['SCRIPT_NAME']), '/\\') . '/';
if (function_exists("custom_head")) {
custom_head();
}else{
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php echo "\n";?>
<!--
@Marlik Portal
@version : 1.1.6 BE
Copyright (C) 2009-2014 by MarlikCMS Group
http://www.marlikcms.ir
-->
<?php
echo "<html xmlns='http://www.w3.org/1999/xhtml'>\n";
echo "<head>\n";
echo "<base href=\"http://". $_SERVER['HTTP_HOST'].$baseUrl."\" />\n";
//===========================================
//TITLE STRINGS
//===========================================
/*if($name == "phpBB3") {
$smart_title= "";
}
/*elseif (preg_match("/News/",$_SERVER['REQUEST_URI']) AND preg_match("/article/",$_SERVER['REQUEST_URI'])) {
$smart_title= "<title>$pagetitle </title>\n" ;
}
else {*/
$smart_title= "<title>$pagetitle @ $sitename</title>\n" ;
//}
echo $smart_title;
//===========================================
//META STRINGS
//===========================================
include("includes/meta.php");
if (file_exists("themes/" . _DEAULT_THEME_ . "/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/" . _DEAULT_THEME_ . "/images/favicon.ico\" TYPE=\"image/x-icon\" />\n";
}else {
echo "<link REL=\"shortcut icon\" HREF=\"favicon.ico\" TYPE=\"image/x-icon\" />\n";
}
//===================================================
//RSS syndication
//===================================================
echo "<link rel='alternate' type='application/rss+xml' title='"._RSS_LASTCOMMENTS."' href='rss.php?mod=Comment' />\n";
echo "<link rel='alternate' type='application/rss+xml' title='"._RSS_NEWS."' href='rss.php?mod=News' />\n";
//===================================================
//CSS
//===================================================
if (!defined("ADMIN_FILE")) {
if ($currentlang == "persian") {
$def_style = 'themes/' . _DEAULT_THEME_ . '/style/style.css';
}
else
{
$def_style = 'themes/' . _DEAULT_THEME_ . '/style/style-ltr.css';
if (!file_exists($def_style)) {
$def_style = 'themes/' . _DEAULT_THEME_ . '/style/style.css';
}
}
if (file_exists($def_style)) {addCSSToHead($def_style,'file');}
$engine_style = 'themes/' . _DEAULT_THEME_ . '/style/engine.css';
if (file_exists($engine_style)) {
addCSSToHead($engine_style,'file');
}else {
addCSSToHead(INCLUDES_ACP.'style/css/engine.css','file');
}
}
//& Define MODULE_CSS where u want to add a css file to header , just name it .
//& e.g. : define ("MODULE_CSS","gallery.css");
if (defined('MODULE_CSS')) {
$modCssFile = 'themes/' . _DEAULT_THEME_ . '/style/' . MODULE_CSS;
if (file_exists($modCssFile)) {
addCSSToHead($modCssFile, 'file');
}
}
if (function_exists("admin_head")) {
admin_head();
}
if (file_exists("includes/custom_files/custom_head.php")) {
include_once("includes/custom_files/custom_head.php");
}
//===================================================
//JS
//===================================================
include(INCLUDES_PATH."javascript.php");
writeHEAD();
echo "\n\n\n</head>\n<body>\n";
writeBODYJS();
if (file_exists("includes/custom_files/custom_header.php")) {
include_once("includes/custom_files/custom_header.php");
}
//===================================================
//SENTINEL
//===================================================
if($ab_config['site_switch'] == 1 && is_admin($_COOKIE['admin'])) {
if (time() > strtotime($ab_config['disable_to_date'])) {
echo '<div id="StaticDiv">
<a href="'.ADMIN_OP.'Configure"><img src="images/Guardian/inactive.png" alt="'._SITE_CLOSED.'" title="'._SITE_CLOSED.'">
<b>'._SITE_CLOSE_TIME_EXPIRED.'</b></a>
</div>';
}else {
echo '<div id="StaticDiv">
<a href="'.ADMIN_OP.'Configure"><img src="images/Guardian/inactive.png" alt="'._SITE_CLOSED.'" title="'._SITE_CLOSED.'" border="0">
<b>'._SITE_CLOSED.'</b></a>
</div>';
}
}
}
if (!defined("ADMIN_FILE")) {
themeheader();
}else {
adminheader(); // Where we sat Admin panel apart from other sections
}
}
//===================================================
//WESITE HEAD BEGINS
//===================================================
$start = benchGetTime();
head();
$end = benchGetTime();
if (BENCHMARK==true) {
echo benchmark_overall($start,$end,'HEADER');
}
//===================================================
//center blocks
//===================================================
if(defined('HOME_FILE')) {
message_box();
blocks("Center");
}
?>