function findVLEInstance() { $result = array(); $cwd = dirname(__FILE__); $result["rootpath"] = $cwd; // Power TLA paths $apath = ""; while (!empty($cwd) && $cwd !== "/") { // found PowerTLA include path if (empty($apath) && file_exists($cwd . "/include")) { $apath = $cwd . "/include"; $result["tlapath"] = $apath; } if (file_exists($cwd . "/include/inc.ilias_version.php")) { // got an ilias instance $result["lmstype"] = "Ilias"; break; } if (file_exists($cwd . "/lib/moodlelib.php")) { // got a moodle instance $result["lmstype"] = "Moodle"; break; } // nothin found, move an directory up. $cwd = dirname($cwd); } if (array_key_exists("lmstype", $result)) { // init the core system. set_include_path($cwd . PATH_SEPARATOR . get_include_path()); // include PowerTLA's classes via their autoloaders include_once "PowerTLA/PowerTLA.ini"; date_default_timezone_set(TLA_TIMEZONE); $result["lmspath"] = $cwd; chdir($cwd); // change to the LMS directory // load the VLE specific SystemHandler class. require_once 'PowerTLA/' . $result["lmstype"] . '/SystemHandler.class.php'; $vle = new SystemHandler($cwd); $vle->setGuestUser(TLA_GUESTUSER); if (!isset($vle)) { initError("Cannot initialize Virtual Learning Environment"); } else { $result["vle"] = $vle; } } else { initError("Cannot find Virtual Learning Environment"); } return $result; }
/** * @see SecurityInterface::protect_session() */ public static function protect_session($install = false) { if ($install == false) { $module_get_array = SystemHandler::get_module_get_values(); } if (isset($classname) and isset($classes[$classname])) { require_once $classes[$classname]; } foreach ($_GET as $key => $value) { // GET-Values switch ($key) { case "nav": case "vnav": // in Left Menu // in Left Menu case "username": case "session_id": case "language_id": case "run": case "dialog": case "sub_dialog": case "retrace": case "extension": case "tab": case "action": case "aspect": case "id": case "runid": case "key": case "parent_key": case "parent_id": case "parent": case "version": case "sortmethod": case "sortvalue": case "sure": case "nextpage": case "selectpage": case "page": case "pageref": case "show": case "change_nav": case "tpage": case "view": case "clear": case "unique_id": case "height": case "width": case "max_height": case "max_width": break; default: if (!in_array($key, $module_get_array)) { unset($_GET[$key]); } break; } } self::filter_var(); }
public static function disable() { if ($_GET['id']) { $paramquery = $_GET; unset($paramquery['action']); unset($paramquery['id']); $params = http_build_query($paramquery, '', '&'); if (SystemHandler::disable_module($_GET['id'])) { Common_IO::step_proceed($params, "Disable", "Operation Successful", null); } else { Common_IO::step_proceed($params, "Disable", "Operation Failed", null); } } else { } }
/** * @see RetraceInterface::create_retrace_string() * @return string */ public static function create_retrace_string() { $module_retrace_array = SystemHandler::get_module_retrace_values(); $retrace_array = array(); foreach ($_GET as $key => $value) { switch ($key) { case "nav": case "run": case "dialog": case "action": case "id": $retrace_array[$key] = $_GET[$key]; break; default: if (in_array($key, $module_retrace_array)) { $retrace_array[$key] = $_GET[$key]; } break; } } return base64_encode(serialize($retrace_array)); }
/** * Autoload-Function * Loads required classes * @param string $classname */ function __autoload($classname) { if (isset($GLOBALS['autoload_prefix'])) { $path_prefix = $GLOBALS['autoload_prefix']; } else { $path_prefix = ""; } // Batch $classes['BaseBatchException'] = $path_prefix . "core/include/base/batch/exceptions/base_batch.exception.class.php"; $classes['BaseBatchNotFoundException'] = $path_prefix . "core/include/base/batch/exceptions/base_batch_not_found.exception.class.php"; $classes['BaseBatchMissingException'] = $path_prefix . "core/include/base/batch/exceptions/base_batch_missing.exception.class.php"; $classes['BaseBatchInvalidArgumentException'] = $path_prefix . "core/include/base/batch/exceptions/base_batch_invalid_argument.exception.class.php"; $classes['Batch'] = $path_prefix . "core/include/base/batch/batch.class.php"; $classes['Batch_Wrapper'] = $path_prefix . "core/include/base/batch/batch.wrapper.class.php"; // Environment $classes['BaseEnvironmentException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment.exception.class.php"; $classes['BaseEnvironmentCurrencyException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_currency.exception.class.php"; $classes['BaseEnvironmentCurrencyIDMissingException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_currency_id_missing.exception.class.php"; $classes['BaseEnvironmentCurrencyNotFoundException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_currency_not_found.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitIDMissingException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_id_missing.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitNotFoundException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_not_found.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitCategoryException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_category.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitCategoryIDMissingException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_category_id_missing.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitCategoryNotFoundException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_category_not_found.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitRatioException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_ratio.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitRatioIDMissingException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_ratio_id_missing.exception.class.php"; $classes['BaseEnvironmentMeasuringUnitRatioNotFoundException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_measuring_unit_ratio_not_found.exception.class.php"; $classes['BaseEnvironmentPaperSizeException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_paper_size.exception.class.php"; $classes['BaseEnvironmentPaperSizeIDMissingException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_paper_size_id_missing.exception.class.php"; $classes['BaseEnvironmentPaperSizeNotFoundException'] = $path_prefix . "core/include/base/environment/exceptions/base_environment_paper_size_not_found.exception.class.php"; $classes['Country'] = $path_prefix . "core/include/base/environment/country.class.php"; $classes['Currency'] = $path_prefix . "core/include/base/environment/currency.class.php"; $classes['DatetimeHandler'] = $path_prefix . "core/include/base/environment/datetime_handler.class.php"; $classes['Language'] = $path_prefix . "core/include/base/environment/language.class.php"; $classes['MeasuringUnit'] = $path_prefix . "core/include/base/environment/measuring_unit.class.php"; $classes['MeasuringUnitCategory'] = $path_prefix . "core/include/base/environment/measuring_unit_category.class.php"; $classes['MeasuringUnitRatio'] = $path_prefix . "core/include/base/environment/measuring_unit_ratio.class.php"; $classes['PaperSize'] = $path_prefix . "core/include/base/environment/paper_size.class.php"; $classes['Timezone'] = $path_prefix . "core/include/base/environment/timezone.class.php"; $classes['Environment_Wrapper'] = $path_prefix . "core/include/base/environment/environment.wrapper.class.php"; // Security $classes['AuthForgotPasswordSendFailedException'] = $path_prefix . "core/include/base/security/exceptions/auth_forgot_password_send_failed_exception.class.php"; $classes['AuthUserNotFoundException'] = $path_prefix . "core/include/base/security/exceptions/auth_user_not_found_exception.class.php"; $classes['BaseUserAccessDeniedException'] = $path_prefix . "core/include/base/security/exceptions/base_user_access_denied.exception.class.php"; $classes['Auth'] = $path_prefix . "core/include/base/security/auth.class.php"; // System $classes['EventListenerInterface'] = $path_prefix . "core/include/base/system/interfaces/event_listener.interface.php"; $classes['BaseException'] = $path_prefix . "core/include/base/system/exceptions/base.exception.class.php"; $classes['BasePHPErrorException'] = $path_prefix . "core/include/base/system/exceptions/base_php_error.exception.class.php"; $classes['BaseAjaxException'] = $path_prefix . "core/include/base/system/exceptions/base_ajax.exception.class.php"; $classes['BaseAjaxArgumentMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_ajax_argument_missing.exception.class.php"; $classes['BaseAjaxDependentArgumentMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_ajax_dependent_argument_missing.exception.class.php"; $classes['BaseAssistantException'] = $path_prefix . "core/include/base/system/exceptions/base_assistant.exception.class.php"; $classes['BaseAssistantRequestedPageNotExistsException'] = $path_prefix . "core/include/base/system/exceptions/base_assistant_requested_page_not_exsits.exception.class.php"; $classes['BaseReportException'] = $path_prefix . "core/include/base/system/exceptions/base_report.exception.class.php"; $classes['BaseReportTCPDFClassMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_report_tcpdf_class_missing.exception.class.php"; $classes['BaseReportTCPDFFileMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_report_tcpdf_file_missing.exception.class.php"; $classes['BaseReportTCPDFLanguageFileMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_report_tcpdf_language_file_missing.exception.class.php"; $classes['BaseModuleNavigationException'] = $path_prefix . "core/include/base/system/exceptions/base_module_navigation.exception.class.php"; $classes['BaseModuleNavigationIDMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_module_navigation_id_missing.exception.class.php"; $classes['BaseModuleNavigationNotFoundException'] = $path_prefix . "core/include/base/system/exceptions/base_module_navigation_not_found.exception.class.php"; $classes['BaseServiceException'] = $path_prefix . "core/include/base/system/exceptions/base_service.exception.class.php"; $classes['BaseServiceIDMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_service_id_missing.exception.class.php"; $classes['BaseServiceNotFoundException'] = $path_prefix . "core/include/base/system/exceptions/base_service_not_found.exception.class.php"; $classes['BaseRegistryException'] = $path_prefix . "core/include/base/system/exceptions/base_registry.exception.class.php"; $classes['BaseRegistryIDMissingException'] = $path_prefix . "core/include/base/system/exceptions/base_registry_id_missing.exception.class.php"; $classes['BaseRegistryNotFoundException'] = $path_prefix . "core/include/base/system/exceptions/base_registry_not_found.exception.class.php"; $classes['Convert'] = $path_prefix . "core/include/base/system/convert.class.php"; $classes['Cron'] = $path_prefix . "core/include/base/system/cron.class.php"; $classes['EventHandler'] = $path_prefix . "core/include/base/system/event_handler.class.php"; $classes['ExceptionHandler'] = $path_prefix . "core/include/base/system/exception_handler.class.php"; $classes['System'] = $path_prefix . "core/include/base/system/system.class.php"; $classes['Mail'] = $path_prefix . "core/include/base/system/mail.class.php"; $classes['ModuleDialog'] = $path_prefix . "core/include/base/system/module_dialog.class.php"; $classes['ModuleLink'] = $path_prefix . "core/include/base/system/module_link.class.php"; $classes['ModuleNavigation'] = $path_prefix . "core/include/base/system/module_navigation.class.php"; $classes['Registry'] = $path_prefix . "core/include/base/system/registry.class.php"; $classes['Retrace'] = $path_prefix . "core/include/base/system/retrace.class.php"; $classes['Service'] = $path_prefix . "core/include/base/system/service.class.php"; $classes['System_Wrapper'] = $path_prefix . "core/include/base/system/system.wrapper.class.php"; // System Frontend $classes['SystemLogException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_log.exception.class.php"; $classes['SystemLogNotFoundException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_log_not_found.exception.class.php"; $classes['SystemLogIDMissingException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_log_id_missing.exception.class.php"; $classes['SystemMessageException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_message.exception.class.php"; $classes['SystemMessageNotFoundException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_message_not_found.exception.class.php"; $classes['SystemMessageIDMissingException'] = $path_prefix . "core/include/base/system_fe/exceptions/system_message_id_missing.exception.class.php"; $classes['SystemLog'] = $path_prefix . "core/include/base/system_fe/system_log.class.php"; $classes['SystemMessage'] = $path_prefix . "core/include/base/system_fe/system_message.class.php"; $classes['SystemFE_Wrapper'] = $path_prefix . "core/include/base/system_fe/system_fe.wrapper.class.php"; // User $classes['UserException'] = $path_prefix . "core/include/base/user/exceptions/user.exception.class.php"; $classes['UserNotFoundException'] = $path_prefix . "core/include/base/user/exceptions/user_not_found.exception.class.php"; $classes['UserIDMissingException'] = $path_prefix . "core/include/base/user/exceptions/user_id_missing.exception.class.php"; $classes['UserDeleteException'] = $path_prefix . "core/include/base/user/exceptions/user_delete.exception.class.php"; $classes['GroupException'] = $path_prefix . "core/include/base/user/exceptions/group.exception.php"; $classes['GroupNotFoundException'] = $path_prefix . "core/include/base/user/exceptions/group_not_found.exception.php"; $classes['GroupIDMissingException'] = $path_prefix . "core/include/base/user/exceptions/group_id_missing.exception.php"; $classes['User'] = $path_prefix . "core/include/base/user/user.class.php"; $classes['Group'] = $path_prefix . "core/include/base/user/group.class.php"; $classes['Regional'] = $path_prefix . "core/include/base/user/regional.class.php"; $classes['User_Wrapper'] = $path_prefix . "core/include/base/user/user.wrapper.class.php"; // Extension $classes['BaseExtensionException'] = $path_prefix . "core/include/base/extension/exceptions/base_extension.exception.class.php"; $classes['BaseExtensionNotFoundException'] = $path_prefix . "core/include/base/extension/exceptions/base_extension_not_found.exception.class.php"; $classes['BaseExtensionFileNotFoundException'] = $path_prefix . "core/include/base/extension/exceptions/base_extension_file_not_found.exception.class.php"; $classes['BaseExtensionClassNotFoundException'] = $path_prefix . "core/include/base/extension/exceptions/base_extension_class_not_found.exception.class.php"; $classes['BaseExtensionMissingException'] = $path_prefix . "core/include/base/extension/exceptions/base_extension_missing.exception.class.php"; $classes['ExtensionCreateRunEvent'] = $path_prefix . "core/include/base/extension/events/extension_create_run_event.class.php"; $classes['ConcreteExtensionInterface'] = $path_prefix . "core/include/base/extension/interfaces/concrete_extension.interface.php"; $classes['Extension'] = $path_prefix . "core/include/base/extension/extension.class.php"; $classes['ExtensionHandler'] = $path_prefix . "core/include/base/extension/extension_handler.class.php"; $system_handler_classes = SystemHandler::get_classes(); if (is_array($system_handler_classes) and count($system_handler_classes) >= 1) { $classes = array_merge($classes, $system_handler_classes); } if (isset($classes[$classname])) { if (file_exists($classes[$classname])) { require_once $classes[$classname]; } } }
public static function system_info() { $template = new HTMLTemplate("base/system_info.html"); $template->set_var("product", constant("PRODUCT")); $template->set_var("product_version", constant("PRODUCT_VERSION")); $product_user = Registry::get_value("base_product_user"); $product_function = Registry::get_value("base_product_function"); $template->set_var("product_user", $product_user); $template->set_var("product_function", $product_function); $paramquery = $_GET; $paramquery['run'] = "software_info"; $params = http_build_query($paramquery, '', '&'); $template->set_var("sw_info_params", $params); $paramquery = $_GET; $paramquery['run'] = "license"; $params = http_build_query($paramquery, '', '&'); $template->set_var("license_params", $params); $include_array = SystemHandler::list_includes(); if (is_array($include_array) and count($include_array) >= 1) { $include_string = null; foreach ($include_array as $key => $value) { if (!$include_string) { $include_string = $value['name']; } else { $include_string = $include_string . ", " . $value['name']; } } $template->set_var("includes", $include_string); } else { $template->set_var("includes", "<span class='italic'>none</span>"); } $module_array = SystemHandler::list_modules(); if (is_array($module_array) and count($module_array) >= 1) { $module_string = null; foreach ($module_array as $key => $value) { if (!$module_string) { $module_string = $value['name']; } else { $module_string = $module_string . ", " . $value['name']; } } $template->set_var("modules", $module_string); } else { $template->set_var("modules", "<span class='italic'>none</span>"); } $template->output(); }
private function init_environment() { if (is_array($this->include_folders) and count($this->include_folders) >= 1 and is_array($this->module_folders) and count($this->module_folders) >= 1) { foreach ($this->include_folders as $key => $value) { $config_folder = $value . "/config"; if (is_dir($config_folder)) { $db_table_name_file = $config_folder . "/db_table_name.php"; if (is_file($db_table_name_file)) { require $db_table_name_file; } $class_path_file = $config_folder . "/class_path.php"; if (is_file($class_path_file)) { if (isset($GLOBALS['autoload_prefix'])) { $path_prefix = $GLOBALS['autoload_prefix']; } else { $path_prefix = ""; } require $class_path_file; self::$classes = array_merge(self::$classes, $classes); } } } foreach ($this->module_folders as $key => $value) { $config_folder = $value . "/config"; if (is_dir($config_folder)) { $get_file = $config_folder . "/module_get.php"; if (is_file($get_file)) { require $get_file; if (is_array($get)) { self::$module_get_values = array_merge(self::$module_get_values, $get); } if (is_array($retrace)) { self::$module_retrace_values = array_merge(self::$module_retrace_values, $retrace); } } } } } }
/** * Checks basic requirements, includes basic files, creates global classes and starts Database-Connection */ function __construct($type = "io") { $this->type = $type; if (version_compare(PHP_VERSION, '5.3.0', 'le')) { $GLOBALS['fatal_error'] = "PHP 5.3.0 is minimum required!"; } if (!extension_loaded("imagick")) { $GLOBALS['fatal_error'] = "Extension \"Imagick\" is missing!"; } if (!extension_loaded("mbstring")) { $GLOBALS['fatal_error'] = "Extension \"mbstring\" is missing!"; } if (!extension_loaded("gd")) { $GLOBALS['fatal_error'] = "Extension \"GD\" is missing!"; } if (!file_exists(constant("BASE_DIR")) or !file_exists(constant("WWW_DIR"))) { $GLOBALS['fatal_error'] = "main-folder not found, check \$server['main_folder'] in config!"; } if (!isset($GLOBALS['fatal_error'])) { global $db, $runtime_data, $transaction; require_once "core/db/db.php"; $database = SystemConfig::get_database(); $db = new Database($database['type']); @($connection_result = $db->db_connect($database[0]['server'], $database[0]['port'], $database['user'], $database['password'], $database['database'])); require_once "include/base/system/error_handler.php"; // set_error_handler('error_handler'); require_once "include/base/system/events/event.class.php"; require_once "include/base/system/events/delete_event.class.php"; require_once "include/base/system/system_handler.class.php"; require_once "include/base/system/autoload.function.php"; if ($connection_result == true) { if (SystemHandler::check_installation() == false) { $GLOBALS['fatal_error'] = "Installation Not Found! Install Database first."; } else { SystemConfig::load_module_config(); require_once "include/base/system/transaction.class.php"; $transaction = new Transaction(); require_once "include/base/security/security.class.php"; require_once "include/base/security/session.class.php"; require_once "include/base/system/runtime_data.class.php"; require_once "include/base/system_fe/system_log.class.php"; $runtime_data = new RuntimeData(); try { if ($type == "io") { $system_handler = new SystemHandler(true); } else { $system_handler = new SystemHandler(false); } } catch (BaseIncludeDataCorruptException $e) { $GLOBALS['fatal_error'] = "The config-data of a module is corrupt!"; } catch (BaseIncludeProcessFailedException $e) { $GLOBALS['fatal_error'] = "Include register process failed!"; } catch (BaseIncludeRequirementFailedException $e) { $GLOBALS['fatal_error'] = "An include-module requirement is not found!"; } catch (BaseIncludeFolderEmptyException $e) { $GLOBALS['fatal_error'] = "Include folder is empty!"; } catch (BaseModuleProcessFailedException $e) { $GLOBALS['fatal_error'] = "Module register process failed!"; } catch (BaseModuleDataCorruptException $e) { $GLOBALS['fatal_error'] = "Module Data Corrupt!"; } catch (BaseEventHandlerCreationFailedException $e) { $GLOBALS['fatal_error'] = "Event-handler creation failed!"; } Security::protect_session(); } } else { $GLOBALS['fatal_error'] = "Database-Connection failed!"; } } }
public static function left() { if ($_GET['nav'] and $_GET['nav'] != "base") { $module_controller_array = SystemHandler::get_module_controller($_GET['nav']); $module_controller_path = "core/modules/" . $module_controller_array['path']; if (file_exists($module_controller_path)) { require_once $module_controller_path; if (method_exists($module_controller_array['class'], get_navigation)) { if (($navigation_array = $module_controller_array['class']::get_navigation()) !== false) { if ($navigation_array['class'] and $navigation_array['method'] and $navigation_array['class_path']) { if (file_exists($navigation_array['class_path'])) { require_once $navigation_array['class_path']; $navigation_array['class']::$navigation_array['method'](); } else { self::get_left_standard_navigation(); } } else { self::get_left_standard_navigation(); } } else { self::get_left_standard_navigation(); } } else { self::get_left_standard_navigation(); } } else { self::get_left_standard_navigation(); } } else { self::get_left_standard_navigation(); } }
/** * @param integer $language_id * @return array */ private static function scan_language($language_id, $path) { $LANG = array(); $module_array = SystemHandler::list_modules(); $language = new Language($language_id); if (is_array($module_array) and count($module_array) >= 1) { $lanugage_folder = constant("WWW_DIR") . "/languages/" . $language->get_folder_name(); foreach ($module_array as $key => $value) { if (file_exists($lanugage_folder . "/" . trim($value['folder']) . "/" . $path)) { include $lanugage_folder . "/" . trim($value['folder']) . "/" . $path; } } } return $LANG; }
/** * @throws OrganisationUnitIDMissingException */ public static function detail_address() { if ($_GET['id']) { $organisation_unit = new OrganisationUnit($_GET['id']); $template = new HTMLTemplate("organisation_unit/admin/organisation_unit/detail_address.html"); $template->set_var("TITLE", "(" . $organisation_unit->get_name() . ")"); $template->set_var("CLIENT", SystemHandler::module_exists("client")); $template->output(); } else { throw new OrganisationUnitIDMissingException(); } }
/** * Main Controller for requests via ajax.php * @throws BaseModuleControllerClassNotFoundException * @throws BaseModuleControllerFileNotFoundException * @throws BaseExtensionClassNotFoundException * @throws BaseExtensionFileNotFoundException * @throws BaseExtensionNotFoundException * @throws BaseModuleIllegalControllerCallException */ public static function ajax() { global $session; try { $session_valid_array = $session->is_valid(); if ($session_valid_array[0] === true) { if ($_GET['nav']) { $module_controller_array = SystemHandler::get_module_controller($_GET['nav']); $module_controller_path = "core/modules/" . $module_controller_array['path']; if (file_exists($module_controller_path)) { require_once $module_controller_path; if (class_exists($module_controller_array['class'])) { $module_controller_array['class']::ajax_handler($module_controller_array['alias']); } else { throw new BaseModuleControllerClassNotFoundException(); } } else { throw new BaseModuleControllerFileNotFoundException(); } } elseif ($_GET['extension']) { $extension_id = Extension::get_id_by_identifier($_GET['extension']); if (is_numeric($extension_id)) { $extension = new Extension($extension_id); $extension_class = $extension->get_class(); $extension_file = constant("EXTENSION_DIR") . "/" . $extension->get_folder() . "/" . $extension->get_main_file(); if (file_exists($extension_file)) { require_once $extension_file; if (class_exists($extension_class)) { $extension_class::ajax(); } else { throw new BaseExtensionClassNotFoundException(); } } else { throw new BaseExtensionFileNotFoundException(); } } else { throw new BaseExtensionNotFoundException(); } } else { throw new BaseModuleIllegalControllerCallException(); } } else { if ($_GET['nav'] == "base" and $_GET['run'] == "login" or $_GET['nav'] == "base" and $_GET['run'] == "forgot_password" or $_GET['run'] == "cron" or $_GET['nav'] == "base" and $_GET['run'] == "logout" and $session->is_dead() == true) { require_once "core/modules/base/base.request.php"; BaseRequest::ajax_handler(null); } } } catch (DatabaseQueryFailedException $e) { echo "EXCEPTION: DatabaseQueryFailedException"; } catch (BaseException $e) { $error_io = new Error_IO($e); echo "EXCEPTION: " . $error_io->get_error_message(); } }