. * * index.php * * The index file. * * @author Daniele Bonini * @copyrights (c) 2016, 2026 5 Mode */ require "../Private/core/init.inc"; use fivemode\fivemode\CV; use fivemode\fivemode\SC; // FUNCTION AND VARIABLE DECLARATIONS $CV = &CV::getInstance(); $SC = &SC::getInstance(); // PARAMETERS VALIDATION $url = filter_input(INPUT_GET, "url")??""; $url = strip_tags($url); $url = strtolower(trim(substr($url, 0, 300), "/")); switch ($url) { case "cachecrc": $rret = $CV->CV_CHECK_CACHE("cachecrc", APP_ROUTES_PATH . "/cachecrc", false); if ( $rret ) { $CV->CV_CHECK_CACHE("cachecrc", APP_ROUTES_PATH . "/cachecrc", true); exit(0); } else { $scriptPath = APP_ERROR_PATH; define("ROUTE_NAME", "err-502"); define("ROUTE_FILENAME", "err-502.php"); } break; case "inccrcsource": $scriptPath = APP_ROUTES_PATH . "/cachedcrc"; define("ROUTE_NAME", "end"); define("ROUTE_FILENAME", "end.php"); break; case "": case "test": $rret = $SC->SC_CHECK_ROUTE_ALL("test"); if ( $rret === 200) { $scriptPath = APP_ROUTES_PATH . "/test"; define("ROUTE_NAME", "test"); define("ROUTE_FILENAME", "test.php"); } else { $scriptPath = APP_ERROR_PATH; define("ROUTE_NAME", "err-$rret"); define("ROUTE_FILENAME", "err-$rret.php"); } break; case "test/+desc": $scriptPath = APP_ROUTES_PATH . "/test"; define("ROUTE_NAME", "+DESC"); define("ROUTE_FILENAME", "+DESC"); break; default: $scriptPath = APP_ERROR_PATH; define("ROUTE_NAME", "err-404"); define("ROUTE_FILENAME", "err-404.php"); } if (ROUTE_NAME==="err-404") { header("HTTP/1.1 404 Not Found"); } require $scriptPath . "/" . ROUTE_FILENAME;