Small update and bug fix. ^_^
[iDB.git] / setup / preinstall.php
blob42a46a0300bc4f69ff233886c5c1a7a5f5dbdd54
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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: preinstall.php - Last Update: 12/07/2010 SVN 600 - 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: ".gmdate("D, d M Y H:i:s")." GMT");
27 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
28 header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
29 output_reset_rewrite_vars();
30 if(!isset($SettDir['inc'])) { $SettDir['inc'] = "inc/"; }
31 if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
32 if(!isset($SettDir['sql'])) { $SettDir['sql'] = "inc/misc/sql/"; }
33 if(!isset($SettDir['admin'])) { $SettDir['admin'] = "inc/admin/"; }
34 if(!isset($SettDir['sqldumper'])) { $SettDir['sqldumper'] = "inc/admin/sqldumper/"; }
35 if(!isset($SettDir['mod'])) { $SettDir['mod'] = "inc/mod/"; }
36 if(!isset($SettDir['themes'])) { $SettDir['themes'] = "themes/"; }
37 if(!isset($_POST['License'])) { $_POST['License'] = null; }
38 if(isset($_POST['DatabaseType'])) {
39 $Settings['sqltype'] = $_POST['DatabaseType']; }
40 if(isset($Settings['sqltype'])) {
41 if($Settings['sqltype']!="mysql"&&
42 $Settings['sqltype']!="mysqli"&&
43 $Settings['sqltype']!="pgsql"&&
44 $Settings['sqltype']!="sqlite") {
45 $Settings['sqltype'] = "mysql"; } }
46 if(file_exists($SettDir['themes']."iDB/settings.php")) {
47 require($SettDir['themes']."iDB/settings.php"); }
48 if(!file_exists($SettDir['themes']."iDB/settings.php")) {
49 require($SettDir['themes']."Gray/settings.php"); }