-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.php
231 lines (194 loc) · 9.39 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
/*=======================================================================
Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/*****[CHANGES]**********************************************************
-=[Base]=-
NukeSentinel v2.5.00 07/11/2006
Nuke Patched v3.1.0 06/26/2005
Advanced Security Extension v1.0.0 12/22/2005
-=[Other]=-
Dynamic Titles v1.0.0 06/11/2005
-=[Mod]=-
Collapsing Blocks v1.0.0 08/16/2005
NSN Center Blocks v2.2.1 05/26/2009
************************************************************************/
if(!defined('HEADER'))
{
define('HEADER', true);
}
else
{
return;
}
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
exit('Access Denied');
}
require_once(dirname(__FILE__).'/mainfile.php');
function head()
{
global $sitename, $ab_config, $modheader, $cache;
$ThemeSel = get_theme();
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
// echo '<!DOCTYPE html>';
// echo "<html lang=\""._LANGCODE."\" dir=\""._LANG_DIRECTION."\">\n";
echo '<head>'."\n";
# START uploadcare PLUGIN for CKeditor 4 - 09/07/2019
echo "\n\n<!-- START uploadcare -->\n\n";
echo "<script type=\"text/javascript\">\n";
echo "UPLOADCARE_PUBLIC_KEY = 'df691884c0a749427aa1';\n";
echo "UPLOADCARE_TABS = 'file camera url facebook gdrive gphotos dropbox instagram evernote flickr onedrive box vk huddle';\n";
echo "UPLOADCARE_EFFECTS = 'crop,rotate,mirror,flip,enhance,sharp,blur,grayscale,invert';\n";
echo "UPLOADCARE_PREVIEW_STEP = true;\n";
echo "UPLOADCARE_CLEARABLE = true;\n";
echo "</script>\n";
echo "<script src=\"https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js\"></script>\n";
echo "<script src=\"https://ucarecdn.com/libs/widget-tab-effects/1.x/uploadcare.tab-effects.js\"></script>\n";
echo "<script type=\"text/javascript\">\n";
echo "uploadcare.registerTab('preview', uploadcareTabEffects)\n";
echo "</script>\n";
echo "\n\n<!-- END uploadcare -->\n\n";
# START uploadcare PLUGIN for CKeditor 4 - 09/07/2019
# function to grab the page title.
the_pagetitle();
include_once(NUKE_INCLUDE_DIR.'meta.php');
# START Cookie SandBox added by Ernest Allen Buffington - 09/03/2019
include_once(NUKE_INCLUDE_DIR.'cookies.php');
# END Cookie SandBox added by Ernest Allen Buffington - 09/03/2019
include_once(NUKE_INCLUDE_DIR.'javascript.php');
include_once(NUKE_THEMES_DIR.$ThemeSel.'/theme.php');
if ((($favicon = $cache->load('favicon', 'config')) === false) || empty($favicon))
{
if (file_exists(NUKE_BASE_DIR.'favicon.ico')) $favicon = "favicon.ico";
else
if (file_exists(NUKE_IMAGES_DIR.'favicon.ico')) $favicon = "images/favicon.ico";
else
if (file_exists(NUKE_THEMES_DIR.$ThemeSel.'/images/favicon.ico')) $favicon = "themes/$ThemeSel/images/favicon.ico";
else
$favicon = 'none';
if ($favicon != 'none')
echo "<link rel=\"shortcut icon\" href=\"$favicon\" type=\"image/x-icon\" />\n";
$cache->save('favicon', 'config', $favicon);
}
else
{
if ($favicon != 'none')
echo "<link rel=\"shortcut icon\" href=\"$favicon\" type=\"image/x-icon\" />\n";
}
// If you use ForumNews Advance, you may want to replace the RSS News with the RSS ForumNews. Just remove the comments below and comment out the RSS News.
//echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS $sitename » ForumNews\" href=\"rss.php?feed=forumnews\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS $sitename » News\" href=\"rss.php?feed=news\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS $sitename » Forums\" href=\"rss.php?feed=forums\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS $sitename » Downloads\" href=\"rss.php?feed=downloads\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS $sitename » Web Links\" href=\"rss.php?feed=weblinks\">\n";
global $browser;
if(isset($modheader)) {
echo $modheader;
}
writeHEAD();
if ((($custom_head = $cache->load('custom_head', 'config')) === false) || empty($custom_head)) {
$custom_head = array();
if (file_exists(NUKE_INCLUDE_DIR.'custom_files/custom_head.php')) {
$custom_head[] = 'custom_head';
}
if (file_exists(NUKE_INCLUDE_DIR.'custom_files/custom_header.php')) {
$custom_head[] = 'custom_header';
}
if (!empty($custom_head)) {
foreach ($custom_head as $file) {
include_once(NUKE_INCLUDE_DIR.'custom_files/'.$file.'.php');
}
}
$cache->save('custom_head', 'config', $custom_head);
} else {
if (!empty($custom_head)) {
foreach ($custom_head as $file) {
include_once(NUKE_INCLUDE_DIR.'custom_files/'.$file.'.php');
}
}
}
/* ----- as you can probably tell this is used for IE compatibility ----- */
echo '<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script><![endif]-->'."\n";
echo "</head>\n";
themeheader();
/*****[BEGIN]******************************************
[ Base: NukeSentinel v2.5.00 ]
******************************************************/
if($ab_config['site_switch'] == 1) {
echo '<center><img src="modules/NukeSentinel/images/disabled.png" alt="'._AB_SITEDISABLED.'" title="'._AB_SITEDISABLED.'" border="0" /></center><br />';
}
/*****[END]********************************************
[ Base: NukeSentinel v2.5.00 ]
******************************************************/
}
function online()
{
global $prefix, $db, $name, $board_config, $userinfo, $identify;
$ip = $identify->get_ip();
$url = (defined('ADMIN_FILE')) ? 'index.php' : Fix_Quotes($_SERVER['REQUEST_URI']);
$uname = $ip;
$guest = 1;
$user_agent = $identify->identify_agent();
if (is_user()):
$uname = $userinfo['username'];
$guest = 0;
/*****[BEGIN]******************************************
[ Base: Advanced Security Extension v1.0.0 ]
******************************************************/
elseif($user_agent['engine'] == 'bot'):
$uname = $user_agent['bot'];
$guest = 3;
/*****[END]********************************************
[ Base: Advanced Security Extension v1.0.0 ]
******************************************************/
endif;
$custom_title = $name;
$url = str_replace("&", "&", $url);
$url = addslashes($url);
$past = time() - $board_config['online_time'];
$db->sql_query('DELETE FROM '.$prefix.'_session WHERE time < "'.$past.'"');
$ctime = time();
/**
* A replace into sql command was added, to prevent the duplication of users, This also saves on several lines of code.
*
* @since 2.0.9E
*/
$db->sql_query("replace into `".$prefix."_session` (uname, time, starttime, host_addr, guest, module, url) values ('".$uname."', '".$ctime."', '".$ctime."', '".$ip."', '".$guest."', '".$custom_title."', '".$url."');");
/**
* This sql replace command is to track who has been to the site and records their last visit.
*
* @since 2.0.9E
*/
if ( $guest == 0 )
$db->sql_query("replace into `".$prefix."_users_who_been` (`user_ID`, `username`, `last_visit`) values ('".$userinfo['user_id']."', '".$userinfo['username']."', ".time().");");
}
online();
head();
/*****[BEGIN]******************************************
[ Mod: NSN Center Blocks v2.2.1 ]
******************************************************/
if (!defined('ADMIN_FILE')):
include_once(NUKE_INCLUDE_DIR.'counter.php');
if (defined('HOME_FILE')):
include_once(NUKE_INCLUDE_DIR.'messagebox.php');
blocks('Center');
// If you want either of the following on all pages simply, move the include to before if (defined('HOME_FILE'))
include(NUKE_INCLUDE_DIR.'cblocks1.php');
include(NUKE_INCLUDE_DIR.'cblocks2.php');
endif;
endif;
/*****[END]********************************************
[ Mod: NSN Center Blocks v2.2.1 ]
******************************************************/
?>