function subscribe($forum, $thread, $user) { if (BoincSubscription::replace($user->id, $thread->id)) { page_head(tra("Subscription successful")); show_forum_header($user); show_title($forum, $thread); echo "<p>" . tra("You are now subscribed to %1. You will be notified whenever there is a new post.", "<b>" . cleanup_title($thread->title) . "</b>"); } else { page_head(tra("Subscription failed")); echo "<p>" . tra("We are currently unable to subscribe you to %1. Please try again later..", "<b>" . cleanup_title($thread->title) . "</b>"); } echo "</p><p><br /><a href=\"forum_thread.php?id=" . $thread->id . "\">" . tra("Return to thread") . "</a></p>"; page_tail(); }