public function __construct() { // Grab local path $local_path = dirname(__FILE__); // Set Authentication Data Source $this->auth_data_source = strtolower($_SESSION['auth_data_source']); // Set login status to false by default $this->status = false; // Include necessary classes require_once $_SESSION['frame_path'] . '/core/data_access/data_trans.class.php'; require_once $local_path . '/nav.class.php'; require_once $local_path . '/xml_nav.class.php'; require_once $local_path . '/authentication.class.php'; require_once $local_path . '/module_list.class.php'; //**************************************************** // Build Array NAVs //**************************************************** // User Modules $modules_dir = isset($_SESSION['modules_dir']) ? $_SESSION['modules_dir'] : 'modules'; $modules_path = $_SESSION['file_path'] . '/' . $modules_dir; if (file_exists($modules_path) && is_dir($modules_path)) { $nav = new nav($modules_path); } $_SESSION['menu_array'] = isset($nav) ? $nav->export() : array(); $_SESSION['menu_array2'] = isset($nav) ? $nav->export2() : array(); //************************************** // Authenticate //************************************** $authen = new authentication(); //************************************** // Authentication Success //************************************** if ($authen->status()) { // Build XML Nav $module_xml = new xml_nav($_SESSION['menu_array']); $_SESSION['menu_xml'] = $module_xml->export(); // Login Success $this->status = true; } else { $this->fail_login('1'); } }