OSDN Git Service

Added SQL Dumper. :P
[idb/iDB.git.git] / preindex.php
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.
5
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.
10
11     Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: preindex.php - Last Update: 5/30/2009 SVN 254 - Author: cooldude2k $
15 */
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('mysql.php');
25 if($_GET['act']=="sqldumper"&&$_SESSION['UserGroup']!=$Settings['GuestGroup']&&
26         $GroupInfo['HasAdminCP']=="yes") { require($SettDir['admin'].'sqldumper.php'); die(); }
27 if(!isset($checklowview)) {
28         $checklowview = false; }
29 if($checklowview!==false&&$checklowview!==true) {
30         $checklowview = false; }
31 if($_GET['act']!="lowview") { 
32         $checklowview = false; }
33 if($Settings['enable_rss']=="on") {
34 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
35 if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
36         require($SettDir['inc'].'rssfeed.php'); } }
37 if($Settings['output_type']=="htm") {
38         $Settings['output_type'] = "html"; }
39 if($Settings['output_type']=="xhtm") {
40         $Settings['output_type'] = "xhtml"; }
41 if($Settings['output_type']=="xml+htm") {
42         $Settings['output_type'] = "xhtml"; }
43 if($Settings['html_type']=="xhtml10") {
44 require($SettDir['inc'].'xhtml10.php'); }
45 if($Settings['html_type']=="xhtml11") {
46 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
47 $ccstart = "//<![CDATA["; $ccend = "//]]>";
48 require($SettDir['inc'].'xhtml11.php'); } else {
49 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
50         $ccstart = "//<![CDATA["; $ccend = "//]]>";
51    require($SettDir['inc'].'xhtml11.php'); } else { 
52            $ccstart = "//<!--"; $ccend = "//-->";
53            $Settings['html_type']="xhtml10";
54            $Settings['html_level']="Strict";
55            require($SettDir['inc'].'xhtml10.php'); } } }
56 if($Settings['html_type']!="xhtml10") {
57         if($Settings['html_type']!="xhtml11") {
58         $ccstart = "//<!--"; $ccend = "//-->";
59         require($SettDir['inc'].'xhtml10.php'); } }
60 ?>