Пример #1
0
/**
 * Check whether the user has confirmed this action.
 *
 * If the user has not confirmed the action, generate a page which asks
 * the user to confirm and then submits a form back to the current page
 * with all the GET and POST data and an additional field called _confirmed
 * to indicate that confirmation has been done.
 * @param string $p_message
 * @param string $p_button_label
 * @return bool
 * @todo improve this formatting - to only be about 50% of the screen width so that it doesn't become hard to read.
 */
function helper_ensure_confirmed($p_message, $p_button_label)
{
    if (true == gpc_get_bool('_confirmed')) {
        return true;
    }
    html_page_top();
    echo "<br />\n<div align=\"center\">\n";
    print_hr();
    echo "\n{$p_message}\n";
    echo '<form method="post" action="' . string_attribute(form_action_self()) . "\">\n";
    # CSRF protection not required here - user needs to confirm action
    # before the form is accepted.
    print_hidden_inputs(gpc_strip_slashes($_POST));
    print_hidden_inputs(gpc_strip_slashes($_GET));
    echo "<input type=\"hidden\" name=\"_confirmed\" value=\"1\" />\n";
    echo '<br /><br /><input type="submit" class="button" value="' . $p_button_label . '" />';
    echo "\n</form>\n";
    print_hr();
    echo "</div>\n";
    html_page_bottom();
    exit;
}
Пример #2
0
function helper_ensure_confirmed($p_message, $p_button_label)
{
    if (true == gpc_get_bool('_confirmed')) {
        return true;
    }
    html_page_top1();
    html_page_top2();
    # @@@ we need to improve this formatting.  I'd like the text to only
    #  be about 50% the width of the screen so that it doesn't become to hard
    #  to read.
    print "<br />\n<div align=\"center\">\n";
    print_hr();
    print "\n{$p_message}\n";
    print '<form method="post" action="' . $_SERVER['PHP_SELF'] . "\">\n";
    print_hidden_inputs(gpc_strip_slashes($_POST));
    print_hidden_inputs(gpc_strip_slashes($_GET));
    print "<input type=\"hidden\" name=\"_confirmed\" value=\"1\" />\n";
    print '<br /><br /><input type="submit" class="button" value="' . $p_button_label . '" />';
    print "\n</form>\n";
    print_hr();
    print "</div>\n";
    html_page_bottom1();
    exit;
}
Пример #3
0
?>
<p>
<div align="center">
	<?php 
print_hr($g_hr_size, $g_hr_width);
?>
	<?php 
echo plugin_lang_get('delete_faq_sure_msg') . "<br>";
?>

	<form method="post" action="<?php 
echo $g_faq_delete;
?>
">
		<input type="hidden" name="f_id" value="<?php 
echo $f_id;
?>
">
		<input type="submit" value="<?php 
echo plugin_lang_get('delete_faq_item_button');
?>
">
	</form>

	<?php 
print_hr($g_hr_size, $g_hr_width);
?>
</div>

<?php 
html_page_bottom1();