From 42c62cb041a2b2b95c9cda0c20fcf70334fd244c Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 1 Nov 2011 09:32:21 +0000 Subject: Rewl og krat... needs cleaning up - after port to GIT. --- forum/htdocs/index.php | 79 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 22 deletions(-) (limited to 'forum/htdocs/index.php') diff --git a/forum/htdocs/index.php b/forum/htdocs/index.php index c4e0570..0608f93 100644 --- a/forum/htdocs/index.php +++ b/forum/htdocs/index.php @@ -8,6 +8,12 @@ include_once("config.php"); include_once($UTIL_DIR . "/login.php"); checklogin(); +if($yeah) { +include_once($UTIL_DIR . "/cache.php"); +$cache = new Cache($DATA_DIR . "/cache.xml"); +$cache->rebuild(); +} + // Catch the modes that must not output any html. if($current_user) { switch($mode) { @@ -40,16 +46,26 @@ include_once($UTIL_DIR . "/clientinfo.php"); - \n"; + $str .="  Forum\n"; + $str .=" Filehandler\n"; + $str .=" Calendar\n"; + $str .=" Addressbook\n"; + $str .=" Profile\n"; + $str .=" Tasks\n"; + if($current_user->uid == 0) + $str .=" Diagnostics\n"; + $str .=" \n"; + return $str; +} // Globals: // $fid @@ -58,57 +74,76 @@ include_once($UTIL_DIR . "/clientinfo.php"); // $task if($current_user) { - echo "

Logged in as: " . $current_user->name . " - Logout

\n"; + $str = ""; + + $str .= "

Logged in as: " . $current_user->name . " - Logout

\n"; switch($mode) { case "profile": include_once($UTIL_DIR. "/profile.php"); + $str .= profile(); break; case "tasks": include_once($UTIL_DIR. "/tasks.php"); + $str .= tasks(); break; case "calendar": include_once($UTIL_DIR. "/calendar.php"); + $str .= calendar(); break; case "addressbook": include_once($UTIL_DIR. "/addressbook.php"); + $str .= addressbook(); break; case "editor": include_once($UTIL_DIR. "/editor.php"); + $str .= editor(); break; case "edit": include_once($UTIL_DIR. "/edit.php"); + $str .= ""; break; case "filehandler": include_once($UTIL_DIR. "/filehandler.php"); + $str .= filehandler(); break; case "diagnostics": include_once($UTIL_DIR. "/diagnostics.php"); + $str .= ""; break; - case "view": default: + case "view": include_once($UTIL_DIR. "/view.php"); -?> - -forums as $forum) { + $unreadPosts |= $forum->newStuff; + } + + echo menu("top", $unreadPosts). $str. menu("bottom", $unreadPosts); + } else { + echo $str; + } + } else { ?>
-- cgit v1.2.3