3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: preindex.php - Last Update: 07/08/2011 SVN 697 - Author: cooldude2k $
16 $pretime = explode(" ", microtime());
19 $starttime = $utime +
$time;
20 $File3Name = basename($_SERVER['SCRIPT_NAME']);
21 if ($File3Name=="preindex.php"||
$File3Name=="/preindex.php") {
22 header('Location: index.php');
25 if($_GET['act']=="sqldumper"&&$_SESSION['UserGroup']!=$Settings['GuestGroup']&&
26 $GroupInfo['HasAdminCP']=="yes") {
27 if($Settings['sqltype']=="mysql"||
$Settings['sqltype']=="mysqli") {
28 require($SettDir['sqldumper'].'mysql.php'); }
29 if($Settings['sqltype']=="pgsql") {
30 require($SettDir['sqldumper'].'pgsql.php'); }
31 if($Settings['sqltype']=="sqlite") {
32 require($SettDir['sqldumper'].'sqlite.php'); }
33 if($Settings['sqltype']=="cubrid") {
34 require($SettDir['sqldumper'].'cubrid.php'); }
35 session_write_close(); die(); }
36 if(!isset($checklowview)) {
37 $checklowview = false; }
38 if($checklowview!==false&&$checklowview!==true) {
39 $checklowview = false; }
40 if($_GET['act']=="lofi"||
$_GET['act']=="lo-fi"||
41 $_GET['act']=="LoFi"||
$_GET['act']=="Lo-Fi"||
42 $_GET['act']=="lores"||
$_GET['act']=="lo-res"||
43 $_GET['act']=="LoRes"||
$_GET['act']=="Lo-Res"||
44 $_GET['act']=="LowView"||
$_GET['act']=="low-view"||
45 $_GET['act']=="Low-View") { $_GET['act'] = "lowview"; }
46 if($_GET['act']!="lowview") {
47 $checklowview = false; }
48 if($Settings['enable_rss']=="on") {
49 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
50 if($_GET['feed']=="rss"||
$_GET['act']=="feed"||
51 $_GET['feed']=="oldrss"||
$_GET['feed']=="atom"||
52 $_GET['feed']=="opml"||
$_GET['feed']=="opensearch") {
53 $_GET['feedtype'] = $_GET['feed']; }
54 if($_GET['feed']=="rss"||
$_GET['act']=="Feed"||
55 $_GET['feed']=="oldrss"||
$_GET['feed']=="atom"||
56 $_GET['feed']=="opml"||
$_GET['feed']=="opensearch"||
57 $_GET['act']=="feed") {
58 require($SettDir['inc'].'rssfeed.php'); } }
59 if($Settings['output_type']=="htm") {
60 $Settings['output_type'] = "html"; }
61 if($Settings['output_type']=="xhtm") {
62 $Settings['output_type'] = "xhtml"; }
63 if($Settings['output_type']=="xml+htm") {
64 $Settings['output_type'] = "xhtml"; }
65 if($Settings['html_type']=="html5"||
66 $Settings['html_type']=="xhtml5") {
67 require($SettDir['inc'].'html5.php'); }
68 if($Settings['html_type']=="xhtml10") {
69 require($SettDir['inc'].'xhtml10.php'); }
70 if($Settings['html_type']=="xhtml11") {
71 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
72 $ccstart = "//<![CDATA["; $ccend = "//]]>";
73 require($SettDir['inc'].'xhtml11.php'); } else {
74 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")||
75 stristr($_SERVER["HTTP_USER_AGENT"],"WDG_Validator")||
76 stristr($_SERVER["HTTP_USER_AGENT"],"WDG_SiteValidator")) {
77 $ccstart = "//<![CDATA["; $ccend = "//]]>";
78 require($SettDir['inc'].'xhtml11.php'); } else {
79 $ccstart = "//<!--"; $ccend = "//-->";
80 $Settings['html_type']="xhtml10";
81 $Settings['html_level']="Strict";
82 require($SettDir['inc'].'xhtml10.php'); } } }
83 if($Settings['html_type']!="xhtml10"&&
84 $Settings['html_type']!="xhtml11"&&
85 $Settings['html_type']!="html5"&&
86 $Settings['html_type']!="xhtml5") {
87 $ccstart = "//<!--"; $ccend = "//-->";
88 require($SettDir['inc'].'xhtml10.php'); }