示例#1
0
 echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</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, '*****@*****.**');
             $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
0
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', '*****@*****.**');
                $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
0
         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':