Esempio n. 1
0
function unsubscribe($forum, $thread, $user)
{
    BoincSubscription::delete($user->id, $thread->id);
    if (!BoincSubscription::lookup($user->id, $thread->id)) {
        page_head(tra("Unsubscription successful"));
        show_forum_header($user);
        show_title($forum, $thread);
        echo "<p>" . tra("You are no longer subscribed to %1. You will no longer receive notifications for this thread.", "<b>" . cleanup_title($thread->title) . "</b>");
    } else {
        page_head(tra("Unsubscription failed"));
        echo "<p>" . tra("We are currently unable to unsubscribe you from %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();
}
Esempio n. 2
0
        if ($category->is_helpdesk) {
            page_head(tra("Questions and Answers") . ' : ' . $forum->title);
            ?>
<link href="forum_help_desk.php" rel="up" title="Forum Index"><?php 
        } else {
            page_head(tra("Message boards") . ' : ' . $forum->title);
            ?>
<link href="forum_index.php" rel="up" title="Forum Index"><?php 
        }
        show_forum_header($user);
        show_forum_title($category, $forum, NULL);
        break;
    case 1:
        $team = BoincTeam::lookup_id($forum->category);
        page_head('Team message board for <a href="team_display.php?teamid=$team->id">$team->name</a>');
        show_forum_header($user);
        show_team_forum_title($forum);
        break;
}
?>
<form action="forum_forum.php" method="get">
<?php 
echo start_table("noborder");
?>
<table width="100%">
	<tr valign="top">
	<td colspan="2">
		<?php 
show_button("forum_post.php?id={$id}", "New thread", "Add a new thread to this forum");
?>
	</td>
Esempio n. 3
0
    if (post_str('add_signature', true) == "add_it") {
        $add_signature = true;
    } else {
        $add_signature = false;
    }
    check_tokens($logged_in_user->authenticator);
    if (!akismet_check($logged_in_user, $content)) {
        $warning = "Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again.";
        $preview = tra("Preview");
    } else {
        create_post($content, $parent_post_id, $logged_in_user, $forum, $thread, $add_signature);
        header('Location: forum_thread.php?id=' . $thread->id);
    }
}
page_head(tra("Post to thread"));
show_forum_header($logged_in_user);
switch ($forum->parent_type) {
    case 0:
        $category = BoincCategory::lookup_id($forum->category);
        show_forum_title($category, $forum, $thread);
        break;
    case 1:
        show_team_forum_title($forum, $thread);
        break;
}
echo "<p>";
if ($preview == tra("Preview")) {
    $options = new output_options();
    echo "<div id=\"preview\">\n";
    echo "<div class=\"header\">" . tra("Preview") . "</div>\n";
    echo output_transform($content, $options);