Exemple #1
0
function show_message_row($thread, $parent_post)
{
    global $g_logged_in_user;
    global $content;
    global $preview;
    $x1 = "Message:" . html_info() . post_warning();
    $x2 = "";
    if ($parent_post) {
        $x2 .= " reply to <a href=#" . $parent_post->id . ">Message ID " . $parent_post->id . "</a>:";
    }
    $x2 .= "<form action=forum_reply.php?thread=" . $thread->id;
    if ($parent_post) {
        $x2 .= "&post=" . $parent_post->id;
    }
    $x2 .= " method=\"post\">\n";
    $x2 .= form_tokens($g_logged_in_user->authenticator);
    $x2 .= "<textarea name=\"content\" rows=\"18\" cols=\"80\">";
    $no_quote = get_int("no_quote", true) == 1;
    if ($preview) {
        $x2 .= htmlspecialchars($content);
    } else {
        if (!$no_quote) {
            if ($parent_post) {
                $x2 .= quote_text(htmlspecialchars($parent_post->content), 80) . "\n";
            }
        }
    }
    if (!$g_logged_in_user->prefs->no_signature_by_default) {
        $enable_signature = "checked=\"true\"";
    } else {
        $enable_signature = "";
    }
    $x2 .= "</textarea><p>\r\n\t\t<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\">\r\n\t\t<input type=\"submit\" value=\"Post reply\">\r\n\t\t<input name=\"add_signature\" id=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\">\r\n\t\t<label for=\"add_signature\">Add my signature to this reply</label>\r\n\r\n\t\t</form>\r\n\t";
    row2($x1, $x2);
}
Exemple #2
0
    echo "</div>\n";
}
echo "<form action=\"forum_edit.php?id=" . $post->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
echo form_tokens($logged_in_user->authenticator);
start_table();
row1(tra("Edit your message"));
if ($can_edit_title) {
    //If this is the user can edit the thread title display a way of doing so
    if ($preview) {
        row2(tra("Title") . html_info(), "<input type=\"text\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">");
    } else {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">');
    }
}
if ($preview) {
    row2(tra("Message") . html_info() . post_warning(), $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>");
} else {
    row2(tra("Message") . html_info() . post_warning(), $bbcode_html . '<textarea name="content" rows="12" cols="80" class="message_field">' . htmlspecialchars($post->content) . '</textarea>');
}
if ($post->signature) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
row2("", "<input id=\"add_signature\" name=\"add_signature\" value=\"1\" " . $enable_signature . " type=\"checkbox\">\n    <label for=\"add_signature\">" . tra("Add my signature to this post") . "</label>");
row2("", "<input class=\"btn btn-default\" type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input class=\"btn btn-primary\" type=\"submit\" name=\"submit\" value=\"OK\">");
end_table();
echo "</form>";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
Exemple #3
0
}
echo '<form action="forum_edit.php?id=' . $post->id . '" method="POST">\\n';
echo form_tokens($logged_in_user->authenticator);
start_table();
row1("Edit your message");
if ($can_edit_title) {
    //If this is the user can edit the thread title display a way of doing so
    if ($preview) {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($title) . '">');
    } else {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">');
    }
}
if ($preview) {
    row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($content) . '</textarea>');
} else {
    row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($post->content) . '</textarea>');
}
if ($post->signature) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
row2('', '<input id="add_signature" name="add_signature" value="1" ' . $enable_signature . ' type="checkbox">
	<label for="add_signature">' . tra("Add my signature to this post") . '</label>');
row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input type=\"submit\" name=\"submit\" value=\"OK\">");
end_table();
echo "</form>";
page_tail();
$cvs_version_tracker[] = "\$Id: forum_edit.php 15758 2008-08-05 22:43:14Z davea \$";
//Generated automatically - do not edit
    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\$";
Exemple #5
0
function show_message_row($thread, $parent_post)
{
    global $logged_in_user, $bbcode_html;
    global $content, $preview;
    $x1 = tra("Message:") . html_info() . post_warning();
    $x2 = "";
    if ($parent_post) {
        $x2 .= " " . tra("reply to %1Message ID%2:", "<a href=#" . $parent_post->id . ">", " " . $parent_post->id . "</a>");
    }
    $x2 .= "<form action=forum_reply.php?thread=" . $thread->id;
    if ($parent_post) {
        $x2 .= "&post=" . $parent_post->id;
    }
    $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
    $x2 .= form_tokens($logged_in_user->authenticator);
    $x2 .= $bbcode_html . "<textarea name=\"content\" rows=\"18\" cols=\"80\">";
    $no_quote = get_int("no_quote", true) == 1;
    if ($preview) {
        $x2 .= htmlspecialchars($content);
    } else {
        if (!$no_quote) {
            if ($parent_post) {
                $x2 .= quote_text(htmlspecialchars($parent_post->content)) . "\n";
            }
        }
    }
    if (!$logged_in_user->prefs->no_signature_by_default) {
        $enable_signature = "checked=\"true\"";
    } else {
        $enable_signature = "";
    }
    $x2 .= "</textarea><p>\n        <input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\">\n        <input type=\"submit\" value=\"" . tra("Post reply") . "\">\n        &nbsp;&nbsp;&nbsp;\n        <input type=\"checkbox\" name=\"add_signature\" id=\"add_signature\" value=\"add_it\" " . $enable_signature . ">\n        <label for=\"add_signature\">" . tra("Add my signature to this reply") . "</label>\n\n        </form>\n    ";
    row2($x1, $x2);
}
Exemple #6
0
    echo "</div>\n";
}
echo "<form action=\"forum_post.php?id=" . $forum->id . "\" method=\"POST\">\n";
echo form_tokens($logged_in_user->authenticator);
echo "<br />";
start_table();
row1_top(tra("Create a new thread"));
//New thread
$submit_help = "";
$body_help = "";
if ($content && !$title) {
    $submit_help = "<br /><font color=\"red\">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=\"62\" value=\"" . htmlspecialchars($title) . "\">");
}
//Message
row2(tra("Message") . html_info() . post_warning() . $body_help, "<textarea name=\"content\" rows=\"12\" cols=\"54\">" . htmlspecialchars($content) . "</textarea>");
if (!$logged_in_user->prefs->no_signature_by_default) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
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=\"OK\">");
end_table();
echo "</form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id: forum_post.php 16747 2008-12-29 10:19:25Z jbk \$";