]>
src.bluestatic.org Git - bugdar.git/blob - install/global.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] 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 [#]gpl[#] 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('./framework/kernel.php');
34 $bugsys->setAppPath(getcwd());
35 $bugsys->setApplication('Bugdar');
36 $bugsys->setAppVersion('[#]verson[#]');
38 if (!file_exists('./includes/config.php'))
40 echo 'includes/config.php needs to be present!';
44 require_once('./includes/config.php');
46 $bugsys->setDebug($debug);
48 define('ISSO_DB_LAYER', 'db_mysql');
49 $bugsys->load('db_mysql', 'db', true);
50 $db->connect($servername, $username, $password, $database, $usepconnect);
52 // needed for API validation
53 $bugsys->load('functions', 'funct');
55 define('DEVDEBUG', $debug);
56 define('TABLE_PREFIX', $tableprefix);
57 define('COOKIE_PREFIX', $cookieprefix);
59 unset($database, $servername, $username, $password, $usepconnect, $tableprefix, $cookieprefix);
61 require_once('./includes/functions_datastore.php');
62 require_once('./includes/functions.php');
63 require_once('./includes/permissions.php');
64 require_once('./includes/language.php');
66 // ###################################################################
69 $bugsys->options
= array();
70 $bugsys->userinfo
= array();
71 $bugsys->datastore
= array();
73 // ###################################################################
75 $bugsys->versions
= array(
80 '1.1.0 Release Candidate 1' => 5,
88 // ###################################################################
90 $bugsys->load('installer', null);
92 $bugsys->input_clean('mark', TYPE_UINT
);
94 if ($bugsys->in
['mark'] == STOP_MARK
)
96 if (!preg_match('#^upgrade([0-9]*)\.php$#i', ACTIVE_SITE
, $matches))
98 define('STOP_LINK', '<a href="../admin/">Go to the Administrative Control Panel</a>');
102 $temp = array_values($bugsys->versions
);
103 if ($temp["$matches[1]"] != -1)
105 header("Location: upgrade.php");
109 define('STOP_LINK', '<a href="../admin/">Go to the Administrative Control Panel</a>');
114 /*=====================================================================*\
115 || ###################################################################
118 || ###################################################################
119 \*=====================================================================*/