Esempio n. 1
0
        function main_settings_page()
        {
            if (!rs_wpss_is_user_admin()) {
                $restricted_area_warning = __('You do not have sufficient permissions to access this page.');
                $args = array('response' => '403');
                wp_die($restricted_area_warning, '', $args);
            }
            echo WPSS_EOL . "\t\t\t" . '<div class="wrap">' . WPSS_EOL . "\t\t\t" . '<h2>WP-SpamShield ' . __('Settings') . '</h2>' . WPSS_EOL;
            $ip = rs_wpss_get_ip_addr();
            $spam_count_raw = rs_wpss_count();
            global $spamshield_options;
            if (empty($spamshield_options)) {
                $spamshield_options = get_option('spamshield_options');
            }
            rs_wpss_update_session_data($spamshield_options);
            $spamshield_options_prev = $spamshield_options;
            /* Previous options set - plugin will use them to compare when validating */
            $wpss_admin_email = get_option('admin_email');
            $current_date = date('Y-m-d');
            $install_date = empty($spamshield_options['install_date']) ? $current_date : $spamshield_options['install_date'];
            $num_days_inst = rs_wpss_date_diff($install_date, $current_date);
            if ($num_days_inst < 1) {
                $num_days_inst = 1;
            }
            $spam_count = $spam_count_raw;
            if ($spam_count < 1) {
                $spam_count = 1;
            }
            $avg_blk_dly = round($spam_count / $num_days_inst);
            $avg_blk_dly_d = rs_wpss_number_format($avg_blk_dly);
            $est_hrs_ret = $this->est_hrs_returned($spam_count);
            $est_hrs_ret_d = rs_wpss_number_format($est_hrs_ret);
            /* Initialize new vars */
            if (empty($spamshield_options['comment_min_length'])) {
                $spamshield_options['comment_min_length'] = 15;
            }
            if (!isset($spamshield_options['disable_cf7_shield'])) {
                $spamshield_options['disable_cf7_shield'] = 0;
            }
            if (!isset($spamshield_options['disable_gf_shield'])) {
                $spamshield_options['disable_gf_shield'] = 0;
            }
            if (!isset($spamshield_options['disable_misc_form_shield'])) {
                $spamshield_options['disable_misc_form_shield'] = 0;
            }
            if (!isset($spamshield_options['disable_email_encode'])) {
                $spamshield_options['disable_email_encode'] = 0;
            }
            /* Check Installation Status */
            $wpss_inst_status = $this->check_install_status();
            if (!empty($wpss_inst_status)) {
                $wpss_inst_status_image = 'settings-status-installed-correctly-24';
                $wpss_inst_status_color = '#77A51F';
                /* '#D6EF7A', 'green' */
                $wpss_inst_status_bg_color = '#EBF7D5';
                /* '#77A51F', '#CCFFCC' */
                $wpss_inst_status_msg_main = __('Installed Correctly', WPSS_PLUGIN_NAME);
                $wpss_inst_status_msg_text = rs_wpss_casetrans('lower', $wpss_inst_status_msg_main);
            } else {
                $wpss_inst_status_image = 'settings-status-not-installed-correctly-24';
                $wpss_inst_status_color = '#A63104';
                /* '#FC956D', 'red' */
                $wpss_inst_status_bg_color = '#FEDBCD';
                /* '#A63104', '#FFCCCC' */
                $wpss_inst_status_msg_main = __('Not Installed Correctly', WPSS_PLUGIN_NAME);
                $wpss_inst_status_msg_text = rs_wpss_casetrans('lower', $wpss_inst_status_msg_main);
            }
            /* Checks Complete */
            /* Save Options */
            if (!empty($_POST['submit_wpss_general_options']) && rs_wpss_is_user_admin() && check_admin_referer('wpss_update_general_options_token', 'ugo_tkn')) {
                echo '<div class="updated fade"><p>' . __('Plugin Spam settings saved.', WPSS_PLUGIN_NAME) . '</p></div>';
            }
            if (!empty($_POST['submit_wpss_contact_options']) && rs_wpss_is_user_admin() && check_admin_referer('wpss_update_contact_options_token', 'uco_tkn')) {
                echo '<div class="updated fade"><p>' . __('Plugin Contact Form settings saved.', WPSS_PLUGIN_NAME) . '</p></div>';
            }
            /* Add IP to Blacklist */
            $ip_to_blacklist = $ip_blacklist_nonce_value = '';
            if (!empty($_POST['bl_ip'])) {
                $ip_to_blacklist = sanitize_text_field(stripslashes($_POST['bl_ip']));
            }
            $ip_nodot = str_replace('.', '', $ip_to_blacklist);
            $ip_blacklist_nonce_action = 'blacklist_IP_' . $ip_to_blacklist;
            $ip_blacklist_nonce_name = 'bl' . $ip_nodot . 'tkn';
            if (!empty($_POST[$ip_blacklist_nonce_name])) {
                $ip_blacklist_nonce_value = sanitize_text_field(stripslashes($_POST[$ip_blacklist_nonce_name]));
            }
            $wpss_action = !empty($_POST['wpss_action']) ? sanitize_text_field(stripslashes($_POST['wpss_action'])) : '';
            if ($wpss_action === 'blacklist_ip' && !empty($_POST['bl_ip']) && !empty($_POST[$ip_blacklist_nonce_name]) && rs_wpss_is_user_admin() && empty($_POST['submit_wpss_general_options']) && empty($_POST['submit_wpss_contact_options'])) {
                if (rs_wpss_verify_nonce($ip_blacklist_nonce_value, $ip_blacklist_nonce_action, $ip_blacklist_nonce_name)) {
                    if (rs_wpss_is_valid_ip($ip_to_blacklist)) {
                        if ($ip_to_blacklist === $ip) {
                            echo '<div class="error fade"><p>' . __('Are you sure you want to blacklist yourself? IP Address not added to Comment Blacklist.', WPSS_PLUGIN_NAME) . '</p></div>';
                            /* NEEDS TRANSLATION */
                        } elseif (rs_wpss_is_admin_ip($ip_to_blacklist)) {
                            echo '<div class="error fade"><p>' . __('Are you sure you want to blacklist an Administrator? IP Address not added to Comment Blacklist.', WPSS_PLUGIN_NAME) . '</p></div>';
                            /* NEEDS TRANSLATION */
                        } else {
                            $ip_to_blacklist_valid = '1';
                            rs_wpss_add_ip_to_blacklist($ip_to_blacklist);
                            echo '<div class="updated fade"><p>' . __('IP Address added to Comment Blacklist.', WPSS_PLUGIN_NAME) . '</p></div>';
                        }
                    } else {
                        echo '<div class="error fade"><p>' . __('Invalid IP Address - not added to Comment Blacklist.', WPSS_PLUGIN_NAME) . '</p></div>';
                    }
                } else {
                    echo '<div class="error fade"><p>' . __('Security token invalid or expired. IP Address not added to Comment Blacklist.', WPSS_PLUGIN_NAME) . '</p></div>';
                    /* NEEDS TRANSLATION */
                }
            }
            /* Set Margins */
            $wpss_vert_margins = '15';
            $wpss_horz_margins = '15';
            $wpss_icon_size = '48';
            $wpss_sm_txt_spacer_size = '24';
            /* Display Install Status */
            ?>
			<div style='width:797px;border-style:solid;border-width:1px;border-color:<?php 
            echo $wpss_inst_status_color;
            ?>
;background-color:<?php 
            echo $wpss_inst_status_bg_color;
            ?>
;padding:0px 15px 0px 15px;margin-top:30px;float:left;clear:left;'>
			<p><strong><?php 
            echo "<img src='" . WPSS_PLUGIN_IMG_URL . "/" . $wpss_inst_status_image . ".png' alt='' width='24' height='24' style='border-style:none;vertical-align:middle;padding-right:7px;' /> " . __('Installation Status', WPSS_PLUGIN_NAME) . ": <span style='color:" . $wpss_inst_status_color . ";'>" . $wpss_inst_status_msg_main . "</span>";
            ?>
</strong></p>
			</div>

			<?php 
            /**
             * TO DO:
             * Detect PHP Version and Memory Issues and Display Warning, with info on how to fix
             **/
            /* Start Layout */
            if (!empty($spam_count_raw)) {
                echo WPSS_EOL . "\t\t\t<div style='width:797px;border-style:solid;border-width:1px;border-color:#333333;background-color:#FEFEFE;padding:0px 15px 0px 15px;margin-top:" . $wpss_vert_margins . "px;float:left;clear:left;'>" . WPSS_EOL . "\t\t\t<p style='font-size:20px;line-height:180%;'><img src='" . WPSS_PLUGIN_IMG_URL . "/settings-spam-protection-" . $wpss_icon_size . ".png' alt='' width='" . $wpss_icon_size . "' height='" . $wpss_icon_size . "' style='border-style:none;vertical-align:middle;padding-right:7px;' /> " . sprintf(__('WP-SpamShield has blocked <strong> %s </strong> spam!', WPSS_PLUGIN_NAME), rs_wpss_number_format($spam_count_raw)) . "</p>" . WPSS_EOL . "\t\t\t";
                if ($avg_blk_dly >= 2) {
                    echo "<p style='line-height:180%;'><img src='" . WPSS_PLUGIN_IMG_URL . "/spacer.gif' alt='' width='" . $wpss_icon_size . "' height='" . $wpss_sm_txt_spacer_size . "' style='border-style:none;vertical-align:middle;padding-right:7px;' /> " . sprintf(__('That\'s <strong> %s </strong> spam a day that you don\'t have to worry about.', WPSS_PLUGIN_NAME), $avg_blk_dly_d) . "</p>" . WPSS_EOL . "\t\t\t";
                }
                if (rs_wpss_is_lang_en_us() && $est_hrs_ret >= 2) {
                    echo "<p style='line-height:180%;'><img src='" . WPSS_PLUGIN_IMG_URL . "/spacer.gif' alt='' width='" . $wpss_icon_size . "' height='" . $wpss_sm_txt_spacer_size . "' style='border-style:none;vertical-align:middle;padding-right:7px;' /> " . sprintf(__('This plugin has saved you <strong> %s </strong> hours of managing spam. You\'re welcome!', WPSS_PLUGIN_NAME), $est_hrs_ret_d) . "</p>" . WPSS_EOL . "\t\t\t";
                }
                echo "</div>" . WPSS_EOL . "\t\t\t";
            }
            if (!empty($_POST['submitted_wpss_general_options']) && rs_wpss_is_user_admin() && check_admin_referer('wpss_update_general_options_token', 'ugo_tkn')) {
                if (!empty($_POST['comment_logging'])) {
                    $post_comment_logging = $_POST['comment_logging'];
                } else {
                    $post_comment_logging = 0;
                }
                if (!empty($_POST['comment_logging_all'])) {
                    $post_comment_logging_all = $_POST['comment_logging_all'];
                } else {
                    $post_comment_logging_all = 0;
                }
                if (!empty($post_comment_logging_all)) {
                    $post_comment_logging = 1;
                }
                if (!empty($post_comment_logging) && empty($spamshield_options['comment_logging_start_date'])) {
                    $comment_logging_start_date = time();
                    rs_wpss_log_reset();
                } elseif (!empty($post_comment_logging) && !empty($spamshield_options['comment_logging_start_date'])) {
                    $comment_logging_start_date = $spamshield_options['comment_logging_start_date'];
                } else {
                    $comment_logging_start_date = 0;
                }
                /* Reset Log when turning on Comment Logging - 1.7.9 */
                if (!empty($post_comment_logging) && empty($spamshield_options['comment_logging'])) {
                    $comment_logging_start_date = time();
                    rs_wpss_log_reset();
                }
                /* Update User Admin Status */
                $this->update_admin_status();
                /* Check if initial user approval process was run on activation */
                $wpss_init_user_approve_run = get_option('spamshield_init_user_approve_run');
                if (empty($wpss_init_user_approve_run)) {
                    $this->approve_previous_users();
                }
                /* Validate POST Values */
                $valid_post_spamshield_options = !empty($_POST) ? $_POST : array();
                $wpss_options_default = unserialize(WPSS_OPTIONS_DEFAULT);
                $wpss_options_general_boolean = array('block_all_trackbacks', 'block_all_pingbacks', 'comment_logging', 'comment_logging_all', 'enhanced_comment_blacklist', 'enable_whitelist', 'allow_proxy_users', 'hide_extra_data', 'registration_shield_disable', 'registration_shield_level_1', 'disable_cf7_shield', 'disable_gf_shield', 'disable_misc_form_shield', 'disable_email_encode', 'allow_comment_author_keywords', 'promote_plugin_link');
                $wpss_options_general_boolean_count = count($wpss_options_general_boolean);
                $i = 0;
                while ($i < $wpss_options_general_boolean_count) {
                    if (!empty($_POST[$wpss_options_general_boolean[$i]]) && ($_POST[$wpss_options_general_boolean[$i]] === 'on' || $_POST[$wpss_options_general_boolean[$i]] == 1 || $_POST[$wpss_options_general_boolean[$i]] == '1')) {
                        $valid_post_spamshield_options[$wpss_options_general_boolean[$i]] = 1;
                    } else {
                        $valid_post_spamshield_options[$wpss_options_general_boolean[$i]] = 0;
                    }
                    ++$i;
                }
                if (empty($spamshield_options['comment_logging_all']) && $valid_post_spamshield_options['comment_logging_all'] == 1) {
                    /* Added 1.4.3 - Turns Blocked Comment Logging Mode on if user selects "Log All Comments" */
                    $valid_post_spamshield_options['comment_logging'] = 1;
                }
                if (!empty($spamshield_options['comment_logging']) && $valid_post_spamshield_options['comment_logging'] == 0) {
                    /* Added 1.4.3 - If Blocked Comment Logging Mode is turned off then deselects "Log All Comments" */
                    $valid_post_spamshield_options['comment_logging_all'] = 0;
                }
                if (!empty($_POST['comment_min_length'])) {
                    $comment_min_length_temp = trim(stripslashes($_POST['comment_min_length']));
                    if ($comment_min_length_temp < 1) {
                        $comment_min_length_temp = 1;
                    } elseif ($comment_min_length_temp > 30) {
                        $comment_min_length_temp = 30;
                    }
                    $valid_post_spamshield_options['comment_min_length'] = $comment_min_length_temp;
                } else {
                    $valid_post_spamshield_options['comment_min_length'] = $wpss_options_default['comment_min_length'];
                }
                /* Update Values */
                $option_list_go = array('block_all_trackbacks', 'block_all_pingbacks', 'comment_logging', 'comment_logging_all', 'enhanced_comment_blacklist', 'enable_whitelist', 'comment_min_length', 'allow_proxy_users', 'hide_extra_data', 'registration_shield_disable', 'registration_shield_level_1', 'disable_cf7_shield', 'disable_gf_shield', 'disable_misc_form_shield', 'disable_email_encode', 'allow_comment_author_keywords', 'promote_plugin_link');
                foreach ($option_list_go as $i => $v) {
                    $spamshield_options[$v] = $valid_post_spamshield_options[$v];
                }
                $spamshield_options['comment_logging_start_date'] = $comment_logging_start_date;
                $spamshield_options['install_date'] = $install_date;
                update_option('spamshield_options', $spamshield_options);
                if (!empty($ip)) {
                    update_option('spamshield_last_admin', $ip);
                }
                $blacklist_keys_update = trim(stripslashes($_POST['wordpress_comment_blacklist']));
                rs_wpss_update_bw_list_keys('black', $blacklist_keys_update);
                $whitelist_keys_update = trim(stripslashes($_POST['wpss_whitelist']));
                rs_wpss_update_bw_list_keys('white', $whitelist_keys_update);
            }
            if (!empty($_POST['submitted_wpss_contact_options']) && rs_wpss_is_user_admin() && check_admin_referer('wpss_update_contact_options_token', 'uco_tkn')) {
                /* Update User Admin Status */
                $this->update_admin_status();
                /* Check if initial user approval process was run on activation */
                $wpss_init_user_approve_run = get_option('spamshield_init_user_approve_run');
                if (empty($wpss_init_user_approve_run)) {
                    $this->approve_previous_users();
                }
                /* Validate POST Values */
                $valid_post_spamshield_options = !empty($_POST) ? $_POST : array();
                $wpss_options_default = unserialize(WPSS_OPTIONS_DEFAULT);
                $wpss_options_contact_boolean = array('form_include_website', 'form_require_website', 'form_include_phone', 'form_require_phone', 'form_include_company', 'form_require_company', 'form_include_drop_down_menu', 'form_require_drop_down_menu', 'form_include_user_meta');
                $wpss_options_contact_boolean_count = count($wpss_options_contact_boolean);
                $i = 0;
                while ($i < $wpss_options_contact_boolean_count) {
                    if (!empty($_POST[$wpss_options_contact_boolean[$i]]) && ($_POST[$wpss_options_contact_boolean[$i]] === 'on' || $_POST[$wpss_options_contact_boolean[$i]] == 1 || $_POST[$wpss_options_contact_boolean[$i]] == '1')) {
                        $valid_post_spamshield_options[$wpss_options_contact_boolean[$i]] = 1;
                    } else {
                        $valid_post_spamshield_options[$wpss_options_contact_boolean[$i]] = 0;
                    }
                    ++$i;
                }
                $wpss_options_contact_text = array('form_drop_down_menu_title', 'form_drop_down_menu_item_1', 'form_drop_down_menu_item_2', 'form_drop_down_menu_item_3', 'form_drop_down_menu_item_4', 'form_drop_down_menu_item_5', 'form_drop_down_menu_item_6', 'form_drop_down_menu_item_7', 'form_drop_down_menu_item_8', 'form_drop_down_menu_item_9', 'form_drop_down_menu_item_10', 'form_response_thank_you_message');
                $wpss_options_contact_text_count = count($wpss_options_contact_text);
                $i = 0;
                while ($i < $wpss_options_contact_text_count) {
                    if (!empty($_POST[$wpss_options_contact_text[$i]])) {
                        $valid_post_spamshield_options[$wpss_options_contact_text[$i]] = trim(stripslashes($_POST[$wpss_options_contact_text[$i]]));
                    } else {
                        $valid_post_spamshield_options[$wpss_options_contact_text[$i]] = $wpss_options_default[$wpss_options_contact_text[$i]];
                    }
                    ++$i;
                }
                if (!empty($_POST['form_message_width'])) {
                    $form_message_width_temp = trim(stripslashes($_POST['form_message_width']));
                    if ($form_message_width_temp < 40) {
                        $form_message_width_temp = 40;
                    }
                    $valid_post_spamshield_options['form_message_width'] = $form_message_width_temp;
                } else {
                    $valid_post_spamshield_options['form_message_width'] = $wpss_options_default['form_message_width'];
                }
                if (!empty($_POST['form_message_height'])) {
                    $form_message_height_temp = trim(stripslashes($_POST['form_message_height']));
                    if ($form_message_height_temp < 5) {
                        $form_message_height_temp = 5;
                    }
                    $valid_post_spamshield_options['form_message_height'] = $form_message_height_temp;
                } else {
                    $valid_post_spamshield_options['form_message_height'] = $wpss_options_default['form_message_height'];
                }
                if (!empty($_POST['form_message_min_length'])) {
                    $form_message_min_length_temp = trim(stripslashes($_POST['form_message_min_length']));
                    if ($form_message_min_length_temp < 15) {
                        $form_message_min_length_temp = 15;
                    } elseif ($form_message_min_length_temp > 150) {
                        $form_message_min_length_temp = 150;
                    }
                    $valid_post_spamshield_options['form_message_min_length'] = $form_message_min_length_temp;
                } else {
                    $valid_post_spamshield_options['form_message_min_length'] = $wpss_options_default['form_message_min_length'];
                }
                if (!empty($_POST['form_message_recipient'])) {
                    $form_message_recipient_temp = trim(stripslashes($_POST['form_message_recipient']));
                    if (is_email($form_message_recipient_temp)) {
                        $valid_post_spamshield_options['form_message_recipient'] = $form_message_recipient_temp;
                    } else {
                        $valid_post_spamshield_options['form_message_recipient'] = $wpss_admin_email;
                    }
                } else {
                    $valid_post_spamshield_options['form_message_recipient'] = $wpss_admin_email;
                }
                $option_list_co = array('form_include_website', 'form_require_website', 'form_include_phone', 'form_require_phone', 'form_include_company', 'form_require_company', 'form_include_drop_down_menu', 'form_require_drop_down_menu', 'form_drop_down_menu_title', 'form_drop_down_menu_item_1', 'form_drop_down_menu_item_2', 'form_drop_down_menu_item_3', 'form_drop_down_menu_item_4', 'form_drop_down_menu_item_5', 'form_drop_down_menu_item_6', 'form_drop_down_menu_item_7', 'form_drop_down_menu_item_8', 'form_drop_down_menu_item_9', 'form_drop_down_menu_item_10', 'form_message_width', 'form_message_height', 'form_message_min_length', 'form_message_recipient', 'form_response_thank_you_message', 'form_include_user_meta');
                foreach ($option_list_co as $i => $v) {
                    $spamshield_options[$v] = $valid_post_spamshield_options[$v];
                }
                /***
                 * Validate Include/Require Options
                 * Dummy-proofing the contact form settings so that you can't require a field without including it first.
                 * Added 1.9.5.3
                 ***/
                $option_list_co_ir = array('website', 'phone', 'company', 'drop_down_menu');
                foreach ($option_list_co_ir as $i => $v) {
                    $req = 'form_require_';
                    $inc = 'form_include_';
                    $i_old = $spamshield_options_prev[$inc . $v];
                    $i_new = $spamshield_options[$inc . $v];
                    $r_old = $spamshield_options_prev[$req . $v];
                    $r_new = $spamshield_options[$req . $v];
                    if (!empty($r_new) && empty($i_new) && empty($i_old) && empty($r_old)) {
                        $spamshield_options[$inc . $v] = 1;
                    } elseif (empty($i_new) && !empty($r_new) && !empty($i_old) && !empty($r_old)) {
                        $spamshield_options[$req . $v] = 0;
                    }
                }
                $spamshield_options['install_date'] = $install_date;
                if (!empty($spamshield_options['comment_logging_all'])) {
                    $spamshield_options['comment_logging'] = 1;
                }
                if (empty($spamshield_options['comment_logging'])) {
                    $spamshield_options['comment_logging_all'] = 0;
                }
                update_option('spamshield_options', $spamshield_options);
                rs_wpss_update_session_data($spamshield_options);
                if (!empty($ip)) {
                    update_option('spamshield_last_admin', $ip);
                }
            }
            if (!rs_wpss_is_lang_en_us()) {
                $wpss_info_box_height = '335';
            } else {
                $wpss_info_box_height = '315';
            }
            $wordpress_comment_blacklist = rs_wpss_get_bw_list_keys('black');
            $wpss_whitelist = rs_wpss_get_bw_list_keys('white');
            ?>

			<div style="width:375px;height:<?php 
            echo $wpss_info_box_height;
            ?>
px;border-style:solid;border-width:1px;border-color:#003366;background-color:#DDEEFF;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;clear:left;">
			<p><a name="wpss_top"><h3><?php 
            _e('Quick Navigation - Contents', WPSS_PLUGIN_NAME);
            ?>
</h3></a></p>
			<ol style="list-style-type:decimal;padding-left:30px;">
				<li><a href="#wpss_general_options"><?php 
            _e('General Settings', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="#wpss_contact_form_options"><?php 
            _e('Contact Form Settings', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
installation-instructions/" target="_blank" rel="external" ><?php 
            _e('Installation Instructions', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
displaying-stats/" target="_blank" rel="external" ><?php 
            _e('Displaying Spam Stats on Your Blog', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
installing-contact-form/" target="_blank" rel="external" ><?php 
            _e('Adding a Contact Form to Your Blog', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
configuration/" target="_blank" rel="external" ><?php 
            _e('Configuration Information', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
known-conflicts/" target="_blank" rel="external" ><?php 
            _e('Known Plugin Conflicts', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
troubleshooting-guide/" target="_blank" rel="external" ><?php 
            _e('Troubleshooting Guide / Support', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="#wpss_let_others_know"><?php 
            _e('Let Others Know About WP-SpamShield', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="#wpss_download_plugin_documentation"><?php 
            echo rs_wpss_doc_txt();
            ?>
</a></li>
			</ol>
			</div>
			<div style="width:375px;height:<?php 
            echo $wpss_info_box_height;
            ?>
px;border-style:solid;border-width:1px;border-color:#003366;background-color:#DDEEFF;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;">
			<p>
			<?php 
            if ($spam_count_raw > 100) {
                ?>
			<a name="wpss_rate"><h3><?php 
                _e('Happy with WP-SpamShield?', WPSS_PLUGIN_NAME);
                ?>
</h3></a></p>
			<p><img src='<?php 
                echo WPSS_PLUGIN_IMG_URL;
                ?>
/5-stars-rating.png' alt='' width='99' height='19' align='right' style='border-style:none;padding:3px 0 20px 20px;float:right;' /><a href="<?php 
                echo WPSS_WP_RATING_URL;
                ?>
" target="_blank" rel="external" ><?php 
                _e('Let others know by giving it a good rating on WordPress.org!', WPSS_PLUGIN_NAME);
                ?>
</a><br /><br />
			<?php 
            }
            ?>

			<strong><?php 
            echo rs_wpss_doc_txt();
            ?>
:</strong> <a href="<?php 
            echo WPSS_HOME_URL;
            ?>
" target="_blank" rel="external" ><?php 
            _e('Plugin Homepage', WPSS_PLUGIN_NAME);
            ?>
</a><br />
			<strong><?php 
            _e('Tech Support', WPSS_PLUGIN_NAME);
            ?>
:</strong> <a href="<?php 
            echo WPSS_SUPPORT_URL;
            ?>
" target="_blank" rel="external" ><?php 
            _e('WP-SpamShield Support', WPSS_PLUGIN_NAME);
            ?>
</a><br />
			<strong><?php 
            _e('Follow on Twitter', WPSS_PLUGIN_NAME);
            ?>
:</strong> <a href="http://twitter.com/WPSpamShield" target="_blank" rel="external" >@WPSpamShield</a><br />
			<strong><?php 
            _e('Let Others Know', WPSS_PLUGIN_NAME);
            ?>
:</strong> <a href="http://www.redsandmarketing.com/blog/wp-spamshield-wordpress-plugin-released/#comments" target="_blank" rel="external" ><?php 
            _e('Leave a Comment');
            ?>
</a><br />
            <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" style="margin-top:10px;">
            <input type="hidden" name="cmd" value="_s-xclick">
            <input type="hidden" name="hosted_button_id" value="DFMTNHJEPFFUL">
            <input type="image" src="<?php 
            echo WPSS_PLUGIN_IMG_URL;
            ?>
/btn-donate-sm.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
            <img alt="" border="0" src="<?php 
            echo WPSS_PLUGIN_IMG_URL;
            ?>
/spacer.gif" width="1" height="1" />
            </form>
			</p>
			<?php 
            echo '<p><strong><a href="' . WPSS_DONATE_URL . '" title="' . __('WP-SpamShield is provided for free.', WPSS_PLUGIN_NAME) . ' ' . __('If you like the plugin, consider a donation to help further its development.', WPSS_PLUGIN_NAME) . '" target="_blank" rel="external" >' . __('Donate to WP-SpamShield', WPSS_PLUGIN_NAME) . '</a></strong></p>';
            ?>
			</div>
			<div style='width:797px;border-style:solid;border-width:1px;border-color:#333333;background-color:#FEFEFE;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;clear:left;'>
			<p><a name="wpss_general_options"><h3><?php 
            _e('General Settings', WPSS_PLUGIN_NAME);
            ?>
</h3></a></p>
			<form name="wpss_general_options" method="post">
			<input type="hidden" name="submitted_wpss_general_options" value="1" />
            <?php 
            wp_nonce_field('wpss_update_general_options_token', 'ugo_tkn');
            /* TO DO: Roll up to improve efficiency of code */
            ?>

			<fieldset class="options">
				<ul style="list-style-type:none;padding-left:30px;">

					<li>
					<label for="comment_logging">
						<input type="checkbox" id="comment_logging" name="comment_logging" <?php 
            echo $spamshield_options['comment_logging'] == TRUE ? "checked=\"checked\"" : "";
            ?>
 value="1" />
						<strong><?php 
            echo __('Blocked Comment Logging Mode', WPSS_PLUGIN_NAME);
            if (rs_wpss_is_lang_en_us()) {
                echo ' &mdash; ' . __('See what spam has been blocked!', WPSS_PLUGIN_NAME);
                /* TO DO: TRANSLATE */
            }
            ?>
</strong><br /><?php 
            _e('Temporary diagnostic mode that logs blocked comment submissions for 7 days, then turns off automatically.', WPSS_PLUGIN_NAME);
            ?>
<br /><?php 
            _e('Log is cleared each time this feature is turned on.', WPSS_PLUGIN_NAME);
            ?>
					</label>
					<?php 
            if (!empty($spamshield_options['comment_logging'])) {
                /* If comment logging is on, check file permissions and attempt to fix. Reset .htaccess file for data dir, to allow IP of current admin to view log file. Let user know if not set correctly. */
                $wpss_hta_reset = rs_wpss_log_reset(NULL, TRUE, TRUE);
                if (empty($wpss_hta_reset)) {
                    echo '<br />' . WPSS_EOL . '<span style="color:red;"><strong>' . sprintf(__('The log file may not be writeable. You may need to manually correct the file permissions.<br />Set the permission for the "%1$s" directory to "%2$s" and all files within it to "%3$s".</strong><br />If that doesn\'t work, then please read the <a href="%4$s" %5$s>FAQ</a> for this topic.', WPSS_PLUGIN_NAME), WPSS_PLUGIN_DATA_PATH, '0755', '0644', WPSS_HOME_URL . 'faqs/#faqs_5', 'target="_blank"') . '</span><br />' . WPSS_EOL;
                }
            } else {
                rs_wpss_log_reset(NULL, FALSE, FALSE, TRUE);
                /* Create log file if it doesn't exist */
            }
            $wpss_log_key = rs_wpss_get_log_key();
            $wpss_log_filnm = strpos(WPSS_SERVER_NAME_REV, WPSS_MDBUG_SERVER_NAME_REV) === 0 ? 'temp-comments-log.txt' : 'temp-comments-log-' . $wpss_log_key . '.txt';
            ?>
					<br /><strong><a href="<?php 
            echo WPSS_PLUGIN_DATA_URL . '/' . $wpss_log_filnm;
            ?>
" target="_blank"><?php 
            _e('Download Comment Log File', WPSS_PLUGIN_NAME);
            ?>
</a> - <?php 
            _e('Right-click, and select "Save Link As"', WPSS_PLUGIN_NAME);
            ?>
</strong><br />&nbsp;
					</li>
					<li>
					<label for="comment_logging_all">
						<input type="checkbox" id="comment_logging_all" name="comment_logging_all" <?php 
            echo $spamshield_options['comment_logging_all'] == TRUE ? "checked=\"checked\"" : "";
            ?>
 value="1" />
						<strong><?php 
            _e('Log All Comments', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('Requires that Blocked Comment Logging Mode be engaged. Instead of only logging blocked comments, this will allow the log to capture all comments while logging mode is turned on. This provides more technical data for comment submissions than WordPress provides, and helps us improve the plugin.<br />If you plan on submitting spam samples to us for analysis, it\'s helpful for you to turn this on, otherwise it\'s not necessary.', WPSS_PLUGIN_NAME);
            ?>
</label>
					<br /><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
configuration/#wpss_configuration_log_all_comments" target="_blank" rel="external" ><?php 
            _e('For more about this, see the documentation.', WPSS_PLUGIN_NAME);
            ?>
</a><br />&nbsp;
					</li>
					<li>
					<label for="enhanced_comment_blacklist">
						<input type="checkbox" id="enhanced_comment_blacklist" name="enhanced_comment_blacklist" <?php 
            echo $spamshield_options['enhanced_comment_blacklist'] == TRUE ? "checked=\"checked\"" : "";
            ?>
 value="1" />
						<strong><?php 
            _e('Enhanced Comment Blacklist', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('Enhances WordPress\'s Comment Blacklist - instead of just sending comments to moderation, they will be completely blocked. Also adds a link in the comment notification emails that will let you blacklist a commenter\'s IP with one click.<br />(Useful if you receive repetitive human spam or harassing comments from a particular commenter.)', WPSS_PLUGIN_NAME);
            ?>
</label>
					<br /><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
configuration/#wpss_configuration_enhanced_comment_blacklist" target="_blank" rel="external" ><?php 
            _e('For more about this, see the documentation.', WPSS_PLUGIN_NAME);
            ?>
</a><br />&nbsp;
					</li>
					<label for="wordpress_comment_blacklist">
						<strong><?php 
            _e('Your current WordPress Comment Blacklist', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be completely blocked, not just marked as spam. One word or IP per line. It is not case-sensitive and will match included words, so "press" on your blacklist will block "WordPress" in a comment.', WPSS_PLUGIN_NAME);
            ?>
<br />
						<textarea id="wordpress_comment_blacklist" name="wordpress_comment_blacklist" cols="80" rows="8" /><?php 
            echo $wordpress_comment_blacklist;
            ?>
</textarea><br />
					</label>
					<?php 
            _e('You can update this list here.', WPSS_PLUGIN_NAME);
            ?>
 <a href="<?php 
            echo WPSS_ADMIN_URL;
            ?>
/options-discussion.php"><?php 
            _e('You can also update it on the WordPress Discussion Settings page.', WPSS_PLUGIN_NAME);
            ?>
</a><br />&nbsp;
					<li>
					<label for="enable_whitelist">
						<input type="checkbox" id="enable_whitelist" name="enable_whitelist" <?php 
            echo $spamshield_options['enable_whitelist'] == TRUE ? "checked=\"checked\"" : "";
            ?>
 value="1" />
						<strong><?php 
            _e('Enable WP-SpamShield Whitelist', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('Enables WP-SpamShield\'s Whitelist - for comments and contact form submissions. When a comment or contact form is submitted from an e-mail address on the whitelist, it will bypass spam filters and be allowed through.<br />(Useful if you have specific users that you want to let bypass the filters.)', WPSS_PLUGIN_NAME);
            ?>
</label>
					<br /><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
configuration/#wpss_configuration_enable_whitelist" target="_blank" rel="external" ><?php 
            _e('For more about this, see the documentation.', WPSS_PLUGIN_NAME);
            ?>
</a><br />&nbsp;
					</li>
					<label for="wpss_whitelist">
						<strong><?php 
            _e('Your current WP-SpamShield Whitelist', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('One email address per line. Each entry must be a valid and complete email address, like <em>user@yourwebsite.com</em>. It is not case-sensitive and will only make exact matches, not partial matches.', WPSS_PLUGIN_NAME);
            ?>
<br />
						<textarea id="wpss_whitelist" name="wpss_whitelist" cols="80" rows="8" /><?php 
            echo $wpss_whitelist;
            ?>
</textarea><br />&nbsp;
					</label>
					<li>
					<label for="comment_min_length">
						<?php 
            $comment_min_length = trim(stripslashes($spamshield_options['comment_min_length']));
            ?>
						<input type="number" size="4" id="comment_min_length" name="comment_min_length" value="<?php 
            if (!empty($comment_min_length) && $comment_min_length >= 1) {
                echo $comment_min_length;
            } elseif (empty($form_message_width)) {
                echo '15';
            } else {
                echo '1';
            }
            ?>
" min="1" max="30" step="1" />
						<strong><?php 
            echo sprintf(__('Minimum comment length (# of characters). (Minimum %1$s, Default %2$s)', WPSS_PLUGIN_NAME), '1', '15');
            ?>
</strong><br />&nbsp;
					</label>
					</li>
<?php 
            $boolean_options_go = array(array('block_all_trackbacks', __('Disable trackbacks.', WPSS_PLUGIN_NAME), __('Use if trackback spam is excessive. (Not recommended)', WPSS_PLUGIN_NAME)), array('block_all_pingbacks', __('Disable pingbacks.', WPSS_PLUGIN_NAME), __('Use if pingback spam is excessive. Disadvantage is reduction of communication between blogs. (Not recommended)', WPSS_PLUGIN_NAME)), array('allow_proxy_users', __('Allow users behind proxy servers to comment?', WPSS_PLUGIN_NAME), __('Many human spammers hide behind proxies, so you can uncheck this option for extra protection. (For highest user compatibility, leave it checked.)', WPSS_PLUGIN_NAME)), array('hide_extra_data', __('Hide extra technical data in comment notifications.', WPSS_PLUGIN_NAME), __('This data is helpful if you need to submit a spam sample. If you dislike seeing the extra info, you can use this option.', WPSS_PLUGIN_NAME)), array('registration_shield_disable', __('Disable Registration Spam Shield.', WPSS_PLUGIN_NAME), __('This option will disable the anti-spam shield for the WordPress registration form only. While not recommended, this option is available if you need it. Anti-spam will still remain active for comments, pingbacks, trackbacks, and contact forms.', WPSS_PLUGIN_NAME)), array('disable_cf7_shield', __('Disable anti-spam for Contact Form 7.', WPSS_PLUGIN_NAME), __('This option will disable anti-spam protection for Contact Form 7 forms.', WPSS_PLUGIN_NAME)), array('disable_gf_shield', __('Disable anti-spam for Gravity Forms.', WPSS_PLUGIN_NAME), __('This option will disable anti-spam protection for Gravity Forms.', WPSS_PLUGIN_NAME)), array('disable_misc_form_shield', __('Disable anti-spam for miscellaneous forms.', WPSS_PLUGIN_NAME), __('This option will disable anti-spam protection for custom and miscellaneous forms on your site. (All forms that are not from WP-SpamShield, Contact Form 7, or Gravity Forms.)', WPSS_PLUGIN_NAME)), array('disable_email_encode', __('Disable email harvester protection.', WPSS_PLUGIN_NAME), __('This option will disable the automatic encoding of email addresses and mailto links in your website content.', WPSS_PLUGIN_NAME)), array('allow_comment_author_keywords', __('Allow Keywords in Comment Author Names.', WPSS_PLUGIN_NAME), sprintf(__('This will allow some keywords to be used in comment author names. By default, WP-SpamShield blocks many common spam keywords from being used in the comment "%1$s" field. This option is useful for sites with users that use pseudonyms, or for sites that simply want to allow business names and keywords to be used in the comment "%2$s" field. This option is not recommended, as it can potentially allow more human spam, but it is available if you choose. Your site will still be protected against all automated comment spam.', WPSS_PLUGIN_NAME), __('Name'), __('Name'))), array('promote_plugin_link', __('Help promote WP-SpamShield?', WPSS_PLUGIN_NAME), __('This places a small link under the comments and contact form, letting others know what\'s blocking spam on your blog.', WPSS_PLUGIN_NAME)));
            foreach ($boolean_options_go as $i => $v) {
                $checked = $spamshield_options[$v[0]] == TRUE ? 'checked="checked" ' : '';
                echo "\t\t\t\t\t" . '<li>' . WPSS_EOL . "\t\t\t\t\t" . '<label for="' . $v[0] . '">' . WPSS_EOL . "\t\t\t\t\t\t" . '<input type="checkbox" id="' . $v[0] . '" name="' . $v[0] . '" ' . $checked . 'value="1" />' . WPSS_EOL . "\t\t\t\t\t\t" . '<strong>' . $v[1] . '</strong><br />' . $v[2] . '<br />&nbsp;' . WPSS_EOL . "\t\t\t\t\t" . '</label>' . WPSS_EOL . "\t\t\t\t\t" . '</li>' . WPSS_EOL;
            }
            ?>
				</ul>
			</fieldset>
			<p class="submit">
			<input type="submit" name="submit_wpss_general_options" value="<?php 
            _e('Save Changes');
            ?>
" class="button-primary" style="float:left;" />
			</p>
			</form>
			<p>&nbsp;</p>
			<p><div style="float:right;font-size:12px;">[ <a href="#wpss_top"><?php 
            _e('BACK TO TOP', WPSS_PLUGIN_NAME);
            ?>
</a> ]</div></p>
			<p>&nbsp;</p>
			</div>
			<div style='width:797px;border-style:solid;border-width:1px;border-color:#003366;background-color:#DDEEFF;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;clear:left;'>
			<p><a name="wpss_contact_form_options"><h3><?php 
            _e('Contact Form Settings', WPSS_PLUGIN_NAME);
            ?>
</h3></a></p>
			<form name="wpss_contact_options" method="post">
			<input type="hidden" name="submitted_wpss_contact_options" value="1" />
            <?php 
            wp_nonce_field('wpss_update_contact_options_token', 'uco_tkn');
            ?>

			<fieldset class="options">
				<ul style="list-style-type:none;padding-left:30px;">
<?php 
            $boolean_options_co = array(array('form_include_website', __('Include "Website" field.', WPSS_PLUGIN_NAME)), array('form_require_website', __('Require "Website" field.', WPSS_PLUGIN_NAME)), array('form_include_phone', __('Include "Phone" field.', WPSS_PLUGIN_NAME)), array('form_require_phone', __('Require "Phone" field.', WPSS_PLUGIN_NAME)), array('form_include_company', __('Include "Company" field.', WPSS_PLUGIN_NAME)), array('form_require_company', __('Require "Company" field.', WPSS_PLUGIN_NAME)), array('form_include_drop_down_menu', __('Include drop-down menu select field.', WPSS_PLUGIN_NAME)), array('form_require_drop_down_menu', __('Require drop-down menu select field.', WPSS_PLUGIN_NAME)));
            foreach ($boolean_options_co as $i => $v) {
                $checked = TRUE == $spamshield_options[$v[0]] ? 'checked="checked" ' : '';
                echo "\t\t\t\t\t" . '<li>' . WPSS_EOL . "\t\t\t\t\t" . '<label for="' . $v[0] . '">' . WPSS_EOL . "\t\t\t\t\t\t" . '<input type="checkbox" id="' . $v[0] . '" name="' . $v[0] . '" ' . $checked . 'value="1" />' . WPSS_EOL . "\t\t\t\t\t\t" . '<strong>' . $v[1] . '</strong><br />&nbsp;' . WPSS_EOL . "\t\t\t\t\t" . '</label>' . WPSS_EOL . "\t\t\t\t\t" . '</li>' . WPSS_EOL;
            }
            $text_options_co = array(array('form_drop_down_menu_title', 'Title of drop-down select menu. (Menu won\'t be shown if empty.)'), array('form_drop_down_menu_item_1', 'Drop-down select menu item 1. (Menu won\'t be shown if empty.)'), array('form_drop_down_menu_item_1', 'Drop-down select menu item 1. (Leave blank if not using.)'));
            $i = 0;
            while ($i <= 10) {
                $k = $i == 0 ? 0 : 1;
                $k = $i >= 3 ? 2 : $k;
                $v = $text_options_co[$k];
                $v[0] = str_replace('1', $i, $v[0]);
                $v[1] = __(str_replace('1', $i, $v[1]), WPSS_PLUGIN_NAME);
                $value = trim(stripslashes($spamshield_options[$v[0]]));
                if (empty($value)) {
                    $value = '';
                }
                echo "\t\t\t\t\t" . '<li>' . WPSS_EOL . "\t\t\t\t\t" . '<label for="' . $v[0] . '">' . WPSS_EOL . "\t\t\t\t\t\t" . '<input type="text" size="40" id="' . $v[0] . '" name="' . $v[0] . '" value="' . $value . '" />' . WPSS_EOL . "\t\t\t\t\t\t" . '<strong>' . $v[1] . '</strong><br />&nbsp;' . WPSS_EOL . "\t\t\t\t\t" . '</label>' . WPSS_EOL . "\t\t\t\t\t" . '</li>' . WPSS_EOL;
                ++$i;
            }
            ?>
					<li>
					<label for="form_message_width">
						<?php 
            $form_message_width = trim(stripslashes($spamshield_options['form_message_width']));
            ?>
						<input type="number" size="4" id="form_message_width" name="form_message_width" value="<?php 
            if (!empty($form_message_width) && $form_message_width >= 40) {
                echo $form_message_width;
            } else {
                echo '40';
            }
            ?>
" min="40" max="400" step="1" />
						<strong><?php 
            echo sprintf(__('"Message" field width. (Minimum %s)', WPSS_PLUGIN_NAME), '40');
            ?>
</strong><br />&nbsp;
					</label>
					</li>
					<li>
					<label for="form_message_height">
						<?php 
            $form_message_height = trim(stripslashes($spamshield_options['form_message_height']));
            ?>
						<input type="number" size="4" id="form_message_height" name="form_message_height" value="<?php 
            if (!empty($form_message_height) && $form_message_height >= 5) {
                echo $form_message_height;
            } elseif (empty($form_message_height)) {
                echo '10';
            } else {
                echo '5';
            }
            ?>
" min="5" max="100" step="1" />
						<strong><?php 
            echo sprintf(__('"Message" field height. (Minimum %1$s, Default %2$s)', WPSS_PLUGIN_NAME), '5', '10');
            ?>
</strong><br />&nbsp;
					</label>
					</li>
					<li>
					<label for="form_message_min_length">
						<?php 
            $form_message_min_length = trim(stripslashes($spamshield_options['form_message_min_length']));
            ?>
						<input type="number" size="4" id="form_message_min_length" name="form_message_min_length" value="<?php 
            if (!empty($form_message_min_length) && $form_message_min_length >= 15) {
                echo $form_message_min_length;
            } elseif (empty($form_message_width)) {
                echo '25';
            } else {
                echo '15';
            }
            ?>
" min="15" max="150" step="1" />
						<strong><?php 
            echo sprintf(__('Minimum message length (# of characters). (Minimum %1$s, Default %2$s)', WPSS_PLUGIN_NAME), '15', '25');
            ?>
</strong><br />&nbsp;
					</label>
					</li>
					<li>
					<label for="form_message_recipient">
						<?php 
            $form_message_recipient = trim(stripslashes($spamshield_options['form_message_recipient']));
            ?>
						<input type="email" size="40" id="form_message_recipient" name="form_message_recipient" value="<?php 
            if (empty($form_message_recipient)) {
                echo $wpss_admin_email;
            } else {
                echo $form_message_recipient;
            }
            ?>
" />
						<strong><?php 
            _e('Optional: Enter alternate form recipient. Default is blog admin email.', WPSS_PLUGIN_NAME);
            ?>
</strong><br />&nbsp;
					</label>
					</li>
					<li>
					<label for="form_response_thank_you_message">
						<?php 
            $form_response_thank_you_message = trim(stripslashes($spamshield_options['form_response_thank_you_message']));
            ?>
						<?php 
            _e('<strong>Enter message to be displayed upon successful contact form submission.</strong><br />Can be plain text, HTML, or an ad, etc.', WPSS_PLUGIN_NAME);
            ?>
<br />
						<textarea id="form_response_thank_you_message" name="form_response_thank_you_message" cols="80" rows="3" /><?php 
            if (empty($form_response_thank_you_message)) {
                _e('Your message was sent successfully. Thank you.', WPSS_PLUGIN_NAME);
            } else {
                echo $form_response_thank_you_message;
            }
            ?>
</textarea><br />&nbsp;
					</label>
					</li>
					<li>
					<label for="form_include_user_meta">
						<input type="checkbox" id="form_include_user_meta" name="form_include_user_meta" <?php 
            echo $spamshield_options['form_include_user_meta'] == TRUE ? "checked=\"checked\"" : "";
            ?>
 value="1" />
						<strong><?php 
            _e('Include user technical data in email.', WPSS_PLUGIN_NAME);
            ?>
</strong><br /><?php 
            _e('This adds some extra technical data to the end of the contact form email about the person submitting the form.<br />It includes: <strong>Browser / User Agent</strong>, <strong>Referrer</strong>, <strong>IP Address</strong>, <strong>Server</strong>, etc.<br />This is helpful for dealing with abusive or threatening comments. You can use the IP address provided to identify or block trolls from your site with whatever method you prefer.', WPSS_PLUGIN_NAME);
            ?>
<br />&nbsp;
					</label>
					</li>

				</ul>
			</fieldset>
			<p class="submit">
			<input type="submit" name="submit_wpss_contact_options" value="<?php 
            _e('Save Changes');
            ?>
" class="button-primary" style="float:left;" />
			</p>
			</form>
			<p>&nbsp;</p>
			<p><div style="float:right;font-size:12px;">[ <a href="#wpss_top"><?php 
            _e('BACK TO TOP', WPSS_PLUGIN_NAME);
            ?>
</a> ]</div></p>
			<p>&nbsp;</p>
			</div>
			<div style='width:797px;border-style:solid;border-width:1px;border-color:#333333;background-color:#FEFEFE;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;clear:left;'>
  			<p><a name="wpss_let_others_know"><h3><?php 
            _e('Let Others Know About WP-SpamShield', WPSS_PLUGIN_NAME);
            ?>
</h3></a></p>
			<p><?php 
            _e('<strong>How does it feel to blog without being bombarded by automated comment spam?</strong> If you\'re happy with WP-SpamShield, there\'s a few things you can do to let others know:', WPSS_PLUGIN_NAME);
            ?>
</p>
			<ul style="list-style-type:disc;padding-left:30px;">
				<li><a href="http://www.redsandmarketing.com/blog/wp-spamshield-wordpress-plugin-released/#comments" target="_blank" rel="external" ><?php 
            _e('Leave a Comment');
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_WP_RATING_URL;
            ?>
" target="_blank" rel="external" ><?php 
            _e('Give WP-SpamShield a good rating on WordPress.org.', WPSS_PLUGIN_NAME);
            ?>
</a></li>
				<li><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
end-blog-spam/" target="_blank" rel="external" ><?php 
            _e('Place a graphic link on your site.', WPSS_PLUGIN_NAME);
            ?>
</a> <?php 
            _e('Let others know how they can help end blog spam.', WPSS_PLUGIN_NAME);
            ?>
 ( &lt;/BLOGSPAM&gt; )</li>
			</ul>
			<p><a href="<?php 
            echo WPSS_HOME_URL;
            ?>
" style="border-style:none;text-decoration:none;" target="_blank" rel="external" ><img src="<?php 
            echo WPSS_PLUGIN_IMG_URL;
            ?>
/end-blog-spam-button-01-black.png" alt="End Blog Spam! WP-SpamShield Comment Spam Protection for WordPress" width="140" height="66" style="border-style:none;text-decoration:none;margin-top:15px;margin-left:15px;" /></a></p>
			<p><div style="float:right;font-size:12px;">[ <a href="#wpss_top"><?php 
            _e('BACK TO TOP', WPSS_PLUGIN_NAME);
            ?>
</a> ]</div></p>
			<p>&nbsp;</p>
			</div>
			<div style='width:797px;border-style:solid;border-width:1px;border-color:#003366;background-color:#DDEEFF;padding:0px 15px 0px 15px;margin-top:<?php 
            echo $wpss_vert_margins;
            ?>
px;margin-right:<?php 
            echo $wpss_horz_margins;
            ?>
px;float:left;clear:left;'>
			<p><a name="wpss_download_plugin_documentation"><h3><?php 
            echo rs_wpss_doc_txt();
            ?>
</h3></a></p>
			<p><?php 
            echo __('Plugin Homepage', WPSS_PLUGIN_NAME) . ' / ' . rs_wpss_doc_txt();
            ?>
: <a href="<?php 
            echo WPSS_HOME_URL;
            ?>
" target="_blank" rel="external" >WP-SpamShield</a><br />
			<?php 
            _e('Leave a Comment');
            ?>
: <a href="http://www.redsandmarketing.com/blog/wp-spamshield-wordpress-plugin-released/" target="_blank" rel="external" ><?php 
            _e('WP-SpamShield Release Announcement Blog Post', WPSS_PLUGIN_NAME);
            ?>
</a><br />
			<?php 
            _e('WordPress.org Page', WPSS_PLUGIN_NAME);
            ?>
: <a href="<?php 
            echo WPSS_WP_URL;
            ?>
" target="_blank" rel="external" >WP-SpamShield</a><br />
			<?php 
            _e('Tech Support / Questions', WPSS_PLUGIN_NAME);
            ?>
: <a href="<?php 
            echo WPSS_SUPPORT_URL;
            ?>
" target="_blank" rel="external" ><?php 
            _e('WP-SpamShield Support Page', WPSS_PLUGIN_NAME);
            ?>
</a><br />
			<?php 
            _e('End Blog Spam', WPSS_PLUGIN_NAME);
            ?>
: <a href="<?php 
            echo WPSS_HOME_URL;
            ?>
end-blog-spam/" target="_blank" rel="external" ><?php 
            _e('Let Others Know About WP-SpamShield', WPSS_PLUGIN_NAME);
            ?>
!</a><br />
			Twitter: <a href="http://twitter.com/WPSpamShield" target="_blank" rel="external" >@WPSpamShield</a><br />
			<?php 
            if (rs_wpss_is_lang_en_us()) {
                echo 'Need WordPress Consulting? <a href="http://www.redsandmarketing.com/web-design/wordpress-consulting/" target="_blank" rel="external" >We can help.</a><br />';
            }
            ?>
            <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" style="margin-top:10px;">
            <input type="hidden" name="cmd" value="_s-xclick">
            <input type="hidden" name="hosted_button_id" value="DFMTNHJEPFFUL">
            <input type="image" src="<?php 
            echo WPSS_PLUGIN_IMG_URL;
            ?>
/btn-donate-sm.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
            <img alt="" border="0" src="<?php 
            echo WPSS_PLUGIN_IMG_URL;
            ?>
/spacer.gif" width="1" height="1" />
            </form>
			</p>
			<?php 
            echo '<p><strong><a href="' . WPSS_DONATE_URL . '" target="_blank" rel="external" >' . __('Donate to WP-SpamShield', WPSS_PLUGIN_NAME) . '</a></strong><br />' . __('WP-SpamShield is provided for free.', WPSS_PLUGIN_NAME) . ' ' . __('If you like the plugin, consider a donation to help further its development.', WPSS_PLUGIN_NAME) . '</p>';
            ?>

			<p><div style="float:right;font-size:12px;">[ <a href="#wpss_top"><?php 
            _e('BACK TO TOP', WPSS_PLUGIN_NAME);
            ?>
</a> ]</div></p>
			<p>&nbsp;</p>
			</div>

			<?php 
            /* Recommended Partners - BEGIN - Added in 1.6.9 */
            if (rs_wpss_is_lang_en_us()) {
                ?>

			<div style='width:797px;border-style:solid;border-width:1px;border-color:#333333;background-color:#FEFEFE;padding:0px 15px 0px 15px;margin-top:<?php 
                echo $wpss_vert_margins;
                ?>
px;margin-right:<?php 
                echo $wpss_horz_margins;
                ?>
px;float:left;clear:left;'>
			<p><h3>Recommended Partners</h3></p>
			<p>Each of these products or services are ones that we highly recommend, based on our experience and the experience of our clients. We do receive a commission if you purchase one of these, but these are all products and services we were already recommending because we believe in them. By purchasing from these providers, you get quality and you help support the further development of WP-SpamShield.</p></div>

			<?php 
                $wpss_rpd = array(array('clear:left;', 'RSM_Genesis', 'Genesis WordPress Framework', 'Other themes and frameworks have nothing on Genesis. Optimized for site speed and SEO.', 'Simply put, the Genesis framework is one of the best ways to design and build a WordPress site. Built-in SEO and optimized for speed. Create just about any kind of design with child themes.'), array('', 'RSM_AIOSEOP', 'All in One SEO Pack Pro', 'The best way to manage the code-related SEO for your WordPress site.', 'Save time and effort optimizing the code of your WordPress site with All in One SEO Pack. One of the top rated, and most downloaded plugins on WordPress.org, this time-saving plugin is incredibly valuable. The pro version provides powerful features not available in the free version.'));
                foreach ($wpss_rpd as $i => $v) {
                    echo '<div style="width:375px;height:280px;border-style:solid;border-width:1px;border-color:#333333;background-color:#FEFEFE;padding:0px 15px 0px 15px;margin-top:' . $wpss_vert_margins . 'px;margin-right:' . $wpss_horz_margins . 'px;float:left;' . $v[0] . '">' . WPSS_EOL . '<p><strong><a href="http://bit.ly/' . $v[1] . '" target="_blank" rel="external" >' . $v[2] . '</a></strong></p>' . WPSS_EOL . '<p><strong>' . $v[3] . '</strong></p>' . WPSS_EOL . '<p>' . $v[4] . '</p>' . WPSS_EOL . '<p><a href="http://bit.ly/' . $v[1] . '" target="_blank" rel="external" >Click here to find out more. &raquo;</a></p>' . WPSS_EOL . '</div>' . WPSS_EOL;
                }
            }
            /* Recommended Partners - END - Added in 1.6.9 */
            ?>
			<p style="clear:both;">&nbsp;</p>
			<p style="clear:both;"><em><?php 
            $this->settings_ver_ftr();
            ?>
</em></p>
			<p><div style="float:right;clear:both;font-size:12px;">[ <a href="#wpss_top"><?php 
            _e('BACK TO TOP', WPSS_PLUGIN_NAME);
            ?>
</a> ]</div></p>
			<p>&nbsp;</p>
			</div>
			<?php 
        }
 public static function disable_xmlrpc_multicall($methods)
 {
     /**
      * SECURITY - Disable the XML-RPC 'system.multicall' method
      * Protect against XML-RPC brute force amplification attacks without breaking functionality
      * Added 1.9.7.8
      */
     $ip = rs_wpss_get_ip_addr();
     if (!rs_wpss_is_valid_ip($ip) || !preg_match("~^192\\.0\\.(6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])\\.~", $ip)) {
         /* 192.0.64.0-192.0.127.255 (CIDR:192.0.64.0/18) */
         unset($methods['system.multicall']);
     }
     return $methods;
 }