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'), " ", 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; } } } } echo " </td>\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'), " ", 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()) !== false) { 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_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; } } } } echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" colspan=\"2\"> </td>\n";