$current_user =& singleton("current_user", new person()); $sess = new session(); // If session hasn't been started re-direct to login page if (!$sess->Started()) { defined("NO_REDIRECT") && exit("Session expired. Please <a href='" . $TPL["url_alloc_login"] . "'>log in</a> again."); alloc_redirect($TPL["url_alloc_login"] . ($_SERVER['REQUEST_URI'] != '/' ? '?forward=' . urlencode($_SERVER['REQUEST_URI']) : '')); // Else load up the current_user and continue } else { if ($sess->Get("personID")) { $current_user->load_current_user($sess->Get("personID")); } } } // Setup all the urls require_once ALLOC_MOD_DIR . "shared" . DIRECTORY_SEPARATOR . "global_tpl_values.inc.php"; $TPL = get_alloc_urls($TPL, $sess); // Add user's navigation to quick list dropdown if (is_object($current_user) && $current_user->get_id()) { $history = new history(); $history->save_history(); $TPL["current_user"] =& $current_user; } } } // This is a hook for the SaaS side of alloc, to allow per-site code customizations if (!function_exists("ace_augment")) { function ace_augment($name, $default = null) { return $default; } }