Small bug fix.
[iDB.git] / preindex.php
blob03959dd0f3d7fe0ea24efd8494b72b5a240d81bb
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: 05/15/2010 SVN 491 - 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']!="lowview") {
39 $checklowview = false; }
40 if($Settings['enable_rss']=="on") {
41 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
42 if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
43 require($SettDir['inc'].'rssfeed.php'); } }
44 if($Settings['output_type']=="htm") {
45 $Settings['output_type'] = "html"; }
46 if($Settings['output_type']=="xhtm") {
47 $Settings['output_type'] = "xhtml"; }
48 if($Settings['output_type']=="xml+htm") {
49 $Settings['output_type'] = "xhtml"; }
50 if($Settings['html_type']=="html5") {
51 require($SettDir['inc'].'html5.php'); }
52 if($Settings['html_type']=="xhtml10") {
53 require($SettDir['inc'].'xhtml10.php'); }
54 if($Settings['html_type']=="xhtml11") {
55 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
56 $ccstart = "//<![CDATA["; $ccend = "//]]>";
57 require($SettDir['inc'].'xhtml11.php'); } else {
58 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
59 $ccstart = "//<![CDATA["; $ccend = "//]]>";
60 require($SettDir['inc'].'xhtml11.php'); } else {
61 $ccstart = "//<!--"; $ccend = "//-->";
62 $Settings['html_type']="xhtml10";
63 $Settings['html_level']="Strict";
64 require($SettDir['inc'].'xhtml10.php'); } } }
65 if($Settings['html_type']!="xhtml10"&&
66 $Settings['html_type']!="xhtml11"&&
67 $Settings['html_type']!="html5") {
68 $ccstart = "//<!--"; $ccend = "//-->";
69 require($SettDir['inc'].'xhtml10.php'); }