Exemplo n.º 1
0
/**
 * phpVMS - Virtual Airline Administration Software
 * Copyright (c) 2008 Nabeel Shahzad
 * For more information, visit www.phpvms.net
 *	Forums: http://www.phpvms.net/forum
 *	Documentation: http://www.phpvms.net/docs
 *
 * phpVMS is licenced under the following license:
 *   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
 *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.phpvms.net
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 */
function pre_module_load()
{
    if (is_dir(CORE_PATH . '/local.config.php')) {
        Debug::showCritical('core/local.config.php is a folder, not a file. Please delete and create as a file');
        die;
    }
    if (!file_exists(CORE_PATH . '/local.config.php') || filesize(CORE_PATH . '/local.config.php') == 0) {
        Debug::showCritical('phpVMS has not been installed yet! Goto <a href="install/install.php">install/install.php</a> to start!');
        exit;
    }
    SiteData::loadSiteSettings();
    Auth::StartAuth();
}
Exemplo n.º 2
0
/**
 * phpVMS - Virtual Airline Administration Software
 * Copyright (c) 2008 Nabeel Shahzad
 * For more information, visit www.phpvms.net
 *	Forums: http://www.phpvms.net/forum
 *	Documentation: http://www.phpvms.net/docs
 *
 * phpVMS is licenced under the following license:
 *   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
 *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.phpvms.net
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 */
function pre_module_load()
{
    if (is_dir(CORE_PATH . '/local.config.php')) {
        Debug::showCritical('core/local.config.php is a folder, not a file. Please delete and create as a file');
        die;
    }
    if (!file_exists(CORE_PATH . '/local.config.php') || filesize(CORE_PATH . '/local.config.php') == 0) {
        Debug::showCritical('phpVMS has not been installed yet! Goto <a href="install/install.php">install/install.php</a> to start!');
        exit;
    }
    SiteData::loadSiteSettings();
    Auth::StartAuth();
    # Set a "authuser" super variable, so it's available in every template...
    if (Auth::LoggedIn() === true) {
        Template::set('authuser', Auth::$userinfo);
    } else {
        Template::set('authuser', null);
    }
}