Small update to iInstaller. :P
[iDB.git] / preindex.php
blob2ac8b4d80b3b4cba7c4e3e0df9c41fc1b90d790a
1 <?php
2 /*
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-2010 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: preindex.php - Last Update: 09/30/2010 SVN 564 - Author: cooldude2k $
16 $pretime = explode(" ", microtime());
17 $utime = $pretime[0];
18 $time = $pretime[1];
19 $starttime = $utime + $time;
20 $File3Name = basename($_SERVER['SCRIPT_NAME']);
21 if ($File3Name=="preindex.php"||$File3Name=="/preindex.php") {
22 header('Location: index.php');
23 exit(); }
24 require('sql.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 session_write_close(); die(); }
34 if(!isset($checklowview)) {
35 $checklowview = false; }
36 if($checklowview!==false&&$checklowview!==true) {
37 $checklowview = false; }
38 if($_GET['act']=="lofi"||$_GET['act']=="lo-fi"||
39 $_GET['act']=="LoFi"||$_GET['act']=="Lo-Fi"||
40 $_GET['act']=="lores"||$_GET['act']=="lo-res"||
41 $_GET['act']=="LoRes"||$_GET['act']=="Lo-Res"||
42 $_GET['act']=="LowView"||$_GET['act']=="low-view"||
43 $_GET['act']=="Low-View") { $_GET['act'] = "lowview"; }
44 if($_GET['act']!="lowview") {
45 $checklowview = false; }
46 if($Settings['enable_rss']=="on") {
47 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
48 if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
49 require($SettDir['inc'].'rssfeed.php'); } }
50 if($Settings['output_type']=="htm") {
51 $Settings['output_type'] = "html"; }
52 if($Settings['output_type']=="xhtm") {
53 $Settings['output_type'] = "xhtml"; }
54 if($Settings['output_type']=="xml+htm") {
55 $Settings['output_type'] = "xhtml"; }
56 if($Settings['html_type']=="html5") {
57 require($SettDir['inc'].'html5.php'); }
58 if($Settings['html_type']=="xhtml10") {
59 require($SettDir['inc'].'xhtml10.php'); }
60 if($Settings['html_type']=="xhtml11") {
61 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
62 $ccstart = "//<![CDATA["; $ccend = "//]]>";
63 require($SettDir['inc'].'xhtml11.php'); } else {
64 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")||
65 stristr($_SERVER["HTTP_USER_AGENT"],"WDG_Validator")||
66 stristr($_SERVER["HTTP_USER_AGENT"],"WDG_SiteValidator")) {
67 $ccstart = "//<![CDATA["; $ccend = "//]]>";
68 require($SettDir['inc'].'xhtml11.php'); } else {
69 $ccstart = "//<!--"; $ccend = "//-->";
70 $Settings['html_type']="xhtml10";
71 $Settings['html_level']="Strict";
72 require($SettDir['inc'].'xhtml10.php'); } } }
73 if($Settings['html_type']!="xhtml10"&&
74 $Settings['html_type']!="xhtml11"&&
75 $Settings['html_type']!="html5") {
76 $ccstart = "//<!--"; $ccend = "//-->";
77 require($SettDir['inc'].'xhtml10.php'); }