<?php header("Content-Type: text/html; charset=UTF-8"); include_once("config.php"); // Check login include_once($UTIL_DIR . "/login.php"); checklogin(); // Catch the modes that must not output any html. if($current_user) { switch($mode) { case "imagecache": include_once($UTIL_DIR. "/imagecache.php"); getCachedImage($uri); return; case "file": include_once($UTIL_DIR. "/file.php"); if($preview) getFilePreview($fid); else getFile($fid); return; } } include_once($UTIL_DIR . "/clientinfo.php"); ?> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ExecutionForum</title> <meta name="MSSmartTagsPreventParsing" content="true"/> <meta http-equiv="Content-Type" content="text/html"/> <link rel="author" title="Bent Bisballe Nyeng" href="http://www.aasimon.org"/> <link rel="stylesheet" type="text/css" href="forum.css"/> <?php if($mode == "editor") {?><script language="javascript" src="lib.js" type="text/javascript"></script><?php } ?> </head> <body> <div class="menu"> <a href="?mode=forum">Forum</a> <a href="?mode=filehandler">Filehandler</a> <a href="?mode=calendar">Calendar</a> <a href="?mode=profile">Profile</a><?php if($current_user->uid == 0) { ?> <a href="?mode=diagnostics">Diagnostics</a><?php } ?></div> <?php // Globals: // $fid // $tid // $pid // $task if($current_user) { echo "<p>Logged in as: " . $current_user->name . " - <a href=\"?action=logout\">Logout</a></p>"; switch($mode) { case "profile": include_once($UTIL_DIR. "/profile.php"); break; case "calendar": include_once($UTIL_DIR. "/calendar.php"); break; case "editor": include_once($UTIL_DIR. "/editor.php"); break; case "edit": include_once($UTIL_DIR. "/edit.php"); break; case "filehandler": include_once($UTIL_DIR. "/filehandler.php"); break; case "diagnostics": include_once($UTIL_DIR. "/diagnostics.php"); break; case "view": default: include_once($UTIL_DIR. "/view.php"); break; } } else { ?> <form action="?action=login" method="post"> <p>UserID: <input name="current_username"/></p> <p>Password: <input name="current_password" type="password"/></p> <p><button type="submit">Login</button></p> </form> <?php } ?> </body> </html>