Browse code

new start point for integration

Jimmi08 authored on 2021/08/26 05:42:52
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,458 +0,0 @@
1
-<?php
2
-// ----------------------------------------------------------------------
3
-// Copyright (c) 2007 by Tammy Keefer
4
-// Based on eFiction 1.1
5
-// Copyright (C) 2003 by Rebecca Smallwood.
6
-// http://efiction.sourceforge.net/
7
-// ----------------------------------------------------------------------
8
-// LICENSE
9
-//
10
-// This program is free software; you can redistribute it and/or
11
-// modify it under the terms of the GNU General Public License (GPL)
12
-// as published by the Free Software Foundation; either version 2
13
-// of the License, or (at your option) any later version.
14
-//
15
-// This program is distributed in the hope that it will be useful,
16
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
-// GNU General Public License for more details.
19
-//
20
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
21
-// ----------------------------------------------------------------------
22
-
23
-// Force the argument separator to be standards compliant
24
-@ ini_set('arg_separator.output','&amp;'); 
25
-if(isset($_GET['debug'])) @ error_reporting(E_ALL);
26
-if(isset($_GET['benchmark'])) {
27
-	list($usec, $sec) = explode(" ", microtime());
28
-	$start = ((float)$usec + (float)$sec);
29
-}
30
-$headerSent = false;
31
-if(get_magic_quotes_gpc()){
32
-	foreach($_POST as $var => $val) {
33
-		$_POST[$var] = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
34
-	}
35
-	foreach($_GET as $var => $val) {
36
-		$_GET[$var] = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
37
-	}
38
-}
39
-
40
-// Defines the character set for your language/location
41
-define ("_CHARSET", "utf-8");
42
-
43
-// Prevent possible XSS attacks via $_GET.
44
-foreach ($_GET as $v) {
45
-	if(preg_match('@<script[^>]*?>.*?</script>@si', $v) ||
46
-		preg_match("'@<iframe[^>]*?>.*?</script>@si'", $v) ||
47
-		preg_match("'@<applet[^>]*?>.*?</script>@si'", $v) ||
48
-		preg_match("'@<meta[^>]*?>.*?</script>@si'", $v) ||
49
-		preg_match('@<[\/\!]*?[^<>]*?>@si', $v) ||
50
-		preg_match('@<style[^>]*?>.*?</style>@siU', $v) ||
51
-		preg_match('@<![\s\S]*?--[ \t\n\r]*>@', $v)) {
52
-		include("languages/en.php"); // no language set yet, so default to English.	
53
-		die (_POSSIBLEHACK);
54
-	}
55
-}
56
-unset($v);
57
-
58
-if(!isset($_SESSION)) session_start();
59
-// clear the global variables if register globals is on.
60
-if(ini_get('register_globals')) {
61
-	$arrayList = array_merge($_SESSION, $_GET, $_POST, $_COOKIE);
62
-	foreach($arrayList as $k => $v) {
63
-		unset($GLOBALS[$k]);
64
-	}
65
-}                   
66
- 
67
-Header('Cache-Control: private, no-cache, must-revalidate, max_age=0, post-check=0, pre-check=0');
68
-header ("Pragma: no-cache"); 
69
-header ("Expires: 0"); 
70
-header("Content-Type: text/html; charset="._CHARSET);
71
-
72
-// Locate config.php and set the basedir path
73
-$folder_level = "";
74
-while (!file_exists($folder_level."header.php")) { $folder_level .= "../"; }
75
-if(!defined("_BASEDIR")) define("_BASEDIR", $folder_level);
76
-
77
-@ include_once(_BASEDIR."config.php");
78
-@ include_once(_BASEDIR.UN_FULLAPP_PATH."class2.php");
79
-
80
-if(empty($sitekey)) {
81
-	header("Location: install/install.php");
82
-	exit( );
83
-}
84
-if(isset($skin)) $globalskin = $skin; 
85
-$settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
86
-$settings = dbassoc($settingsresults);
87
-if(!defined("SITEKEY")) define("SITEKEY", $settings['sitekey']);
88
-unset($settings['sitekey']);
89
-if(!defined("TABLEPREFIX")) define("TABLEPREFIX", $settings['tableprefix']);
90
-unset($settings['tableprefix']);
91
-define("STORIESPATH", $settings['storiespath']);
92
-unset($settings['storiespath']);
93
-foreach($settings as $var => $val) {
94
-	$$var = stripslashes($val);
95
-	$settings[$var] = htmlspecialchars($val);
96
-}
97
-
98
-if(isset($_GET['debug'])) $debug = 1;
99
-if(!$displaycolumns) $displaycolumns = 1; // shouldn't happen, but just in case.
100
-if($words) $words = explode(", ", $words);
101
-else $words = array( );
102
-// Fix for sites with 2.0 or 1.1 running as well as 3.0 with register_globals on.
103
-$defaultskin = $skin;
104
-
105
-if(isset($globalskin)) $skin = $globalskin;
106
-
107
-if(isset($_GET['action'])) $action = strip_tags($_GET['action']);
108
-else $action = false;
109
-
110
-if(file_exists(_BASEDIR."languages/{$language}.php")) include (_BASEDIR."languages/{$language}.php");
111
-else include (_BASEDIR."languages/en.php");
112
-
113
-include_once(_BASEDIR."includes/queries.php");
114
-include_once(_BASEDIR."includes/corefunctions.php");
115
-
116
-// Check and/or set some variables used at various points throughout the script
117
-if(isset($_GET['offset'])) $offset = $_GET['offset'];
118
-if(!isset($offset) || !isNumber($offset)) $offset = 0;
119
-if(isset($_REQUEST["sid"])) $sid = $_REQUEST["sid"];
120
-if(isset($sid) && !isNumber($sid)) unset($sid);
121
-if(isset($_REQUEST['seriesid'])) $seriesid = $_REQUEST["seriesid"];
122
-if(isset($seriesid) && !isNumber($seriesid)) unset($seriesid);
123
-if(isset($_REQUEST['uid'])) $uid = $_REQUEST["uid"];
124
-if(isset($uid) && !isNumber($uid)) unset($uid);
125
-if(isset($_REQUEST['chapid'])) $chapid = $_REQUEST["chapid"];
126
-if(isset($chapid) && !isNumber($chapid)) unset($chapid);
127
-$let = false;
128
-if(isset($_GET['let'])) $let = $_GET['let'];
129
-if(isset($let) && !in_array($let, $alphabet)) $let = false;
130
-$output = "";
131
-
132
-// Cleans these two variables of possible XSS attacks.
133
-if(isset($_SERVER['PHP_SELF'])) $_SERVER['PHP_SELF'] = htmlspecialchars(descript($_SERVER['PHP_SELF']), ENT_QUOTES);
134
-if(isset($PHP_SELF)) $PHP_SELF = htmlspecialchars(descript($PHP_SELF), ENT_QUOTES);
135
-
136
-// Set these variables to start.
137
-$agecontsent = false; $viewed = false; 
138
-
139
-require_once("includes/get_session_vars.php");
140
-
141
-if(isset($_GET['skin'])) {
142
-	$siteskin = $_GET['skin'];
143
-	$_SESSION[SITEKEY."_skin"] = $siteskin;
144
-}
145
-
146
-$v = explode(".", $version);
147
-include("version.php");
148
-$newV = explode(".", $version);
149
-//if($v[0] == $newV[0] && ($v[1] < $newV[1] || (isset($newV[2]) && $v[2] < $newV[2]))) {
150
-foreach($newV AS $k => $l) {
151
-	if($newV[$k] > $v[$k] || (!empty($newV[$k]) && empty($v[$k]))) {
152
-		if(isADMIN && basename($_SERVER['PHP_SELF']) != "update.php") {
153
-			header("Location: update.php");
154
-			exit( );
155
-		}
156
-		else if(!isADMIN && basename($_SERVER['PHP_SELF']) != "maintenance.php" && !(isset($_GET['action']) && $_GET['action'] == "login")) {
157
-			header("Location: maintenance.php");
158
-			exit( );
159
-		}
160
-	}
161
-}
162
-
163
-if(!empty($_SESSION[SITEKEY."_skin"])) $siteskin = $_SESSION[SITEKEY."_skin"];
164
-if($maintenance && !isADMIN && basename($_SERVER['PHP_SELF']) != "maintenance.php" && !(isset($_GET['action']) && $_GET['action'] == "login")) {
165
-	header("Location: maintenance.php");
166
-	exit( );
167
-}
168
-
169
-$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks");
170
-while($block = dbassoc($blockquery)) {
171
-	$blocks[$block['block_name']] = unserialize($block['block_variables']);
172
-	$blocks[$block['block_name']]['title'] = $block['block_title'];
173
-	$blocks[$block['block_name']]['file'] = $block['block_file'];
174
-	$blocks[$block['block_name']]['status'] = $block['block_status'];
175
-}
176
-
177
-// This session variable is used to track the story views
178
-if(isset($_SESSION[SITEKEY."_viewed"])) $viewed = $_SESSION[SITEKEY."_viewed"];
179
-
180
-if(isset($_GET['ageconsent'])) $_SESSION[SITEKEY."_ageconsent"] = 1;
181
-if(isset($_GET['warning'])) $_SESSION[SITEKEY."_warned"][$_GET['warning']] = 1;
182
-
183
-if(file_exists("languages/{$language}.php")) require_once ("languages/{$language}.php");
184
-else require_once ("languages/en.php");
185
-if(is_dir(_BASEDIR."skins/$siteskin")) $skindir = _BASEDIR."skins/$siteskin";
186
-else if(is_dir(_BASEDIR."skins/".$settings['skin'])) $skindir = _BASEDIR."skins/".$defaultskin;
187
-else $skindir = _BASEDIR."default_tpls";
188
-if(USERUID) {
189
-	$prefs = dbquery("SELECT sortby, storyindex, tinyMCE FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE uid = '".USERUID."'");
190
-	if(dbnumrows($prefs)) list($defaultsort, $displayindex, $tinyMCE) = dbrow($prefs);
191
-}
192
-if(isset($_REQUEST['sort'])) $defaultsort = $_REQUEST['sort'] == "update" ? 1 : 0;
193
-define("_ORDERBY", " ORDER BY ".($defaultsort == 1 ? "updated DESC" : "stories.title ASC"));
194
-if($current == "viewstory"){
195
-	if(isset($chapid)) {
196
-		$squery = dbquery("SELECT sid, inorder FROM ".TABLEPREFIX."fanfiction_chapters WHERE chapid = ".$chapid." LIMIT 1");
197
-		list($sid, $chapter) = dbrow($squery);
198
-	}
199
-	$titlequery = dbquery("SELECT story.title, story.coauthors, "._PENNAMEFIELD." as penname, story.summary FROM ".TABLEPREFIX."fanfiction_stories as story, "._AUTHORTABLE." WHERE sid = '$sid' AND "._UIDFIELD." = story.uid LIMIT 1");
200
-	if($story = dbassoc($titlequery)) { 
201
-			$authlink[] = $story['penname'];
202
-		if($story['coauthors']) {
203
-			$coquery = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors as ca ON "._UIDFIELD." = ca.uid WHERE ca.sid = '$sid'");
204
-			while($co = dbassoc($coquery)) {
205
-				$authlink[] = $co['penname'];
206
-			}
207
-		}
208
-		$titleinfo = stripslashes($story['title'])." "._BY." ".implode(", ", $authlink);
209
-		$metaDesc = htmlspecialchars(stripslashes($story['summary']));
210
-		$filename = basename($titleinfo.".html");
211
-		$ie = strpos("msie", strtolower($_SERVER['HTTP_USER_AGENT'])) !== false ? true : false;
212
-		if ($ie) $filename = rawurlencode($filename);
213
-		//header("Content-Disposition: inline; filename=\"".$titleinfo."\"");
214
- 	}
215
-}
216
-if($current == "viewuser" && isNumber($uid)) {
217
-	$author = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".$uid."'");
218
-	list($penname) = dbrow($author);
219
-	$titleinfo = "$sitename :: $penname";
220
-}
221
-echo _DOCTYPE."<html><head>";
222
-echo "<meta charset='utf-8' />";
223
-if(!isset($titleinfo)) $titleinfo = "$sitename :: $slogan";
224
-if(isset($metaDesc)) echo "<meta name='description' content='$metaDesc'>";
225
-echo "<title>$titleinfo</title>";
226
-
227
-// ---------- Favicon ---------
228
-if (file_exists($skindir."/images/favicon.ico")) 
229
-{
230
-	echo "<link rel='icon' href='".THEME_ABS."favicon.ico' type='image/x-icon' />\n<link rel='shortcut icon' href='".THEME_ABS."favicon.ico' type='image/xicon' />\n";
231
-}
232
-elseif (file_exists(_BASEDIR."favicon.ico")) 
233
-{
234
-	echo "<link rel='icon' href='"._BASEDIR."favicon.ico' type='image/x-icon' />\n<link rel='shortcut icon' href='"._BASEDIR."favicon.ico' type='image/xicon' />\n";
235
-}
236
- 
237
-
238
-echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\">";
239
-if(!isset($_GET['action']) || $_GET['action'] != "printable") {
240
-echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."includes/javascript.js\"></script>
241
-<link rel=\"alternate\" type=\"application/rss+xml\" title=\"$sitename RSS Feed\" href=\""._BASEDIR."rss.php\">";
242
-if(!empty($tinyMCE)) {
243
-	echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."tinymce/js/tinymce/tinymce.min.js\"></script>
244
-	<script language=\"javascript\" type=\"text/javascript\"><!--";
245
-	$tinymessage = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tinyMCE' LIMIT 1");
246
-	list($tinysettings) = dbrow($tinymessage);
247
-	if(!empty($tinysettings) && $current != "adminarea") {
248
-		echo $tinysettings;
249
-	}
250
-	else {
251
-		echo "
252
-	tinymce.init({
253
-  		selector: 'textarea:not(.mceNoEditor)',
254
-  		menubar: false,
255
-		language: '$language',
256
-  		theme: 'modern',
257
-		skin: 'lightgray',
258
-		min_height: 200,
259
-		plugins: [
260
-		    'autolink lists link image charmap paste preview hr anchor pagebreak',
261
-		    'searchreplace wordcount visualblocks visualchars code fullscreen',
262
-		    'insertdatetime media nonbreaking save table contextmenu directionality',
263
-		    'emoticons template textcolor colorpicker textpattern imagetools toc textcolor table'
264
-		],
265
-		paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td',
266
-		  		paste_retain_style_properties : 'all',
267
-		paste_strip_class_attributes: 'none',
268
-		toolbar1: 'undo redo | insert styleselect | bold italic underline strikethrough | link image | alignleft aligncenter alignright alignjustify',
269
-		toolbar2: 'preview | bullist numlist | forecolor backcolor emoticons | fontselect |  fontsizeselect wordcount',
270
-		image_advtab: true,
271
-		templates: [
272
-		    { title: 'Test template 1', content: 'Test 1' },
273
-		    { title: 'Test template 2', content: 'Test 2' }
274
-		],
275
-		content_css: [
276
-		    '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
277
-		    '//www.tinymce.com/css/codepen.min.css'
278
-		],";
279
-		if(USERUID) 
280
-			echo "		external_image_list_url : '".STORIESPATH."/".USERUID."/images/imagelist.js',";
281
-		echo "
282
-		theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")."
283
-   });
284
-	
285
-";
286
-	}
287
-	echo "
288
-var tinyMCEmode = true;
289
-	function toogleEditorMode(id) {
290
-		var elm = document.getElementById(id);
291
-
292
-		if (tinyMCE.getInstanceById(id) == null)
293
-			tinyMCE.execCommand('mceAddControl', false, id);
294
-		else
295
-			tinyMCE.execCommand('mceRemoveControl', false, id);
296
-	}
297
-";
298
-/*echo "
299
-var tinyMCEmode = true;
300
-	function toogleEditorMode(id) {
301
-		var elm = document.getElementById(id);
302
-
303
-		if (tinyMCE.get(id) == null)
304
-			tinyMCE.execCommand('mceAddControl', false, id);
305
-		else
306
-			tinyMCE.execCommand('mceRemoveControl', false, id);
307
-	}
308
-";*/
309
-echo " --></script>";
310
-}
311
-}
312
-if(isset($displayform) && $displayform == 1) {
313
-echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."includes/xmlhttp.js\"></script>";
314
-echo "<script language=\"javascript\" type=\"text/javascript\">
315
-lang = new Array( );
316
-
317
-lang['Back2Cats'] = '"._BACK2CATS."';
318
-lang['ChooseCat'] = '"._CHOOSECAT."';
319
-lang['Categories'] = '"._CATEGORIES."';
320
-lang['Characters'] = '"._CHARACTERS."';
321
-lang['MoveTop'] = '"._MOVETOP."';
322
-lang['TopLevel'] = '"._TOPLEVEL."';
323
-lang['CatLocked'] = '"._CATLOCKED."';
324
-basedir = '"._BASEDIR."';
325
-
326
-categories = new Array( );
327
-characters = new Array( );
328
-\n";
329
-/*
330
-	$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_categories ORDER BY leveldown, displayorder");
331
-$x = 0;
332
-	while($category = dbassoc($result)) {
333
-		echo "categories[$x] = new category(".$category['parentcatid'].", ".$category['catid'].", \"". str_replace('"', '\"', stripslashes($category['category']))."\", ".$category['locked'].", ".$category['displayorder'].");\r\n";
334
-		$catlist[$category['catid']] = array("name" => stripslashes($category['category']), "pid" => $category['parentcatid'], "locked" => (isADMIN ? 0 : $category['locked']), "order" => $category['displayorder'], "leveldown" => $category['leveldown']);
335
-		$x++;
336
-	}
337
-$x = 0;
338
-	$result = dbquery("SELECT charname, catid, charid FROM ".TABLEPREFIX."fanfiction_characters ORDER BY charname");
339
-	while($char = dbassoc($result)) {
340
-		echo "characters[$x] = new character(".$char['charid'].", ".$char['catid'].", \"".str_replace('"', '\"', stripslashes($char['charname']))."\");\r\n";
341
-		$charlist[$char['charid']] = array("name" => stripslashes($char['charname']), "catid" => $char['catid']);
342
-		$x++;
343
-	}
344
-*/
345
-echo "</script>";
346
-}
347
-if(file_exists("extra_header.php")) include_once("extra_header.php");
348
-if(file_exists("$skindir/extra_header.php")) include_once("$skindir/extra_header.php");
349
-if(!$displaycolumns) $displaycolumns = 1;
350
-$colwidth = floor(100/$displaycolumns);
351
-if(!empty($_GET['action']) && $_GET['action'] == "printable") {
352
-	if(file_exists("$skindir/printable.css")) echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$skindir/printable.css\">";
353
-	else echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"default_tpls/printable.css\">";
354
-	echo "<script type='text/javascript'>
355
-<!--
356
-if (window.print) {
357
-    window.print() ;  
358
-} else {
359
-    var WebBrowser = '<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>';
360
-document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
361
-    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = \"\";  
362
-}
363
-</script>";
364
-}
365
-else {
366
-echo "<style type=\"text/css\">
367
-#columncontainer { margin: 1em auto; width: auto; padding: 5%;}
368
-#browseblock, #memberblock { width: 100%; padding: 0; margin: 0; float: left; border: 0px solid transparent; }
369
-.column { float: left; width: ".($colwidth - 1)."%; }
370
-html>body .column { width: $colwidth%; }
371
-.cleaner { clear: both; height: 1px; font-size: 1px; margin: 0; padding: 0; background: transparent; }
372
-#settingsform { margin: 0; padding: 0; border: none; }
373
-#settingsform FORM { width: 100%; margin: 0 10%; }
374
-#settingsform LABEL { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left; }
375
-#settingsform DIV { clear: both;}
376
-#settingsform .fieldset SPAN { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left;}
377
-#settingsform .fieldset LABEL { float: none; width: auto; display: inline; text-align: left; clear: none; }
378
-#settingsform { float: left; margin: 1ex 10%; }
379
-#settingsform .tinytoggle { text-align: center; }
380
-#settingsform .tinytoggle LABEL { float: none; display: inline; width: auto; text-align: center; padding: 0; clear: none; }
381
-#settingsform #submitdiv { text-align: center; width: 100%;clear: both; height: 3em; }
382
-#settingsform #submitdiv #submit { position: absolute; z-index: 10001; margin: 1em; }
383
-a.pophelp{
384
-    position: relative; /* this is the key*/
385
-    vertical-align: super;
386
-}
387
-
388
-a.pophelp:hover{z-index:100; border: none; text-decoration: none;}
389
-
390
-a.pophelp span{display: none; position: absolute; top: -25em; left: 20em; }
391
-
392
-a.pophelp:hover span{ /*the span will display just on :hover state*/
393
-    display:block;
394
-    position: absolute;
395
-    top: -3em; left: 8em; width: 225px;
396
-    border:1px solid #000;
397
-    background-color:#CCC; color:#000;
398
-    text-decoration: none;
399
-    text-align: left;
400
-    padding: 5px;
401
-    font-weight: normal;
402
-    visibility: visible;
403
-}
404
-.required { color: red; }
405
-.shim {
406
-	position: absolute;
407
-	display: none;
408
-	height: 0;
409
-	width:0;
410
-	margin: 0;
411
-	padding: 0;
412
-	z-index: 100;
413
-}
414
-
415
-.ajaxOptList {
416
-	background: #CCC;
417
-	border: 1px solid #000;
418
-	margin: 0;
419
-	position: absolute;
420
-	padding: 0;
421
-	z-index: 1000;
422
-	text-align: left;
423
-}
424
-.ajaxListOptOver {
425
-	padding: 4px;
426
-	background: #CCC;
427
-	margin: 0;
428
-}
429
-.ajaxListOpt {
430
-	background: #EEE;
431
-	padding: 4px;
432
-	margin: 0;
433
-}
434
-.multiSelect {
435
-	width: 300px;
436
-}
437
-
438
-@media all and (max-width: 767px) { 
439
-html>body .column {
440
-    width: 100%;
441
-}
442
-
443
-</style>
444
-<link rel='stylesheet' type='text/css' href='$skindir/style.css' /> \n
445
-<meta name='viewport' content='width=device-width, initial-scale=1.0' />
446
-";
447
-}
448
-echo "</head>";
449
-$headerSent = true;
450
-include (_BASEDIR."includes/class.TemplatePower.inc.php");
451
-if($debug == 1) {
452
-	@ error_reporting(E_ALL);
453
-	echo "\n<!-- \$_SESSION \n"; print_r($_SESSION); echo " -->";
454
-	echo "\n<!-- \$_COOKIE \n"; print_r($_COOKIE); echo " -->";
455
-	echo "\n<!-- \$_POST \n"; print_r($_POST); echo " -->";
456
-}
457
-?>
Browse code

backup 3.52

Jimmi08 authored on 2021/04/02 11:08:04
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,458 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Based on eFiction 1.1
5
+// Copyright (C) 2003 by Rebecca Smallwood.
6
+// http://efiction.sourceforge.net/
7
+// ----------------------------------------------------------------------
8
+// LICENSE
9
+//
10
+// This program is free software; you can redistribute it and/or
11
+// modify it under the terms of the GNU General Public License (GPL)
12
+// as published by the Free Software Foundation; either version 2
13
+// of the License, or (at your option) any later version.
14
+//
15
+// This program is distributed in the hope that it will be useful,
16
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
+// GNU General Public License for more details.
19
+//
20
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
21
+// ----------------------------------------------------------------------
22
+
23
+// Force the argument separator to be standards compliant
24
+@ ini_set('arg_separator.output','&amp;'); 
25
+if(isset($_GET['debug'])) @ error_reporting(E_ALL);
26
+if(isset($_GET['benchmark'])) {
27
+	list($usec, $sec) = explode(" ", microtime());
28
+	$start = ((float)$usec + (float)$sec);
29
+}
30
+$headerSent = false;
31
+if(get_magic_quotes_gpc()){
32
+	foreach($_POST as $var => $val) {
33
+		$_POST[$var] = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
34
+	}
35
+	foreach($_GET as $var => $val) {
36
+		$_GET[$var] = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
37
+	}
38
+}
39
+
40
+// Defines the character set for your language/location
41
+define ("_CHARSET", "utf-8");
42
+
43
+// Prevent possible XSS attacks via $_GET.
44
+foreach ($_GET as $v) {
45
+	if(preg_match('@<script[^>]*?>.*?</script>@si', $v) ||
46
+		preg_match("'@<iframe[^>]*?>.*?</script>@si'", $v) ||
47
+		preg_match("'@<applet[^>]*?>.*?</script>@si'", $v) ||
48
+		preg_match("'@<meta[^>]*?>.*?</script>@si'", $v) ||
49
+		preg_match('@<[\/\!]*?[^<>]*?>@si', $v) ||
50
+		preg_match('@<style[^>]*?>.*?</style>@siU', $v) ||
51
+		preg_match('@<![\s\S]*?--[ \t\n\r]*>@', $v)) {
52
+		include("languages/en.php"); // no language set yet, so default to English.	
53
+		die (_POSSIBLEHACK);
54
+	}
55
+}
56
+unset($v);
57
+
58
+if(!isset($_SESSION)) session_start();
59
+// clear the global variables if register globals is on.
60
+if(ini_get('register_globals')) {
61
+	$arrayList = array_merge($_SESSION, $_GET, $_POST, $_COOKIE);
62
+	foreach($arrayList as $k => $v) {
63
+		unset($GLOBALS[$k]);
64
+	}
65
+}                   
66
+ 
67
+Header('Cache-Control: private, no-cache, must-revalidate, max_age=0, post-check=0, pre-check=0');
68
+header ("Pragma: no-cache"); 
69
+header ("Expires: 0"); 
70
+header("Content-Type: text/html; charset="._CHARSET);
71
+
72
+// Locate config.php and set the basedir path
73
+$folder_level = "";
74
+while (!file_exists($folder_level."header.php")) { $folder_level .= "../"; }
75
+if(!defined("_BASEDIR")) define("_BASEDIR", $folder_level);
76
+
77
+@ include_once(_BASEDIR."config.php");
78
+@ include_once(_BASEDIR.UN_FULLAPP_PATH."class2.php");
79
+
80
+if(empty($sitekey)) {
81
+	header("Location: install/install.php");
82
+	exit( );
83
+}
84
+if(isset($skin)) $globalskin = $skin; 
85
+$settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
86
+$settings = dbassoc($settingsresults);
87
+if(!defined("SITEKEY")) define("SITEKEY", $settings['sitekey']);
88
+unset($settings['sitekey']);
89
+if(!defined("TABLEPREFIX")) define("TABLEPREFIX", $settings['tableprefix']);
90
+unset($settings['tableprefix']);
91
+define("STORIESPATH", $settings['storiespath']);
92
+unset($settings['storiespath']);
93
+foreach($settings as $var => $val) {
94
+	$$var = stripslashes($val);
95
+	$settings[$var] = htmlspecialchars($val);
96
+}
97
+
98
+if(isset($_GET['debug'])) $debug = 1;
99
+if(!$displaycolumns) $displaycolumns = 1; // shouldn't happen, but just in case.
100
+if($words) $words = explode(", ", $words);
101
+else $words = array( );
102
+// Fix for sites with 2.0 or 1.1 running as well as 3.0 with register_globals on.
103
+$defaultskin = $skin;
104
+
105
+if(isset($globalskin)) $skin = $globalskin;
106
+
107
+if(isset($_GET['action'])) $action = strip_tags($_GET['action']);
108
+else $action = false;
109
+
110
+if(file_exists(_BASEDIR."languages/{$language}.php")) include (_BASEDIR."languages/{$language}.php");
111
+else include (_BASEDIR."languages/en.php");
112
+
113
+include_once(_BASEDIR."includes/queries.php");
114
+include_once(_BASEDIR."includes/corefunctions.php");
115
+
116
+// Check and/or set some variables used at various points throughout the script
117
+if(isset($_GET['offset'])) $offset = $_GET['offset'];
118
+if(!isset($offset) || !isNumber($offset)) $offset = 0;
119
+if(isset($_REQUEST["sid"])) $sid = $_REQUEST["sid"];
120
+if(isset($sid) && !isNumber($sid)) unset($sid);
121
+if(isset($_REQUEST['seriesid'])) $seriesid = $_REQUEST["seriesid"];
122
+if(isset($seriesid) && !isNumber($seriesid)) unset($seriesid);
123
+if(isset($_REQUEST['uid'])) $uid = $_REQUEST["uid"];
124
+if(isset($uid) && !isNumber($uid)) unset($uid);
125
+if(isset($_REQUEST['chapid'])) $chapid = $_REQUEST["chapid"];
126
+if(isset($chapid) && !isNumber($chapid)) unset($chapid);
127
+$let = false;
128
+if(isset($_GET['let'])) $let = $_GET['let'];
129
+if(isset($let) && !in_array($let, $alphabet)) $let = false;
130
+$output = "";
131
+
132
+// Cleans these two variables of possible XSS attacks.
133
+if(isset($_SERVER['PHP_SELF'])) $_SERVER['PHP_SELF'] = htmlspecialchars(descript($_SERVER['PHP_SELF']), ENT_QUOTES);
134
+if(isset($PHP_SELF)) $PHP_SELF = htmlspecialchars(descript($PHP_SELF), ENT_QUOTES);
135
+
136
+// Set these variables to start.
137
+$agecontsent = false; $viewed = false; 
138
+
139
+require_once("includes/get_session_vars.php");
140
+
141
+if(isset($_GET['skin'])) {
142
+	$siteskin = $_GET['skin'];
143
+	$_SESSION[SITEKEY."_skin"] = $siteskin;
144
+}
145
+
146
+$v = explode(".", $version);
147
+include("version.php");
148
+$newV = explode(".", $version);
149
+//if($v[0] == $newV[0] && ($v[1] < $newV[1] || (isset($newV[2]) && $v[2] < $newV[2]))) {
150
+foreach($newV AS $k => $l) {
151
+	if($newV[$k] > $v[$k] || (!empty($newV[$k]) && empty($v[$k]))) {
152
+		if(isADMIN && basename($_SERVER['PHP_SELF']) != "update.php") {
153
+			header("Location: update.php");
154
+			exit( );
155
+		}
156
+		else if(!isADMIN && basename($_SERVER['PHP_SELF']) != "maintenance.php" && !(isset($_GET['action']) && $_GET['action'] == "login")) {
157
+			header("Location: maintenance.php");
158
+			exit( );
159
+		}
160
+	}
161
+}
162
+
163
+if(!empty($_SESSION[SITEKEY."_skin"])) $siteskin = $_SESSION[SITEKEY."_skin"];
164
+if($maintenance && !isADMIN && basename($_SERVER['PHP_SELF']) != "maintenance.php" && !(isset($_GET['action']) && $_GET['action'] == "login")) {
165
+	header("Location: maintenance.php");
166
+	exit( );
167
+}
168
+
169
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks");
170
+while($block = dbassoc($blockquery)) {
171
+	$blocks[$block['block_name']] = unserialize($block['block_variables']);
172
+	$blocks[$block['block_name']]['title'] = $block['block_title'];
173
+	$blocks[$block['block_name']]['file'] = $block['block_file'];
174
+	$blocks[$block['block_name']]['status'] = $block['block_status'];
175
+}
176
+
177
+// This session variable is used to track the story views
178
+if(isset($_SESSION[SITEKEY."_viewed"])) $viewed = $_SESSION[SITEKEY."_viewed"];
179
+
180
+if(isset($_GET['ageconsent'])) $_SESSION[SITEKEY."_ageconsent"] = 1;
181
+if(isset($_GET['warning'])) $_SESSION[SITEKEY."_warned"][$_GET['warning']] = 1;
182
+
183
+if(file_exists("languages/{$language}.php")) require_once ("languages/{$language}.php");
184
+else require_once ("languages/en.php");
185
+if(is_dir(_BASEDIR."skins/$siteskin")) $skindir = _BASEDIR."skins/$siteskin";
186
+else if(is_dir(_BASEDIR."skins/".$settings['skin'])) $skindir = _BASEDIR."skins/".$defaultskin;
187
+else $skindir = _BASEDIR."default_tpls";
188
+if(USERUID) {
189
+	$prefs = dbquery("SELECT sortby, storyindex, tinyMCE FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE uid = '".USERUID."'");
190
+	if(dbnumrows($prefs)) list($defaultsort, $displayindex, $tinyMCE) = dbrow($prefs);
191
+}
192
+if(isset($_REQUEST['sort'])) $defaultsort = $_REQUEST['sort'] == "update" ? 1 : 0;
193
+define("_ORDERBY", " ORDER BY ".($defaultsort == 1 ? "updated DESC" : "stories.title ASC"));
194
+if($current == "viewstory"){
195
+	if(isset($chapid)) {
196
+		$squery = dbquery("SELECT sid, inorder FROM ".TABLEPREFIX."fanfiction_chapters WHERE chapid = ".$chapid." LIMIT 1");
197
+		list($sid, $chapter) = dbrow($squery);
198
+	}
199
+	$titlequery = dbquery("SELECT story.title, story.coauthors, "._PENNAMEFIELD." as penname, story.summary FROM ".TABLEPREFIX."fanfiction_stories as story, "._AUTHORTABLE." WHERE sid = '$sid' AND "._UIDFIELD." = story.uid LIMIT 1");
200
+	if($story = dbassoc($titlequery)) { 
201
+			$authlink[] = $story['penname'];
202
+		if($story['coauthors']) {
203
+			$coquery = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors as ca ON "._UIDFIELD." = ca.uid WHERE ca.sid = '$sid'");
204
+			while($co = dbassoc($coquery)) {
205
+				$authlink[] = $co['penname'];
206
+			}
207
+		}
208
+		$titleinfo = stripslashes($story['title'])." "._BY." ".implode(", ", $authlink);
209
+		$metaDesc = htmlspecialchars(stripslashes($story['summary']));
210
+		$filename = basename($titleinfo.".html");
211
+		$ie = strpos("msie", strtolower($_SERVER['HTTP_USER_AGENT'])) !== false ? true : false;
212
+		if ($ie) $filename = rawurlencode($filename);
213
+		//header("Content-Disposition: inline; filename=\"".$titleinfo."\"");
214
+ 	}
215
+}
216
+if($current == "viewuser" && isNumber($uid)) {
217
+	$author = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".$uid."'");
218
+	list($penname) = dbrow($author);
219
+	$titleinfo = "$sitename :: $penname";
220
+}
221
+echo _DOCTYPE."<html><head>";
222
+echo "<meta charset='utf-8' />";
223
+if(!isset($titleinfo)) $titleinfo = "$sitename :: $slogan";
224
+if(isset($metaDesc)) echo "<meta name='description' content='$metaDesc'>";
225
+echo "<title>$titleinfo</title>";
226
+
227
+// ---------- Favicon ---------
228
+if (file_exists($skindir."/images/favicon.ico")) 
229
+{
230
+	echo "<link rel='icon' href='".THEME_ABS."favicon.ico' type='image/x-icon' />\n<link rel='shortcut icon' href='".THEME_ABS."favicon.ico' type='image/xicon' />\n";
231
+}
232
+elseif (file_exists(_BASEDIR."favicon.ico")) 
233
+{
234
+	echo "<link rel='icon' href='"._BASEDIR."favicon.ico' type='image/x-icon' />\n<link rel='shortcut icon' href='"._BASEDIR."favicon.ico' type='image/xicon' />\n";
235
+}
236
+ 
237
+
238
+echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\">";
239
+if(!isset($_GET['action']) || $_GET['action'] != "printable") {
240
+echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."includes/javascript.js\"></script>
241
+<link rel=\"alternate\" type=\"application/rss+xml\" title=\"$sitename RSS Feed\" href=\""._BASEDIR."rss.php\">";
242
+if(!empty($tinyMCE)) {
243
+	echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."tinymce/js/tinymce/tinymce.min.js\"></script>
244
+	<script language=\"javascript\" type=\"text/javascript\"><!--";
245
+	$tinymessage = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tinyMCE' LIMIT 1");
246
+	list($tinysettings) = dbrow($tinymessage);
247
+	if(!empty($tinysettings) && $current != "adminarea") {
248
+		echo $tinysettings;
249
+	}
250
+	else {
251
+		echo "
252
+	tinymce.init({
253
+  		selector: 'textarea:not(.mceNoEditor)',
254
+  		menubar: false,
255
+		language: '$language',
256
+  		theme: 'modern',
257
+		skin: 'lightgray',
258
+		min_height: 200,
259
+		plugins: [
260
+		    'autolink lists link image charmap paste preview hr anchor pagebreak',
261
+		    'searchreplace wordcount visualblocks visualchars code fullscreen',
262
+		    'insertdatetime media nonbreaking save table contextmenu directionality',
263
+		    'emoticons template textcolor colorpicker textpattern imagetools toc textcolor table'
264
+		],
265
+		paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td',
266
+		  		paste_retain_style_properties : 'all',
267
+		paste_strip_class_attributes: 'none',
268
+		toolbar1: 'undo redo | insert styleselect | bold italic underline strikethrough | link image | alignleft aligncenter alignright alignjustify',
269
+		toolbar2: 'preview | bullist numlist | forecolor backcolor emoticons | fontselect |  fontsizeselect wordcount',
270
+		image_advtab: true,
271
+		templates: [
272
+		    { title: 'Test template 1', content: 'Test 1' },
273
+		    { title: 'Test template 2', content: 'Test 2' }
274
+		],
275
+		content_css: [
276
+		    '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
277
+		    '//www.tinymce.com/css/codepen.min.css'
278
+		],";
279
+		if(USERUID) 
280
+			echo "		external_image_list_url : '".STORIESPATH."/".USERUID."/images/imagelist.js',";
281
+		echo "
282
+		theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")."
283
+   });
284
+	
285
+";
286
+	}
287
+	echo "
288
+var tinyMCEmode = true;
289
+	function toogleEditorMode(id) {
290
+		var elm = document.getElementById(id);
291
+
292
+		if (tinyMCE.getInstanceById(id) == null)
293
+			tinyMCE.execCommand('mceAddControl', false, id);
294
+		else
295
+			tinyMCE.execCommand('mceRemoveControl', false, id);
296
+	}
297
+";
298
+/*echo "
299
+var tinyMCEmode = true;
300
+	function toogleEditorMode(id) {
301
+		var elm = document.getElementById(id);
302
+
303
+		if (tinyMCE.get(id) == null)
304
+			tinyMCE.execCommand('mceAddControl', false, id);
305
+		else
306
+			tinyMCE.execCommand('mceRemoveControl', false, id);
307
+	}
308
+";*/
309
+echo " --></script>";
310
+}
311
+}
312
+if(isset($displayform) && $displayform == 1) {
313
+echo "<script language=\"javascript\" type=\"text/javascript\" src=\""._BASEDIR."includes/xmlhttp.js\"></script>";
314
+echo "<script language=\"javascript\" type=\"text/javascript\">
315
+lang = new Array( );
316
+
317
+lang['Back2Cats'] = '"._BACK2CATS."';
318
+lang['ChooseCat'] = '"._CHOOSECAT."';
319
+lang['Categories'] = '"._CATEGORIES."';
320
+lang['Characters'] = '"._CHARACTERS."';
321
+lang['MoveTop'] = '"._MOVETOP."';
322
+lang['TopLevel'] = '"._TOPLEVEL."';
323
+lang['CatLocked'] = '"._CATLOCKED."';
324
+basedir = '"._BASEDIR."';
325
+
326
+categories = new Array( );
327
+characters = new Array( );
328
+\n";
329
+/*
330
+	$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_categories ORDER BY leveldown, displayorder");
331
+$x = 0;
332
+	while($category = dbassoc($result)) {
333
+		echo "categories[$x] = new category(".$category['parentcatid'].", ".$category['catid'].", \"". str_replace('"', '\"', stripslashes($category['category']))."\", ".$category['locked'].", ".$category['displayorder'].");\r\n";
334
+		$catlist[$category['catid']] = array("name" => stripslashes($category['category']), "pid" => $category['parentcatid'], "locked" => (isADMIN ? 0 : $category['locked']), "order" => $category['displayorder'], "leveldown" => $category['leveldown']);
335
+		$x++;
336
+	}
337
+$x = 0;
338
+	$result = dbquery("SELECT charname, catid, charid FROM ".TABLEPREFIX."fanfiction_characters ORDER BY charname");
339
+	while($char = dbassoc($result)) {
340
+		echo "characters[$x] = new character(".$char['charid'].", ".$char['catid'].", \"".str_replace('"', '\"', stripslashes($char['charname']))."\");\r\n";
341
+		$charlist[$char['charid']] = array("name" => stripslashes($char['charname']), "catid" => $char['catid']);
342
+		$x++;
343
+	}
344
+*/
345
+echo "</script>";
346
+}
347
+if(file_exists("extra_header.php")) include_once("extra_header.php");
348
+if(file_exists("$skindir/extra_header.php")) include_once("$skindir/extra_header.php");
349
+if(!$displaycolumns) $displaycolumns = 1;
350
+$colwidth = floor(100/$displaycolumns);
351
+if(!empty($_GET['action']) && $_GET['action'] == "printable") {
352
+	if(file_exists("$skindir/printable.css")) echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$skindir/printable.css\">";
353
+	else echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"default_tpls/printable.css\">";
354
+	echo "<script type='text/javascript'>
355
+<!--
356
+if (window.print) {
357
+    window.print() ;  
358
+} else {
359
+    var WebBrowser = '<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>';
360
+document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
361
+    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = \"\";  
362
+}
363
+-->
364
+</script>";
365
+}
366
+else {
367
+echo "<style type=\"text/css\">
368
+#columncontainer { margin: 1em auto; width: auto; padding: 5%;}
369
+#browseblock, #memberblock { width: 100%; padding: 0; margin: 0; float: left; border: 0px solid transparent; }
370
+.column { float: left; width: ".($colwidth - 1)."%; }
371
+html>body .column { width: $colwidth%; }
372
+.cleaner { clear: both; height: 1px; font-size: 1px; margin: 0; padding: 0; background: transparent; }
373
+#settingsform { margin: 0; padding: 0; border: none; }
374
+#settingsform FORM { width: 100%; margin: 0 10%; }
375
+#settingsform LABEL { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left; }
376
+#settingsform DIV { clear: both;}
377
+#settingsform .fieldset SPAN { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left;}
378
+#settingsform .fieldset LABEL { float: none; width: auto; display: inline; text-align: left; clear: none; }
379
+#settingsform { float: left; margin: 1ex 10%; }
380
+#settingsform .tinytoggle { text-align: center; }
381
+#settingsform .tinytoggle LABEL { float: none; display: inline; width: auto; text-align: center; padding: 0; clear: none; }
382
+#settingsform #submitdiv { text-align: center; width: 100%;clear: both; height: 3em; }
383
+#settingsform #submitdiv #submit { position: absolute; z-index: 10001; margin: 1em; }
384
+a.pophelp{
385
+    position: relative; /* this is the key*/
386
+    vertical-align: super;
387
+}
388
+
389
+a.pophelp:hover{z-index:100; border: none; text-decoration: none;}
390
+
391
+a.pophelp span{display: none; position: absolute; top: -25em; left: 20em; }
392
+
393
+a.pophelp:hover span{ /*the span will display just on :hover state*/
394
+    display:block;
395
+    position: absolute;
396
+    top: -3em; left: 8em; width: 225px;
397
+    border:1px solid #000;
398
+    background-color:#CCC; color:#000;
399
+    text-decoration: none;
400
+    text-align: left;
401
+    padding: 5px;
402
+    font-weight: normal;
403
+    visibility: visible;
404
+}
405
+.required { color: red; }
406
+.shim {
407
+	position: absolute;
408
+	display: none;
409
+	height: 0;
410
+	width:0;
411
+	margin: 0;
412
+	padding: 0;
413
+	z-index: 100;
414
+}
415
+
416
+.ajaxOptList {
417
+	background: #CCC;
418
+	border: 1px solid #000;
419
+	margin: 0;
420
+	position: absolute;
421
+	padding: 0;
422
+	z-index: 1000;
423
+	text-align: left;
424
+}
425
+.ajaxListOptOver {
426
+	padding: 4px;
427
+	background: #CCC;
428
+	margin: 0;
429
+}
430
+.ajaxListOpt {
431
+	background: #EEE;
432
+	padding: 4px;
433
+	margin: 0;
434
+}
435
+.multiSelect {
436
+	width: 300px;
437
+}
438
+
439
+@media all and (max-width: 767px) { 
440
+html>body .column {
441
+    width: 100%;
442
+}
443
+
444
+</style>
445
+<link rel='stylesheet' type='text/css' href='$skindir/style.css' /> \n
446
+<meta name='viewport' content='width=device-width, initial-scale=1.0' />
447
+";
448
+}
449
+echo "</head>";
450
+$headerSent = true;
451
+include (_BASEDIR."includes/class.TemplatePower.inc.php");
452
+if($debug == 1) {
453
+	@ error_reporting(E_ALL);
454
+	echo "\n<!-- \$_SESSION \n"; print_r($_SESSION); echo " -->";
455
+	echo "\n<!-- \$_COOKIE \n"; print_r($_COOKIE); echo " -->";
456
+	echo "\n<!-- \$_POST \n"; print_r($_POST); echo " -->";
457
+}
458
+?>