Example #1
0
session_start();
header('Content-Type: text/html; charset=utf-8');
//Relative path modifier
if (!isset($SETTINGS['path_mod'])) {
    $SETTINGS['path_mod'] = "";
}
// Check if the script has been installed and the config file exists
if (!file_exists($SETTINGS['path_mod'] . "config.inc.php")) {
    header('Location: install/index.php');
    exit;
}
require_once $SETTINGS['path_mod'] . "includes/user.php";
$user = new User();
//Check if the user is not timeout
if ($user->isLoggedIn()) {
    $user->checkTimeOut($SETTINGS['path_mod']);
}
//date_default_timezone_set('America/Montreal');
include $SETTINGS['path_mod'] . "config.inc.php";
//Save the page name and query string in case the user tries to access a page he is not logged in
$pathStr = $_SERVER[PHP_SELF];
//$baseNameStr = basename($pathStr);
$QueryStr = $_SERVER['QUERY_STRING'];
$removeInstall = !IS_GETBOO;
// TODO: Hack for local host, please modify according to the path on your local machine (ie /getboo/ folder)
// or if debugging.
$localhost = strpos($pathStr, "/gb/");
if (!($localhost === false)) {
    $pathStr = str_replace("/gb/", "", $pathStr);
    $removeInstall = false;
} else {