Example #1
0
    in the file license.txt along with IT CORE; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*********************************************************************************/
if (!class_exists("AutoLoader")) {
    include "lib/AutoLoader.php";
}
CoreLocal::set("parse_chain", '');
CoreLocal::set("preparse_chain", '');
CoreLocal::set("postparse_chain", '');
AutoLoader::loadMap();
CoreState::initiate_session();
if (CoreLocal::get("SessionFirstRun") == "") {
    CoreLocal::set("SessionFirstRun", 1);
}
CoreLocal::migrateSettings();
if (MiscLib::pingport('127.0.0.1:15674', 'not a database')) {
    CoreLocal::set('MQ', true);
} else {
    CoreLocal::set('MQ', false);
}
/**
  Go to login screen if no one is signed in
  Go to lock screen if someone is signed in
*/
if (!headers_sent()) {
    $my_url = MiscLib::base_url();
    if (CoreLocal::get('LoggedIn') == 0) {
        header("Location: {$my_url}gui-modules/login2.php");
    } else {
        header("Location: {$my_url}gui-modules/login3.php");