include_once 'error.inc.php';
-# user login and control
-
-include_once 'auth.inc.php'; // sets global $User
-$Edit = isset($_GET['edit']);
-
# setup requested page
$request = preg_replace('/\?.*/', '', @$_SERVER['PATH_INFO'] ?: $_SERVER['REQUEST_URI']);
require_once('article.inc.php');
$Page = new ArchiveArticle($staticpage);
+# user login and control
+
+include_once 'auth.inc.php'; // sets global $User
+
if ($Page->restricted) {
# access restriction
if (!$User->login) {
# output dynamic and/or static html
+include_once 'format.inc.php';
+
ob_start();
if ($Page->handler and !require("./{$Page->handler}/index.php")) {
# replace contents by code output on false return