function SimpleDirectoryListing() { $this->validateConfig(); // edited in 2.1; if (!SYSTEM_ON || !ADMIN_MODE_ON && !USER_MODE_ON) { if (!(isset($_GET["print"]) || isset($_GET["action"]))) { echo text("SYSTEM HAS BEEN SHUTTED DOWN"); } exit(0); } #----------------------------------------------------------------------- # Service is available #----------------------------------------------------------------------- #----------------------------------------------------------------------- # Anonymous visitor #----------------------------------------------------------------------- Param::filter($_GET); Param::filter($_POST); UserManager::proceedLoginLogout(); $this->user = UserManager::checkPermissionAndGetUser(); if (!$this->user) { if (!(isset($_GET["print"]) || isset($_GET["action"]))) { UserManager::printLogin(); } if (isset($_GET["action"]) || $_GET["print"] === "dirListing") { echo text("PLEASE LOGIN"); } exit(0); } #----------------------------------------------------------------------- # Have rights to access #----------------------------------------------------------------------- // added in 2.1; if ($_GET["system"] === "loginPage" && !$_SESSION["loggedIn"]) { UserManager::printLogin(); exit(0); } $this->moduleManager = new moduleManager($this->user); // The output is static data if ($_GET["print"] === "css") { $this->printCss(); exit(0); } // The output is static data if ($_GET["print"] === "icon") { $this->printIcon(); exit(0); } // The output is static data if ($_GET["print"] === "javascript") { $this->printJavascript(); exit(0); } #----------------------------------------------------------------------- # Needs to have the $_GET['relCwd'] #----------------------------------------------------------------------- #----------------------------------------------------------------------- # Printing of sections and modules # Execution of actions #----------------------------------------------------------------------- $this->fileManager = new fileManager(); $this->fileManager->user = $this->user; $this->moduleManager->setManagersToModules($this->fileManager, $this->user); // The output is static data if ($_GET["print"] === "image") { $this->printImage(); exit(0); } // The output is static data if ($_GET["print"] === "thumbnail") { $this->printThumbnail(); exit(0); } // The output is dynamic if ($_GET["print"] === "dirListing") { $this->printDirListing(); exit(0); } // The output is dynamic if ($_GET["print"] === "rss") { $this->printRss(); exit(0); } // The output is dynamic if ($_GET["print"] === "sfs") { $this->printSfs(); exit(0); } // The output is dynamic if ($_GET["action"] === "module") { $this->actionModule(); exit(0); } $this->printHtml(); exit(0); }