Small update
[iDB.git] / preindex.php
blob8edfa1fe8072d783f72b60ac4f440b6ab836b801
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-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: preindex.php - Last Update: 08/02/2019 SVN 905 - 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"&&$Settings['sqltype']=="cubrid") { $_GET['act'] = "view"; }
26 if($_GET['act']=="sqldumper"&&$_SESSION['UserGroup']!=$Settings['GuestGroup']&&
27 $GroupInfo['HasAdminCP']=="yes") {
28 if($Settings['sqltype']=="mysql"||$Settings['sqltype']=="mysqli") {
29 require($SettDir['sqldumper'].'mysql.php'); }
30 if($Settings['sqltype']=="pgsql") {
31 require($SettDir['sqldumper'].'pgsql.php'); }
32 if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") {
33 require($SettDir['sqldumper'].'sqlite.php'); }
34 if($Settings['sqltype']=="cubrid") {
35 require($SettDir['sqldumper'].'cubrid.php'); }
36 session_write_close(); die(); }
37 if(!isset($checklowview)) {
38 $checklowview = false; }
39 if($checklowview!==false&&$checklowview!==true) {
40 $checklowview = false; }
41 if($_GET['act']=="lofi"||$_GET['act']=="lo-fi"||
42 $_GET['act']=="LoFi"||$_GET['act']=="Lo-Fi"||
43 $_GET['act']=="lores"||$_GET['act']=="lo-res"||
44 $_GET['act']=="LoRes"||$_GET['act']=="Lo-Res"||
45 $_GET['act']=="LowView"||$_GET['act']=="low-view"||
46 $_GET['act']=="Low-View") { $_GET['act'] = "lowview"; }
47 if($_GET['act']!="lowview") {
48 $checklowview = false; }
49 if($Settings['enable_rss']=="on") {
50 if(!isset($_GET['feed'])) { $_GET['feed'] = null; }
51 if($_GET['feed']=="rss"||$_GET['act']=="feed"||
52 $_GET['feed']=="oldrss"||$_GET['feed']=="atom"||
53 $_GET['feed']=="opml"||$_GET['feed']=="opensearch") {
54 $_GET['feedtype'] = $_GET['feed']; }
55 if($_GET['feed']=="rss"||$_GET['act']=="Feed"||
56 $_GET['feed']=="oldrss"||$_GET['feed']=="atom"||
57 $_GET['feed']=="opml"||$_GET['feed']=="opensearch"||
58 $_GET['act']=="feed") {
59 require($SettDir['inc'].'rssfeed.php'); } }
60 if($Settings['output_type']=="htm") {
61 $Settings['output_type'] = "html"; }
62 if($Settings['output_type']=="xhtm") {
63 $Settings['output_type'] = "xhtml"; }
64 if($Settings['output_type']=="xml+htm") {
65 $Settings['output_type'] = "xhtml"; }
66 if($Settings['html_type']=="html5"||
67 $Settings['html_type']=="xhtml5"||
68 ($Settings['html_type']!="html5"&&
69 $Settings['html_type']!="xhtml5")) {
70 require($SettDir['inc'].'html5.php'); }