OSDN Git Service

Small change. :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-2008 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: preindex.php - Last Update: 12/09/2008 SVN 207 - Author: cooldude2k $
15 */
16 $pretime = explode(" ", microtime());
17 $utime = $pretime[0];
18 $time = $pretime[1];
19 $_POST['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($Settings['enable_rss']=="on") {
26 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
27 if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
28         require($SettDir['inc'].'rssfeed.php'); } }
29 if($Settings['output_type']=="htm") {
30         $Settings['output_type'] = "html"; }
31 if($Settings['output_type']=="xhtm") {
32         $Settings['output_type'] = "xhtml"; }
33 if($Settings['output_type']=="xml+htm") {
34         $Settings['output_type'] = "xhtml"; }
35 if($Settings['html_type']=="xhtml10") {
36 require($SettDir['inc'].'xhtml10.php'); }
37 if($Settings['html_type']=="xhtml11") {
38 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
39 $ccstart = "//<![CDATA["; $ccend = "//]]>";
40 require($SettDir['inc'].'xhtml11.php'); } else {
41 if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
42         $ccstart = "//<![CDATA["; $ccend = "//]]>";
43    require($SettDir['inc'].'xhtml11.php'); } else { 
44            $ccstart = "//<!--"; $ccend = "//-->";
45            $Settings['html_type']="xhtml10";
46            $Settings['html_level']="Strict";
47            require($SettDir['inc'].'xhtml10.php'); } } }
48 if($Settings['html_type']!="xhtml10") {
49         if($Settings['html_type']!="xhtml11") {
50         $ccstart = "//<!--"; $ccend = "//-->";
51         require($SettDir['inc'].'xhtml10.php'); } }
52 ?>