本文整理汇总了PHP中captcha::get_public_key方法的典型用法代码示例。如果您正苦于以下问题:PHP captcha::get_public_key方法的具体用法?PHP captcha::get_public_key怎么用?PHP captcha::get_public_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类captcha
的用法示例。
在下文中一共展示了captcha::get_public_key方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
echo " <td align=\"left\" colspan=\"2\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
if (forum_get_setting('text_captcha_enabled', 'Y') && $text_captcha->generate_keys()) {
if (strlen(trim($text_captcha_private_key)) > 0) {
echo form_input_hidden("private_key", htmlentities_array($text_captcha_private_key));
echo form_input_hidden("public_key", htmlentities_array($text_captcha->get_public_key()));
} else {
if ($text_captcha_image = $text_captcha->make_image()) {
$forum_owner_email = forum_get_setting('forum_email', null, 'admin@beehiveforum.co.uk');
$forum_owner_link = sprintf("<a href=\"mailto:%s\">%s</a>", $forum_owner_email, gettext("forum owner"));
echo " <br />\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Confirmation"), "</td>\n";
echo " </tr>\n";
示例2: gettext
echo "<h3>", gettext("Register"), "</h3>\n";
echo "<div class=\"register_inner\">\n";
if (isset($user_agree_rules) && $user_agree_rules == 'Y') {
echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo " ", form_input_hidden('user_agree_rules', htmlentities_array($user_agree_rules)), "\n";
echo " <div class=\"register_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", null, 20, 15) . "</div>\n";
echo " <div class=\"register_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n";
echo " <div class=\"register_password\"><span>", gettext("Confirm Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n";
echo " <div class=\"register_nickname\"><span>", gettext("Nickname"), ":</span>", light_form_input_text("nickname", null, 20, 32), "</div>\n";
echo " <div class=\"register_email\"><span>", gettext("Email"), ":</span>", light_form_input_text("email", null, 20, 32), "</div>\n";
echo " <div class=\"register_dob\"><span>", gettext("Date of Birth"), ":</span>\n";
echo " ", light_form_dob_dropdowns(isset($new_user_prefs['DOB_YEAR']) ? htmlentities_array($new_user_prefs['DOB_YEAR']) : 0, isset($new_user_prefs['DOB_MONTH']) ? htmlentities_array($new_user_prefs['DOB_MONTH']) : 0, isset($new_user_prefs['DOB_DAY']) ? htmlentities_array($new_user_prefs['DOB_DAY']) : 0, true), "</div>\n";
if (forum_get_setting('text_captcha_enabled', 'Y') && $text_captcha->generate_keys()) {
if (strlen(trim($text_captcha_private_key)) > 0) {
echo form_input_hidden("private_key", htmlentities_array($text_captcha_private_key));
echo form_input_hidden("public_key", htmlentities_array($text_captcha->get_public_key()));
} else {
if (($text_captcha_image = $text_captcha->make_image()) !== false) {
$forum_owner_email = forum_get_setting('forum_email', 'strlen', 'admin@beehiveforum.co.uk');
$forum_owner_link = sprintf("<a href=\"mailto:%s\">%s</a>", $forum_owner_email, gettext("forum owner"));
echo "</div>\n";
echo "</div>\n";
echo "<div class=\"register\">\n";
echo "<h3>", gettext("Confirmation"), "</h3>\n";
echo "<div class=\"register_inner\">\n";
//echo " <div class=\"register_confirmation\">\n";
echo " <div class=\"register_confirmation\">", sprintf(gettext("To prevent automated registrations this forum requires you enter a confirmation code. The code is displayed in the image below. If you are visually impaired or cannot otherwise read the code please contact the %s."), $forum_owner_link), "</div>\n";
echo " <div class=\"register_confirmation_image\">\n";
echo " ", html_style_image('text_captcha_image', gettext("This is a captcha-picture. It is used to prevent automatic registration"), 'text_captcha_image', array('background-image' => sprintf("url('data:image/jpeg;base64,%s')", base64_encode(file_get_contents($text_captcha_image))), 'width' => "{$text_captcha->get_width()}px", 'height' => "{$text_captcha->get_height()}px")), "\n";
echo " ", html_style_image('text_captcha_reload reload', null, 'text_captcha_reload'), "\n";
echo " </div>\n";
示例3: captcha
exit;
}
break;
case 'reload_captcha':
$text_captcha = new captcha(6, 15, 25, 9, 30);
if (!$text_captcha->generate_keys()) {
header_status(500, 'Internal Server Error');
exit;
}
if (!($text_captcha_image = $text_captcha->make_image())) {
header_status(500, 'Internal Server Error');
exit;
}
cache_disable();
header('Content-Type: application/json');
$content = json_encode(array('image' => sprintf("data:image/jpeg;base64,%s", base64_encode(file_get_contents($text_captcha_image))), 'chars' => $text_captcha->get_num_chars(), 'key' => $text_captcha->get_public_key()));
break;
case 'font_size_larger':
case 'font_size_smaller':
if (!session::logged_in()) {
break;
}
cache_disable();
if (!isset($_GET['msg']) || !validate_msg($_GET['msg'])) {
header_status(500, 'Internal Server Error');
exit;
}
list($tid, $pid) = explode('.', $_GET['msg']);
$user_prefs = user_get_prefs($uid);
switch ($_GET['action']) {
case 'font_size_smaller':