readfile(cms::$cache_file); exit; } if (!empty($_REQUEST["file"]) and !empty($_REQUEST["page"])) { header("Location: {$base_dir}/download.php?find=asset|simple_cms|1|pagename=" . $_REQUEST["page"] . "&view=details&field=attachment&subitem=" . $_REQUEST["file"]); exit; } if (CHECK_DOS and APC and !DEBUG) { cms::checkdos(); } $cms = new cms(); if (isset($_REQUEST["logout"])) { if (!empty($_SESSION["username"])) { login::process_logout(); } if (isset($_COOKIE[SESSION_NAME])) { unset($_COOKIE[SESSION_NAME]); } $_SESSION = array(); } if ((ENABLE_ANONYMOUS or ENABLE_ANONYMOUS_CMS) and empty($_SESSION["username"])) { login_anonymous_session(); } if (empty($_SESSION["username"])) { sys_redirect("{$base_dir}/index.php?logout&page=" . $_REQUEST["page"]); } error_reporting(E_ALL); require_once "lib/pmwiki/pmwiki.php"; $cms->render_page(); $cms->output();