. // Forum index // shows the categories and the forums in each category require_once('../inc/forum.inc'); require_once('../inc/pm.inc'); require_once('../inc/time.inc'); check_get_args(array("read", "return", "tnow", "ttok")); $user = get_logged_in_user(false); // Process request to mark all posts as read // if ((get_int("read", true) == 1)) { if ($user) { check_tokens($user->authenticator); BoincForumPrefs::lookup($user); $now = time(); $user->prefs->update("mark_as_read_timestamp=$now"); Header("Location: ".get_str("return", true)); } } function show_forum_summary($forum, $i) { switch ($forum->parent_type) { case 0: $t = $forum->title; $d = $forum->description; break; case 1: $team = BoincTeam::lookup_id($forum->category); $t = $forum->title; if (!strlen($t)) $t = $team->name; $d = $forum->description; if (!strlen($d)) $d = tra("Discussion among members of %1", $team->name); break; } $j = $i % 2; echo "
" .tra("If you have a question or problem, please use the %1Questions & Answers%2 section of the message boards.", "", "") ."
" ; $categories = BoincCategory::enum("is_helpdesk=0 order by orderID"); } $first = true; foreach ($categories as $category) { if ($first) { $first = false; echo ""; show_forum_title($category, NULL, NULL); echo "
"; show_mark_as_read_button($user); start_forum_table(array( tra("Topic"), tra("Threads"), tra("Posts"), tra("Last post") )); } if (strlen($category->name)) { echo '
".tra("Subscribed threads")."
"; show_thread_and_context_header(); $i = 0; foreach ($subs as $sub) { $thread = BoincThread::lookup_id($sub->threadid); if (!$thread) { BoincSubscription::delete($user->id, $sub->threadid); continue; } if ($thread->hidden) continue; show_thread_and_context($thread, $user, $i++); } end_table(); } } page_tail(); flush(); BoincForumLogging::cleanup(); $cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit ?>