setAppPath(getcwd());
$bugsys->setApplication('Bugdar');
$bugsys->setAppVersion('[#]verson[#]');
if (!file_exists('./includes/config.php'))
{
echo 'includes/config.php needs to be present!';
exit;
}
require_once('./includes/config.php');
$bugsys->setDebug($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('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');
require_once('./includes/language.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' => 5,
'1.1.0' => 6,
'1.1.1' => 7,
'1.1.2' => 8,
'1.1.3' => 9,
'1.1.4' => -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$
|| ###################################################################
\*=====================================================================*/
?>