set('apppath', getcwd()); $bugsys->set('application', 'Bugdar'); $bugsys->set('appversion', '[#]version[#]'); if (!file_exists('./includes/config.php')) { echo 'includes/config.php needs to be present!'; exit; } require_once('./includes/config.php'); $bugsys->set('debug', $debug); define('ISSO_DB_LAYER', 'db_mysql'); $bugsys->load('db_mysql', 'db', true); $db->connect($servername, $username, $password, $database, $usepconnect); // needed for API validation $bugsys->load('localize', 'lang', true); $bugsys->load('functions', 'funct'); define('DEVDEBUG', $debug); define('TABLE_PREFIX', $tableprefix); define('COOKIE_PREFIX', $cookieprefix); unset($database, $servername, $username, $password, $usepconnect, $tableprefix, $cookieprefix); require_once('./includes/functions_datastore.php'); require_once('./includes/functions.php'); require_once('./includes/permissions.php'); // ################################################################### // init the big three $bugsys->options = array(); $bugsys->userinfo = array(); $bugsys->datastore = array(); // ################################################################### $bugsys->versions = array( '1.0.0' => 1, '1.0.1' => 2, '1.1.0 Beta 1' => 3, '1.1.0 Beta 2' => 4, '1.1.0 Release Candidate 1' => -1 ); // ################################################################### $bugsys->load('installer', null); $bugsys->input_clean('mark', TYPE_UINT); if ($bugsys->in['mark'] == STOP_MARK) { if (!preg_match('#^upgrade([0-9]*)\.php$#i', ACTIVE_SITE, $matches)) { define('STOP_LINK', 'Go to the Administrative Control Panel'); } else { $temp = array_values($bugsys->versions); if ($temp["$matches[1]"] != -1) { header("Location: upgrade.php"); } else { define('STOP_LINK', 'Go to the Administrative Control Panel'); } } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>