. * * index.php * * The index file. * * @author Daniele Bonini * @copyrights (c) 2016, 2026 5 Mode */ require "../Private/core/init.inc"; // FUNCTION AND VARIABLE DECLARATIONS // PARAMETERS VALIDATION $url = filter_input(INPUT_GET, "url")??""; $url = strip_tags($url); $url = strtolower(trim(substr($url, 0, 300), "/")); switch ($url) { case "": case "page": $scriptPath = APP_ROUTE_PATH . "/page"; define("ROUTE_NAME", "page"); define("ROUTE_FILENAME", "page.php"); 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;