Small update
[iDB.git] / preindex.php
blob5157a81d10d45a4506a7b3a0a15cd70dd6ffe618
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-2024 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2024 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: preindex.php - Last Update: 8/23/2024 SVN 1023 - 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();
25 require('system.php');
26 if ($_GET['act'] == "sqldumper" && $Settings['sqltype'] == "cubrid") {
27 $_GET['act'] = "view";
29 if ($_GET['act'] == "sqldumper" && $_SESSION['UserGroup'] != $Settings['GuestGroup'] &&
30 $GroupInfo['HasAdminCP'] == "yes") {
31 if ($Settings['sqltype'] == "mysqli" ||
32 $Settings['sqltype'] == "mysqli_prepare" ||
33 $Settings['sqltype'] == "pdo_mysql") {
34 require($SettDir['sqldumper'].'mysql.php');
36 if ($Settings['sqltype'] == "pgsql" ||
37 $Settings['sqltype'] == "pgsql_prepare" ||
38 $Settings['sqltype'] == "pdo_pgsql") {
39 require($SettDir['sqldumper'].'pgsql.php');
41 if ($Settings['sqltype'] == "sqlite3" ||
42 $Settings['sqltype'] == "sqlite3_prepare" ||
43 $Settings['sqltype'] == "pdo_sqlite3") {
44 require($SettDir['sqldumper'].'sqlite.php');
46 if ($Settings['sqltype'] == "cubrid" ||
47 $Settings['sqltype'] == "cubrid_prepare" ||
48 $Settings['sqltype'] == "pdo_cubrid") {
49 require($SettDir['sqldumper'].'cubrid.php');
51 if ($Settings['sqltype'] == "sqlsrv" ||
52 $Settings['sqltype'] == "sqlsrv_prepare") {
53 require($SettDir['sqldumper'].'cubrid.php');
56 if (!isset($checklowview)) {
57 $checklowview = false;
59 if ($checklowview !== false && $checklowview !== true) {
60 $checklowview = false;
62 if ($_GET['act'] == "lofi" || $_GET['act'] == "lo-fi" ||
63 $_GET['act'] == "LoFi" || $_GET['act'] == "Lo-Fi" ||
64 $_GET['act'] == "lores" || $_GET['act'] == "lo-res" ||
65 $_GET['act'] == "LoRes" || $_GET['act'] == "Lo-Res" ||
66 $_GET['act'] == "LowView" || $_GET['act'] == "low-view" ||
67 $_GET['act'] == "Low-View") {
68 $_GET['act'] = "lowview";
70 if ($_GET['act'] != "lowview") {
71 $checklowview = false;
73 if ($Settings['enable_rss'] == "on") {
74 if (!isset($_GET['feed'])) {
75 $_GET['feed'] = null;
77 if ($_GET['feed'] == "rss" || $_GET['act'] == "feed" ||
78 $_GET['feed'] == "oldrss" || $_GET['feed'] == "atom" ||
79 $_GET['feed'] == "opml" || $_GET['feed'] == "opensearch") {
80 $_GET['feedtype'] = $_GET['feed'];
82 if ($_GET['feed'] == "rss" || $_GET['act'] == "Feed" ||
83 $_GET['feed'] == "oldrss" || $_GET['feed'] == "atom" ||
84 $_GET['feed'] == "opml" || $_GET['feed'] == "opensearch" ||
85 $_GET['act'] == "feed") {
86 require($SettDir['inc'].'rssfeed.php');
89 if ($Settings['output_type'] == "htm") {
90 $Settings['output_type'] = "html";
92 if ($Settings['output_type'] == "xhtm") {
93 $Settings['output_type'] = "xhtml";
95 if ($Settings['output_type'] == "xml+htm") {
96 $Settings['output_type'] = "xhtml";
98 if ($Settings['html_type'] == "html5" ||
99 $Settings['html_type'] == "xhtml5" ||
100 ($Settings['html_type'] != "html5" &&
101 $Settings['html_type'] != "xhtml5")) {
102 require($SettDir['inc'].'html5.php');