示例#1
0
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', '*****@*****.**');
                $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";
                echo "  <div class=\"register_confirmation_input\">\n";
                echo "    ", light_form_input_text("private_key", null, 20, htmlentities_array($text_captcha->get_num_chars())), "\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"center\">\n";
echo "                    <table class=\"posthead\" width=\"95%\">\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"250\">", gettext("Use text-captcha"), ":</td>\n";
echo "                        <td align=\"left\">", form_radio("text_captcha_enabled", "Y", gettext("Yes"), isset($forum_global_settings['text_captcha_enabled']) && $forum_global_settings['text_captcha_enabled'] == 'Y'), "&nbsp;", form_radio("text_captcha_enabled", "N", gettext("No"), isset($forum_global_settings['text_captcha_enabled']) && $forum_global_settings['text_captcha_enabled'] == 'N' || !isset($forum_global_settings['text_captcha_enabled'])), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"270\">", gettext("Text-captcha Dir"), ":</td>\n";
echo "                        <td align=\"left\">", form_input_text("text_captcha_dir", isset($forum_global_settings['text_captcha_dir']) ? htmlentities_array($forum_global_settings['text_captcha_dir']) : "text_captcha", 35, 255), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" colspan=\"2\">\n";
if (isset($forum_global_settings['text_captcha_enabled']) && $forum_global_settings['text_captcha_enabled'] == "Y") {
    if (!$text_captcha->generate_keys() || !$text_captcha->make_image()) {
        if ($errno = $text_captcha->get_error()) {
            switch ($errno) {
                case TEXT_CAPTCHA_NO_FONTS:
                    html_display_error_msg(gettext("Text-captcha has been disabled automatically because there are no true type fonts available for it to use. Please upload some true type fonts to <b>text_captcha/fonts</b> on your server."), '95%', 'center');
                    break;
                case TEXT_CAPTCHA_DIR_ERROR:
                    html_display_error_msg(gettext("Text-captcha has been disabled because the text_captcha directory and it's sub-directories are not writable by the web server / PHP process."), '95%', 'center');
                    break;
                case TEXT_CAPTCHA_GD_ERROR:
                    html_display_error_msg(gettext("Text-captcha has been disabled because your server's PHP setup does not provide support for GD Image manipulation and / or TTF font support. Both are required for text-captcha support."), '95%', 'center');
                    break;
            }
        }
    }
}
示例#3
0
 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, '*****@*****.**');
             $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";
             echo "              </table>\n";
             echo "              <table class=\"posthead\" width=\"100%\">\n";