OSDN Git Service

Delete stats.php
[idb/iDB.git.git] / preindex.php
index e6f92bb..5790243 100644 (file)
@@ -8,19 +8,54 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     Revised BSD License for more details.
 
-    Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
-    Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2017 iDB Support - http://idb.berlios.de/
+    Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: preindex.php - Last Update: 01/01/2008 SVN 144 - Author: cooldude2k $
+    $FileInfo: preindex.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
 */
+$pretime = explode(" ", microtime());
+$utime = $pretime[0];
+$time = $pretime[1];
+$starttime = $utime + $time;
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="preindex.php"||$File3Name=="/preindex.php") {
-       @header('Location: index.php');
+       header('Location: index.php');
        exit(); }
-require('mysql.php');
-if($Settings['enable_rss']==true) {
+require('sql.php');
+if($_GET['act']=="sqldumper"&&$Settings['sqltype']=="cubrid") { $_GET['act'] = "view"; }
+if($_GET['act']=="sqldumper"&&$_SESSION['UserGroup']!=$Settings['GuestGroup']&&
+       $GroupInfo['HasAdminCP']=="yes") { 
+       if($Settings['sqltype']=="mysql"||$Settings['sqltype']=="mysqli") {
+       require($SettDir['sqldumper'].'mysql.php'); }
+       if($Settings['sqltype']=="pgsql") {
+       require($SettDir['sqldumper'].'pgsql.php'); } 
+       if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") {
+       require($SettDir['sqldumper'].'sqlite.php'); } 
+       if($Settings['sqltype']=="cubrid") {
+       require($SettDir['sqldumper'].'cubrid.php'); } 
+       session_write_close(); die(); }
+if(!isset($checklowview)) {
+       $checklowview = false; }
+if($checklowview!==false&&$checklowview!==true) {
+       $checklowview = false; }
+if($_GET['act']=="lofi"||$_GET['act']=="lo-fi"||
+       $_GET['act']=="LoFi"||$_GET['act']=="Lo-Fi"||
+       $_GET['act']=="lores"||$_GET['act']=="lo-res"||
+       $_GET['act']=="LoRes"||$_GET['act']=="Lo-Res"||
+       $_GET['act']=="LowView"||$_GET['act']=="low-view"||
+       $_GET['act']=="Low-View") { $_GET['act'] = "lowview"; }
+if($_GET['act']!="lowview") { 
+       $checklowview = false; }
+if($Settings['enable_rss']=="on") {
 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
-if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
+if($_GET['feed']=="rss"||$_GET['act']=="feed"||
+       $_GET['feed']=="oldrss"||$_GET['feed']=="atom"||
+       $_GET['feed']=="opml"||$_GET['feed']=="opensearch") {
+       $_GET['feedtype'] = $_GET['feed']; }
+if($_GET['feed']=="rss"||$_GET['act']=="Feed"||
+       $_GET['feed']=="oldrss"||$_GET['feed']=="atom"||
+       $_GET['feed']=="opml"||$_GET['feed']=="opensearch"||
+       $_GET['act']=="feed") {
        require($SettDir['inc'].'rssfeed.php'); } }
 if($Settings['output_type']=="htm") {
        $Settings['output_type'] = "html"; }
@@ -28,21 +63,9 @@ if($Settings['output_type']=="xhtm") {
        $Settings['output_type'] = "xhtml"; }
 if($Settings['output_type']=="xml+htm") {
        $Settings['output_type'] = "xhtml"; }
-if($Settings['html_type']=="xhtml10") {
-require($SettDir['inc'].'xhtml10.php'); }
-if($Settings['html_type']=="xhtml11") {
-if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
-$ccstart = "//<![CDATA["; $ccend = "//]]>";
-require($SettDir['inc'].'xhtml11.php'); } else {
-if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
-       $ccstart = "//<![CDATA["; $ccend = "//]]>";
-   require($SettDir['inc'].'xhtml11.php'); } else { 
-          $ccstart = "//<!--"; $ccend = "//-->";
-          $Settings['html_type']="xhtml10";
-          $Settings['html_level']="Strict";
-          require($SettDir['inc'].'xhtml10.php'); } } }
-if($Settings['html_type']!="xhtml10") {
-       if($Settings['html_type']!="xhtml11") {
-       $ccstart = "//<!--"; $ccend = "//-->";
-       require($SettDir['inc'].'xhtml10.php'); } }
-?>
\ No newline at end of file
+if($Settings['html_type']=="html5"||
+       $Settings['html_type']=="xhtml5"||
+       ($Settings['html_type']!="html5"&&
+        $Settings['html_type']!="xhtml5")) {
+require($SettDir['inc'].'html5.php'); }
+?>