示例#1
0
    echo "</div>\n";
}
echo "<form action=\"forum_post.php?id=" . $forum->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
echo form_tokens($logged_in_user->authenticator);
start_table();
row1(tra("Create a new thread"));
$submit_help = "";
$body_help = "";
if ($content && !$title) {
    $submit_help = "<br /><font color=\"red\">" . tra("Remember to add a title") . "</font>";
}
if ($force_title && $title) {
    row2(tra("Title"), htmlspecialchars($title) . "<input type=\"hidden\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">");
} else {
    row2(tra("Title") . $submit_help, "<input type=\"text\" name=\"title\" size=80 value=\"" . htmlspecialchars($title) . "\">");
}
row2(tra("Message") . html_info() . post_warning() . $body_help, $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>");
if (!$logged_in_user->prefs->no_signature_by_default) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
if (is_news_forum($forum)) {
    row2("", "<input name=export type=checkbox>" . tra("Show this item as a Notice in the BOINC Manager") . "<br><span class=note>" . tra("Do so only for items likely to be of interest to all volunteers.") . "</span>");
}
row2("", "<input name=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\"> " . tra("Add my signature to this post"));
row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"> <input type=\"submit\" value=\"" . tra("OK") . "\">");
end_table();
echo "</form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
示例#2
0
        if ($thread->locked) {
            show_button("forum_moderate_thread_action.php?action=unlock&amp;thread=" . $thread->id . "{$tokens}", tra("Unlock"), tra("Allow new posts in this thread"));
        } else {
            show_button("forum_moderate_thread.php?action=lock&amp;thread=" . $thread->id . "{$tokens}", tra("Lock"), tra("Don't allow new posts in this thread"));
        }
        if ($forum->parent_type == 0) {
            show_button("forum_moderate_thread.php?action=move&amp;thread=" . $thread->id . "{$tokens}", tra("Move"), tra("Move this thread to a different forum"));
        }
        show_button("forum_moderate_thread.php?action=title&amp;thread=" . $thread->id . "{$tokens}", tra("Edit title"), tra("Edit thread title"));
    }
    if (is_admin($logged_in_user)) {
        show_button("forum_moderate_thread.php?action=delete&amp;thread=" . $thread->id . "{$tokens}", tra("Delete"), tra("Delete thread permanently"));
    }
    // let admins decide whether a news item should be exported as notice
    //
    if (is_news_forum($forum) && $logged_in_user && $logged_in_user->id == $thread->owner) {
        if ($thread->status) {
            show_button("forum_thread_status.php?action=clear&amp;id={$thread->id}", tra("Export as Notice"), "Show this message to all volunteers in the desktop GUI.  Use this only for messages of interest or importance to all volunteers.");
        } else {
            show_button("forum_thread_status.php?action=set&amp;id={$thread->id}", tra("Don't export"), tra("Don't export this news item as a Notice"));
        }
    }
}
// Display a box that allows the user to select sorting of the posts
//
echo "</td><td align=\"right\">\n    <input type=\"hidden\" name=\"id\" value=\"", $thread->id, "\">" . tra("Sort");
echo select_from_array("sort", $thread_sort_styles, $sort_style);
echo "<input class=\"btn btn-default\" type=\"submit\" value=\"" . tra('Sort') . "\">\n    </td></tr></table></form>\n";
show_posts($thread, $forum, $start, $postid, $sort_style, $filter, $logged_in_user);
if ($reply_url) {
    echo "<br>";