Small update
[iDB.git] / setup / preinstall.php
blob35ea9e3d0bd55cac2f37647092664eb1a959d255
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: preinstall.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
16 //error_reporting(E_ALL ^ E_NOTICE);
17 /* Some ini setting changes uncomment if you need them. */
18 //ini_set('session.use_trans_sid', false);
19 $File3Name = basename($_SERVER['SCRIPT_NAME']);
20 if ($File3Name=="preinstall.php"||$File3Name=="/preinstall.php") {
21 header('Location: index.php');
22 exit(); }
24 header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
25 header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
26 header("Date: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
27 header("Last-Modified: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
28 header("Expires: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
29 output_reset_rewrite_vars();
30 if(!isset($Settings['send_pagesize'])) { $Settings['send_pagesize'] = "on"; }
31 if(!isset($Settings['fixbasedir'])) { $Settings['fixbasedir'] = null; }
32 if(!isset($Settings['fixcookiedir'])) { $Settings['fixcookiedir'] = null; }
33 if(!isset($Settings['rssurl'])) { $Settings['rssurl'] = null; }
34 if(!isset($Settings['showverinfo'])) { $Settings['showverinfo'] = null; }
35 if(!isset($Settings['sqltype'])) { $Settings['sqltype'] = null; }
36 if(!isset($Settings['fixredirectdir'])) { $Settings['fixredirectdir'] = null; }
37 if(!isset($Settings['file_ext'])) { $Settings['file_ext'] = null; }
38 if(!isset($Settings['html_level'])) { $Settings['html_level'] = null; }
39 if(!isset($Settings['GuestGroup'])) { $Settings['GuestGroup'] = null; }
40 if(!isset($Settings['enable_search'])) { $Settings['enable_search'] = null; }
41 if(!isset($Settings['qstr'])) { $Settings['qstr'] = null; }
42 if(!isset($_POST['SetupType'])) { $_POST['SetupType'] = "install"; }
43 if(!isset($_GET['debug'])) { $_GET['debug'] = null; }
44 $checklowview = false;
45 $dayconv = array("year" => 29030400, "month" => 2419200, "week" => 604800, "day" => 86400, "hour" => 3600, "minute" => 60, "second" => 1);
46 if(!isset($SettDir['inc'])) { $SettDir['inc'] = "inc/"; }
47 if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
48 if(!isset($SettDir['sql'])) { $SettDir['sql'] = "inc/misc/sql/"; }
49 if(!isset($SettDir['admin'])) { $SettDir['admin'] = "inc/admin/"; }
50 if(!isset($SettDir['sqldumper'])) { $SettDir['sqldumper'] = "inc/admin/sqldumper/"; }
51 if(!isset($SettDir['mod'])) { $SettDir['mod'] = "inc/mod/"; }
52 if(!isset($SettDir['mplayer'])) { $SettDir['mplayer'] = "inc/mplayer/"; }
53 if(!isset($SettDir['themes'])) { $SettDir['themes'] = "themes/"; }
54 if(!isset($_POST['License'])) { $_POST['License'] = null; }
55 if(isset($_POST['DatabaseType'])) {
56 $Settings['sqltype'] = $_POST['DatabaseType']; }
57 if(isset($Settings['sqltype'])) {
58 if($Settings['sqltype']!="mysql"&&
59 $Settings['sqltype']!="mysqli"&&
60 $Settings['sqltype']!="pgsql"&&
61 $Settings['sqltype']!="sqlite"&&
62 $Settings['sqltype']!="sqlite3"&&
63 $Settings['sqltype']!="cubrid") {
64 $Settings['sqltype'] = "mysql"; } }
65 $Settings['idb_time_format'] = "g:i A";
66 $iDBTheme = "iDB"; $AltiDBTheme = "Gray";
67 if(isset($Settings['usealtname'])&&$Settings['usealtname']=="yes") {
68 if(isset($iDBAltName['AltiDBTheme'])) { $AltiDBTheme = $iDBAltName['AltiDBTheme']; }
69 $iDBTheme = $AltiDBTheme; }
70 if($iDBTheme!="iDB") {
71 if(file_exists($SettDir['themes'].$iDBTheme."/settings.php")) {
72 require($SettDir['themes'].$iDBTheme."/settings.php"); } }
73 if($iDBTheme=="iDB") {
74 if(file_exists($SettDir['themes']."iDB/settings.php")) {
75 require($SettDir['themes']."iDB/settings.php"); }
76 if(!file_exists($SettDir['themes']."iDB/settings.php")) {
77 require($SettDir['themes']."Gray/settings.php"); } }