]>
src.bluestatic.org Git - bugdar.git/blob - install/global.php
2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright (c)2004-2008 Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 error_reporting(E_ALL
& ~E_NOTICE
);
24 // ###################################################################
29 define('ISSO_MT_START', microtime());
30 define('ISSO_CHECK_POST_REFERER', 1);
32 require_once('./includes/version.php');
34 require_once('./framework/kernel.php');
36 $bugsys->setAppPath(getcwd());
37 $bugsys->setApplication('Bugdar');
38 $bugsys->setAppVersion(BUGDAR_VERSION
);
40 if (!file_exists('./includes/config.php'))
42 echo 'includes/config.php needs to be present!';
46 require_once('./includes/config.php');
48 $bugsys->setDebug($debug);
50 define('ISSO_DB_LAYER', 'db_mysql');
51 $bugsys->load('db_mysql', 'db', true);
52 $db->connect($servername, $username, $password, $database, $usepconnect);
56 $db->query("SET NAMES utf8");
59 // needed for API validation
60 $bugsys->load('functions', 'funct');
62 define('DEVDEBUG', $debug);
63 define('TABLE_PREFIX', $tableprefix);
64 define('COOKIE_PREFIX', $cookieprefix);
66 unset($database, $servername, $username, $password, $usepconnect, $tableprefix, $cookieprefix);
68 require_once('./includes/functions_datastore.php');
69 require_once('./includes/functions.php');
70 require_once('./includes/language.php');
71 require_once('./includes/permissions.php');
73 // ###################################################################
76 bugdar
::$options = array();
77 bugdar
::$userinfo = array();
78 bugdar
::$datastore = array();
80 // ###################################################################
82 $bugsys->versions
= array(
87 '1.1.0 Release Candidate 1' => 5,
97 '1.2.0 Release Candidate 1' => 15,
103 // ###################################################################
105 $bugsys->load('installer', null);
107 $input->inputClean('mark', TYPE_UINT
);
109 if ($input->in
['mark'] == STOP_MARK
)
111 if (!preg_match('#^upgrade([0-9]*)\.php$#i', ACTIVE_SITE
, $matches))
113 define('STOP_LINK', '<a href="../admin/">Go to the Administrative Control Panel</a>');
117 $temp = array_values($bugsys->versions
);
118 if ($temp["$matches[1]"] != -1)
120 header("Location: upgrade.php");
124 define('STOP_LINK', '<a href="../admin/">Go to the Administrative Control Panel</a>');