From 8274927b63df87c78086a81e19b64f770923c142 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 26 Jul 2003 00:19:41 +0000 Subject: [PATCH] Added message links. svn path=/trunk/boinc/; revision=1825 --- html/forum/thread.php | 81 ++++++++++--------------------------------- 1 file changed, 18 insertions(+), 63 deletions(-) diff --git a/html/forum/thread.php b/html/forum/thread.php index d6dc359fd8..d62b792f6e 100644 --- a/html/forum/thread.php +++ b/html/forum/thread.php @@ -13,16 +13,30 @@ $thread->incView(); $forum = getForum($thread->forum); $logged_in_user = get_logged_in_user(false); - + +$is_subscribed = false; + +if ($logged_in_user) { + $result = sql_query("SELECT * FROM subscriptions WHERE (userid = " . $logged_in_user->id . ") AND (threadid = " . $thread->id . ")"); + if ($result) { + $is_subscribed = (sql_num_rows($result) > 0); + } +} ?>

- title ?> +title ?>
Forum -> title ?>

id ?>#input>Reply to this thread
-id ?>>Subscribe to this thread +id>Click here to unsubscribe."; +} else { + echo "id>Subscribe to this thread"; +} +?>

@@ -30,69 +44,10 @@ $logged_in_user = get_logged_in_user(false); - - getPosts(); - while ($post = getNextPost($posts)) { - show_post_hierarchy($post, $thread, 0); - } - ?> +
Author Message

- -getImmediateChildren(); - - show_post($post, $thread, $indent); - - //while ($childPost = getNextPost($children)) { - // show_post_hierarchy($childPost, $thread, $indent+1); - //} -} - -function show_post($post, $thread, $indent) { - global $n; - $user = getUser($post->user); - $can_edit = $logged_in_user && $user->id == $logged_in_user->id; - - ?> - - -  "; - //} - ?> - -

- has_profile) { ?> - name ?> - name; } ?> -

-

- Joined: create_time) ?> -
Posts: posts ?> -

- - -

- Posted: timestamp) ?>id\">[Edit this post]" ?> - modified) echo "
Last Modified: ", date('D M j, Y g:i a', $post->modified) ?> -

- -

content)) ?>

-

[Reply to this post]

- - - -