function spam_filter()
    {
        if ($_POST['action'] == 'save') {
            $options = array();
            if ($_POST['options']['patternsToDieOn']) {
                $options['patternsToDieOn'] = explode("\n", stripslashes(trim($_POST['options']['patternsToDieOn'])));
            } else {
                $options['patternsToDieOn'] = $this->patternsToDieOn;
            }
            if ($_POST['options']['wordsToDieOn']) {
                $options['wordsToDieOn'] = preg_split("/[\\s,]+/", stripslashes(trim($_POST['options']['wordsToDieOn'])), -1, PREG_SPLIT_NO_EMPTY);
            } else {
                $options['wordsToDieOn'] = $this->wordsToDieOn;
            }
            if ($_POST['options']['limit']) {
                $options['limit'] = (int) $_POST['options']['limit'];
            } else {
                $options['limit'] = 5;
            }
            if ($_POST['options']['similar']) {
                $options['similar'] = true;
            } else {
                $options['similar'] = false;
            }
            update_option('tantan_spam_filter', $options);
        } elseif ($_POST['action'] == 'savecaptcha') {
            if (is_array($_POST['recaptcha'])) {
                foreach ($_POST['recaptcha'] as $k => $v) {
                    $_POST['recaptcha'][$k] = trim($v);
                }
                update_option('tantan_spam_filter_recaptcha', $_POST['recaptcha']);
            }
        }
        $this->options = get_option('tantan_spam_filter');
        $this->captcha = get_option('tantan_spam_filter_recaptcha');
        if ($_POST['processSpam']) {
            $numDeleted = $this->processSpam();
            echo '<div id="message" class="updated fade"><p>Deleted ' . $numDeleted . ' spams from your spams queue.</p></div>';
        }
        ?>
        <style type="text/css">
        .spam, .spam:visited { color:#aaa; border:0; padding:2px;}
        .spam:hover { color:black;}
        .selected, .selected:visited, .selected:link { color:white; background:#aaa;text-decoration:none;}
        textarea { width:100%; font-size:0.9em;border:1px solid #aaa;margin:0 auto 5px auto; }
        fieldset { clear:both; border:1px solid #ccc; padding:15px;}
        fieldset legend { font-family: Georgia,"Times New Roman",Times,serif; font-size: 22px; }
        </style>
        <script type="text/javascript">
        function addWord(obj, word) {
            var txt = document.getElementById('wordsToDieOn');
            if (obj.className.indexOf('selected') <= -1) {
                obj.className = 'spam selected';
                txt.value += (' ' + word)
            } else {
                obj.className = 'spam';
                txt.value += ' ';
                txt.value = txt.value.replace(' '+word+' ', ' ');
                txt.value = txt.value.replace('  ', ' ');
            }
            return false;
        }
        </script>
       <div class="wrap">
       <h2>TanTanNoodles Simple Spam Filter</h2>
       
       <table width="100%" border="0"><tr valign="top"><td style="width:75%;padding:0 20px 0 0">
       <p>So far, this spam filter has blocked and rejected <strong><?php 
        echo $this->getSpamCount();
        ?>
</strong> spam comments.</p>
       <p>New comments that match any of the filter rules specified below will be immediately rejected with an error message.</p>
		<p>Plugin Info Page: <a href="http://tantannoodles.com/toolkit/spam-filter/">tantannoodles.com/toolkit/spam-filter/</a>
       </td><td style="font-size:0.9em;width:25%;">
If you find this plugin helpful, please consider donating a few dollars to support this plugin. Thanks!
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="*****@*****.**" />
<input type="hidden" name="item_name" value="TanTanNoodles Plugin Donation" />
<input type="hidden" name="item_number" value="Spam Filter" />
<input type="hidden" name="page_style" value="Primary" />

<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="return" value="http://tantannoodles.com/donation-thankyou/" />
<input type="hidden" name="cancel_return" value="http://tantannoodles.com/" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="tax" value="0" />
<input type="hidden" name="cn" value="Message / Note" />
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="bn" value="PP-DonationsBF" />
<div style="float:left;width:150px;padding-top:10px">
Amount: $<input type="text" name="amount" value="" style="width:50px;" /> <br />
</div>
<div style="float:right;width:100px">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</div>
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" style="clear:both;" />
</form>



        </td></tr></table>
        <form method="post">
            <input type="hidden" name="action" value="savecaptcha" />
	   <fieldset>
	       <legend>Captcha Verification</legend>
			Utilize a captcha if a comment gets blocked by one of the filter rules below, or if it gets flagged as spam by the Akismet plugin (version 2.1.3 or later).
			This gives people a "second chance" to prove that they are indeed human and not a spam generating bot. Once they successfully complete the captcha, their comment will be posted normally. 
			Note that comments that don't pass the captcha will be immediately discarded.
			<br /><br />
			<input type="checkbox" value="1" name="recaptcha[enabled]" id="recaptcha-enabled" <?php 
        echo $this->captcha['enabled'] ? 'checked="checked"' : '';
        ?>
 onclick="if (this.checked) document.getElementById('recaptcha-setup').style.display='block';" />
			<label for="recaptcha-enabled">Enable reCAPTCHA module</label>
			<br /><br />
			<div id="recaptcha-setup" style="<?php 
        echo $this->captcha['enabled'] ? '' : 'display:none;';
        ?>
">
			<strong>Setup Instructions</strong><br />
			<blockquote>
			Step 1: <a href="<?php 
        echo recaptcha_get_signup_url(recaptcha_wp_blog_domain(), 'tantan-spam-filter');
        ?>
" target="_blank">Signup for a reCAPTCHA account.</a> 
			This is a free service, and takes less than 2 minutes to signup. 
			<a href="http://recaptcha.net/">Learn more ></a>
			<br />
			Step 2: Copy and paste both of your <em>public and private keys</em> into the fields below.<br />
			Step 3: Click save, and you're done! <br /><br />
			</blockquote>
			reCAPTCHA Keys:<br />
			Public: <input type="text" name="recaptcha[public]" value="<?php 
        echo $this->captcha['public'];
        ?>
" size="45" /><br />
			Private: <input type="text" name="recaptcha[private]" value="<?php 
        echo $this->captcha['private'];
        ?>
" size="45" /><br />
			<br />
			To test and make sure reCAPTCHA is working properly, try to posting a comment with a banned word.
	       <p class="submit">
	       <input type="submit" value="save settings" /><br />
	       </p>
			</div>
		</fieldset>
		</form>
		<br />
        <form method="post">
            <input type="hidden" name="action" value="save" />
	   <fieldset>
	       <legend>Filter Rules</legend>

       Block comments with <input type="text" name="options[limit]" value="<?php 
        echo $this->options['limit'];
        ?>
" size="3" /> or more links to external sites.
       <br /><br />
       
       <input type="checkbox" name="options[similar]" value="1" <?php 
        echo $this->options['similar'] ? "checked='checked'" : '';
        ?>
 id="options-similar" /> <label for="options-similar">Block any comment that is extremely similar to a previously submitted comment.</label>
       <br /><br />
       
	   <strong>Banned Patterns</strong>: <br />
	   <textarea name="options[patternsToDieOn]" id="patternsToDieOn" wrap="off" style="height:6em"><?php 
        echo implode("\n", $this->getSpamPatterns());
        ?>
</textarea>
		<br /><small>One <a href="http://www.php.net/manual/en/function.eregi.php">regex pattern</a> per line. <a href="http://code.google.com/p/tantan-toolkit/wiki/SpamFilterRules">List of useful patterns</a>.</small>
       <br /><br />
	   <strong>Banned Words List</strong>: <br />
	   <textarea name="options[wordsToDieOn]" id="wordsToDieOn"><?php 
        echo implode(' ', $this->getSpamWords());
        ?>
</textarea><br />
       <p class="submit">
       <input type="submit" value="save rules" /><br />
       Process the <a href="edit-comments.php?page=akismet-admin">spam queue</a> with these rules <input type="checkbox" name="processSpam" value="1" />
       </p>
       <?php 
        $words = $this->getPossibleSpamWords();
        ?>
	   <p>This plugin found <strong><?php 
        echo count($words);
        ?>
</strong> possible spam words from your existing spam queue.
	       You can use this list to help you tweak the plugin's banned words list. Just click on a word to add it to the list.</p>
       <?php 
        foreach ($words as $word => $count) {
            echo "<a href='#' class='spam' title='{$count} occurrences' onclick=\"return addWord(this, '{$word}')\">{$word}</a> ";
        }
        // (<a href="#" class="addword">+</a><a href="edit-comments.php?page=tantan/spam-filter.php&action=delete&word='.$word.'" class="delword" title="delete">x</a>)
        ?>
	   </fieldset>
	   </form>
	   </div>
	   <?php 
    }
示例#2
0
function recaptcha_wp_options_subpanel()
{
    $optionarray_def = array('pubkey' => '', 'privkey' => '');
    add_option('plugin_recaptcha', $optionarray_def, 'reCAPTCHA Options');
    /* Check form submission and update options if no error occurred */
    if (isset($_POST['submit'])) {
        $optionarray_update = array('pubkey' => $_POST['recaptcha_opt_pubkey'], 'privkey' => $_POST['recaptcha_opt_privkey']);
        update_option('plugin_recaptcha', $optionarray_update);
    }
    /* Get options */
    $optionarray_def = get_option('plugin_recaptcha');
    ?>

<!-- ############################## BEGIN: ADMIN OPTIONS ################### -->
<div class="wrap">


	<h2>reCAPTCHA Options</h2>
	<p>reCAPTCHA asks commenters to read two words from a book. One of these words proves
	   that they are a human, not a computer. The other word is a word that a computer couldn't read.
	   Because the user is known to be a human, the reading of that word is probably correct. So you don't
	   get comment spam, and the world gets books digitized. Everybody wins! For details, visit
	   the <a href="http://recaptcha.net/">reCAPTCHA website</a>.</p>

	<form name="form1" method="post" style="margin: auto; width: 25em;" action="<?php 
    echo $_SERVER['PHP_SELF'] . '?page=' . plugin_basename(__FILE__);
    ?>
&updated=true">


	<!-- ****************** Operands ****************** -->
	<fieldset class="options">
		<legend>reCAPTCHA Key</legend>
		<p>
			reCAPTCHA requires an API key, consisting of a "public" and a "private" key. You can sign up for a
			
			<a href="<?php 
    echo recaptcha_get_signup_url(recaptcha_wp_blog_domain(), 'wordpress');
    ?>
" target="0">free reCAPTCHA key</a>.
		</p>
		<label style="font-weight:bold" for="recaptcha_opt_pubkey">Public Key:</label>
		<br />
		<input name="recaptcha_opt_pubkey" id="recaptcha_opt_pubkey" size="40" value="<?php 
    echo $optionarray_def['pubkey'];
    ?>
" />
		<label style="font-weight:bold" for="recaptcha_opt_privkey">Private Key:</label>
		<br />
		<input name="recaptcha_opt_privkey" id="recaptcha_opt_privkey" size="40" value="<?php 
    echo $optionarray_def['privkey'];
    ?>
" />

	</fieldset>


	<div class="submit">
		<input type="submit" name="submit" value="<?php 
    _e('Update Options');
    ?>
 &raquo;" />
	</div>

	</form>

	<p style="text-align: center; font-size: .85em;">&copy; Copyright 2007&nbsp;&nbsp;<a href="http://recaptcha.net">reCAPTCHA</a></p>

</div> <!-- [wrap] -->
<!-- ############################## END: ADMIN OPTIONS ##################### -->


<?php 
}
示例#3
0
function recaptcha_wp_options_subpanel()
{
    global $wpmu;
    // Default values for the options array
    $optionarray_def = array('pubkey' => '', 'privkey' => '', 'use_mailhide_posts' => '', 'use_mailhide_comments' => '', 'use_mailhide_rss' => '', 'use_mailhide_rss_comments' => '', 're_bypasslevel' => '3', 'mh_bypasslevel' => '3', 'mailhide_pub' => '', 'mailhide_priv' => '', 're_theme' => 'red', 're_theme_reg' => 'red', 're_lang' => 'en', 're_tabindex' => '5', 're_comments' => '1', 're_registration' => '1', 're_xhtml' => '0', 'mh_replace_link' => '', 'mh_replace_title' => '', 'error_blank' => __('<strong>ERROR</strong>: Please fill in the reCAPTCHA form.', "wp-recaptcha"), 'error_incorrect' => __('<strong>ERROR</strong>: That reCAPTCHA response was incorrect.', "wp-recaptcha"));
    if ($wpmu != 1) {
        add_option('recaptcha', $optionarray_def, __('reCAPTCHA Options', "wp-recaptcha"));
    }
    /* Check form submission and update options if no error occurred */
    if (isset($_POST['submit'])) {
        $optionarray_update = array('pubkey' => trim($_POST['recaptcha_opt_pubkey']), 'privkey' => trim($_POST['recaptcha_opt_privkey']), 'use_mailhide_posts' => $_POST['use_mailhide_posts'], 'use_mailhide_comments' => $_POST['use_mailhide_comments'], 'use_mailhide_rss' => $_POST['use_mailhide_rss'], 'use_mailhide_rss_comments' => $_POST['use_mailhide_rss_comments'], 're_bypass' => $_POST['re_bypass'], 're_bypasslevel' => $_POST['re_bypasslevel'], 'mailhide_pub' => trim($_POST['mailhide_pub']), 'mailhide_priv' => trim($_POST['mailhide_priv']), 'mh_bypass' => $_POST['mh_bypass'], 'mh_bypasslevel' => $_POST['mh_bypasslevel'], 're_theme' => $_POST['re_theme'], 're_theme_reg' => $_POST['re_theme_reg'], 're_lang' => $_POST['re_lang'], 're_tabindex' => $_POST['re_tabindex'], 're_comments' => $_POST['re_comments'], 're_registration' => $_POST['re_registration'], 're_xhtml' => $_POST['re_xhtml'], 'mh_replace_link' => $_POST['mh_replace_link'], 'mh_replace_title' => $_POST['mh_replace_title'], 'error_blank' => $_POST['error_blank'], 'error_incorrect' => $_POST['error_incorrect']);
        // save updated options
        if ($wpmu == 1) {
            update_site_option('recaptcha', $optionarray_update);
        } else {
            update_option('recaptcha', $optionarray_update);
        }
    }
    /* Get options */
    if ($wpmu == 1) {
        $optionarray_def = get_site_option('recaptcha');
    } else {
        $optionarray_def = get_option('recaptcha');
    }
    /* =============================================================================
       reCAPTCHA Admin Page and Functions
       ============================================================================= */
    /*
     * Display an HTML <select> listing the capability options for disabling security 
     * for registered users. 
     * @param string $select_name slug to use in <select> id and name
     * @param string $checked_value selected value for dropdown, slug form.
     * @return NULL
     */
    function recaptcha_dropdown_capabilities($select_name, $checked_value = "")
    {
        // define choices: Display text => permission slug
        $capability_choices = array(__('All registered users', "wp-recaptcha") => 'read', __('Edit posts', "wp-recaptcha") => 'edit_posts', __('Publish Posts', "wp-recaptcha") => 'publish_posts', __('Moderate Comments', "wp-recaptcha") => 'moderate_comments', __('Administer site', "wp-recaptcha") => 'level_10');
        // print the <select> and loop through <options>
        echo '<select name="' . $select_name . '" id="' . $select_name . '">' . "\n";
        foreach ($capability_choices as $text => $capability) {
            if ($capability == $checked_value) {
                $checked = ' selected="selected" ';
            }
            echo '\\t <option value="' . $capability . '"' . $checked . ">{$text}</option> \n";
            $checked = NULL;
        }
        echo "</select> \n";
    }
    // end recaptcha_dropdown_capabilities()
    ?>

<!-- ############################## BEGIN: ADMIN OPTIONS ################### -->
<div class="wrap">
	<h2><?php 
    _e('reCAPTCHA Options', 'wp-recaptcha');
    ?>
</h2>
	<h3><?php 
    _e('About reCAPTCHA', 'wp-recaptcha');
    ?>
</h3>
	<p><?php 
    _e('reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog.', 'wp-recaptcha');
    ?>
</p>
	
	<p><?php 
    _e('reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot while also correcting the automatic scans of old books. So you get less spam, and the world gets accurately digitized books. Everybody wins! For details, visit the <a href="http://recaptcha.net/">reCAPTCHA website</a>.', 'wp-recaptcha');
    ?>
</p>
   <p><?php 
    _e('<strong>NOTE</strong>: If you are using some form of Cache plugin you will probably need to flush/clear your cache for changes to take effect.', 'wp-recaptcha');
    ?>
</p>
   
	<form name="form1" method="post" action="<?php 
    echo $_SERVER['REDIRECT_SCRIPT_URI'] . '?page=' . plugin_basename(__FILE__);
    ?>
&updated=true">
		<div class="submit">
			<input type="submit" name="submit" value="<?php 
    _e('Update Options', 'wp-recaptcha');
    ?>
 &raquo;" />
		</div>
	
	<!-- ****************** Operands ****************** -->
   <table class="form-table">
   <tr valign="top">
		<th scope="row"><?php 
    _e('reCAPTCHA Keys', 'wp-recaptcha');
    ?>
</th>
		<td>
			<?php 
    _e('reCAPTCHA requires an API key, consisting of a "public" and a "private" key.', 'wp-recaptcha');
    ?>
 <?php 
    _e('You can sign up for a', 'wp-recaptcha');
    ?>
 <a href="<?php 
    echo recaptcha_get_signup_url(recaptcha_wp_blog_domain(), 'wordpress');
    ?>
" target="0"><?php 
    _e('free reCAPTCHA key', 'wp-recaptcha');
    ?>
</a>.
			<br />
			<p class="re-keys">
				<!-- reCAPTCHA public key -->
				<label class="which-key" for="recaptcha_opt_pubkey"><?php 
    _e('Public Key:', 'wp-recaptcha');
    ?>
</label>
				<input name="recaptcha_opt_pubkey" id="recaptcha_opt_pubkey" size="40" value="<?php 
    echo $optionarray_def['pubkey'];
    ?>
" />
				<br />
				<!-- reCAPTCHA private key -->
				<label class="which-key" for="recaptcha_opt_privkey"><?php 
    _e('Private Key:', 'wp-recaptcha');
    ?>
</label>
				<input name="recaptcha_opt_privkey" id="recaptcha_opt_privkey" size="40" value="<?php 
    echo $optionarray_def['privkey'];
    ?>
" />
			</p>
	    </td>
    </tr>
  	<tr valign="top">
		<th scope="row"><?php 
    _e('Comment Options', 'wp-recaptcha');
    ?>
</th>
		<td>
			<!-- Show reCAPTCHA on the comment post -->
			<big><input type="checkbox" name="re_comments" id="re_comments" value="1" <?php 
    if ($optionarray_def['re_comments'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /> <label for="re_comments"><?php 
    _e('Enable reCAPTCHA for comments.', 'wp-recaptcha');
    ?>
</label></big>
			<br />
			<!-- Don't show reCAPTCHA to admins -->
			<div class="theme-select">
			<input type="checkbox" id="re_bypass" name="re_bypass" <?php 
    if ($optionarray_def['re_bypass'] == true) {
        echo 'checked="checked"';
    }
    ?>
/>
			<label name="re_bypass" for="re_bypass"><?php 
    _e('Hide reCAPTCHA for <strong>registered</strong> users who can:', 'wp-recaptcha');
    ?>
</label>
			<?php 
    recaptcha_dropdown_capabilities('re_bypasslevel', $optionarray_def['re_bypasslevel']);
    // <select> of capabilities
    ?>
			</div>

			<!-- The theme selection -->
			<div class="theme-select">
			<label for="re_theme"><?php 
    _e('Theme:', 'wp-recaptcha');
    ?>
</label>
			<select name="re_theme" id="re_theme">
			<option value="red" <?php 
    if ($optionarray_def['re_theme'] == 'red') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Red', 'wp-recaptcha');
    ?>
</option>
			<option value="white" <?php 
    if ($optionarray_def['re_theme'] == 'white') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('White', 'wp-recaptcha');
    ?>
</option>
			<option value="blackglass" <?php 
    if ($optionarray_def['re_theme'] == 'blackglass') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Black Glass', 'wp-recaptcha');
    ?>
</option>
			<option value="clean" <?php 
    if ($optionarray_def['re_theme'] == 'clean') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Clean', 'wp-recaptcha');
    ?>
</option>
			</select>
			</div>
			<!-- Tab Index -->
			<label for="re_tabindex"><?php 
    _e('Tab Index (<em>e.g. WP: <strong>5</strong>, WPMU: <strong>3</strong></em>):', 'wp-recaptcha');
    ?>
</label>
			<input name="re_tabindex" id="re_tabindex" size="5" value="<?php 
    echo $optionarray_def['re_tabindex'];
    ?>
" />
			<br />
			<?php 
    global $wpmu;
    if ($wpmu == 1 || $wpmu == 0) {
        ?>
		</td>
	</tr>
	<tr valign="top">
		<th scope="row"><?php 
        _e('Registration Options', 'wp-recaptcha');
        ?>
</th>
		<td>
			<!-- Show reCAPTCHA on the registration page -->
			<big><input type="checkbox" name="re_registration" id="re_registration" value="1" <?php 
        if ($optionarray_def['re_registration'] == true) {
            echo 'checked="checked"';
        }
        ?>
 /> <label for="re_registration"><?php 
        _e('Enable reCAPTCHA on registration form.', 'wp-recaptcha');
        ?>
</label></big>
			<br />
			<!-- The theme selection -->
			<div class="theme-select">
				<label for="re_theme_reg"><?php 
        _e('Theme:', 'wp-recaptcha');
        ?>
</label>
				<select name="re_theme_reg" id="re_theme_reg">
				<option value="red" <?php 
        if ($optionarray_def['re_theme_reg'] == 'red') {
            echo 'selected="selected"';
        }
        ?>
><?php 
        _e('Red', 'wp-recaptcha');
        ?>
</option>
				<option value="white" <?php 
        if ($optionarray_def['re_theme_reg'] == 'white') {
            echo 'selected="selected"';
        }
        ?>
><?php 
        _e('White', 'wp-recaptcha');
        ?>
</option>
				<option value="blackglass" <?php 
        if ($optionarray_def['re_theme_reg'] == 'blackglass') {
            echo 'selected="selected"';
        }
        ?>
><?php 
        _e('Black Glass', 'wp-recaptcha');
        ?>
</option>
				<option value="clean" <?php 
        if ($optionarray_def['re_theme_reg'] == 'clean') {
            echo 'selected="selected"';
        }
        ?>
><?php 
        _e('Clean', 'wp-recaptcha');
        ?>
</option>
				</select>
			</div>
			<?php 
    }
    ?>
		</td>
	</tr>
   <tr valign="top">
      <th scope="row"><?php 
    _e('Error Messages', 'wp-recaptcha');
    ?>
</th>
         <td>
            <p><?php 
    _e('The following are the messages to display when the user does not enter a CAPTCHA response or enters the incorrect CAPTCHA response.', 'wp-recaptcha');
    ?>
</p>
            <!-- Error Messages -->
            <p class="re-keys">
               <!-- Blank -->
      			<label class="which-key" for="error_blank"><?php 
    _e('No response entered:', 'wp-recaptcha');
    ?>
</label>
      			<input name="error_blank" id="error_blank" size="80" value="<?php 
    echo $optionarray_def['error_blank'];
    ?>
" />
      			<br />
      			<!-- Incorrect -->
      			<label class="which-key" for="error_incorrect"><?php 
    _e('Incorrect response entered:', 'wp-recaptcha');
    ?>
</label>
      			<input name="error_incorrect" id="error_incorrect" size="80" value="<?php 
    echo $optionarray_def['error_incorrect'];
    ?>
" />
      		</p>
         </td>
      </th>
   </tr>
	 <tr valign="top">
			<th scope="row"><?php 
    _e('General Settings', 'wp-recaptcha');
    ?>
</th>
			<td>
				<!-- The language selection -->
				<div class="lang-select">
				<label for="re_lang"><?php 
    _e('Language:', 'wp-recaptcha');
    ?>
</label>
				<select name="re_lang" id="re_lang">
				<option value="en" <?php 
    if ($optionarray_def['re_lang'] == 'en') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('English', 'wp-recaptcha');
    ?>
</option>
				<option value="nl" <?php 
    if ($optionarray_def['re_lang'] == 'nl') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Dutch', 'wp-recaptcha');
    ?>
</option>
				<option value="fr" <?php 
    if ($optionarray_def['re_lang'] == 'fr') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('French', 'wp-recaptcha');
    ?>
</option>
				<option value="de" <?php 
    if ($optionarray_def['re_lang'] == 'de') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('German', 'wp-recaptcha');
    ?>
</option>
				<option value="pt" <?php 
    if ($optionarray_def['re_lang'] == 'pt') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Portuguese', 'wp-recaptcha');
    ?>
</option>
				<option value="ru" <?php 
    if ($optionarray_def['re_lang'] == 'ru') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Russian', 'wp-recaptcha');
    ?>
</option>
				<option value="es" <?php 
    if ($optionarray_def['re_lang'] == 'es') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Spanish', 'wp-recaptcha');
    ?>
</option>
				<option value="tr" <?php 
    if ($optionarray_def['re_lang'] == 'tr') {
        echo 'selected="selected"';
    }
    ?>
><?php 
    _e('Turkish', 'wp-recaptcha');
    ?>
</option>
				</select>
				</label>
		    	</div>
		    	<!-- Whether or not to be XHTML 1.0 Strict compliant -->
				<input type="checkbox" name="re_xhtml" id="re_xhtml" value="1" <?php 
    if ($optionarray_def['re_xhtml'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /> <label for="re_xhtml"><?php 
    _e("Be XHTML 1.0 Strict compliant. <strong>Note</strong>: Bad for users who don't have Javascript enabled in their browser (Majority do).", "wp-recaptcha");
    ?>
</label>
				<br />
			</td>
		</tr>
	</table>
	
	<h3><?php 
    _e('About MailHide', 'wp-recaptcha');
    ?>
</h3>
	<p><a href="http://mailhide.recaptcha.net/" title="mailhide email obfuscation">MailHide</a> <?php 
    _e('uses reCAPTCHA to protect email adresses displayed on your blog from being harvested for spam.', 'wp-recaptcha');
    ?>
</p>
	<p><?php 
    _e('Activating MailHide will automatically hide all emails in posts and comments from spam bots. For example, support@recaptcha.net would become', 'wp-recaptcha');
    ?>
 supp<a href="http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=" onclick="window.open('http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="<?php 
    _e('Reveal this e-mail address', 'wp-recaptcha');
    ?>
">...</a>@recaptcha.net. <?php 
    _e('There are also options below for choosing the text to show for hidden emails.', 'wp-recaptcha');
    ?>
</p>
	<p><?php 
    _e('MailHide also requires a public and private key which you can generate using the <a href="http://mailhide.recaptcha.net/apikey">key generation service</a>.', 'wp-recaptcha');
    ?>
</p>
	<table class="form-table">
	<tr valign="top">
	<th scope="row"><?php 
    _e('MailHide Keys', 'wp-recaptcha');
    ?>
</th>
	<td>
		<!-- MailHide Enabler -->
		<big><?php 
    _e('Enable MailHide email obfuscation for:', 'wp-recaptcha');
    ?>
</big><br />
		   <input type="checkbox" name="use_mailhide_posts" id="use_mailhide_posts" value="1" <?php 
    if ($optionarray_def['use_mailhide_posts'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /><label for="use_mailhide_posts"><?php 
    _e('Posts/Pages', 'wp-recaptcha');
    ?>
</label><br />
		   <input type="checkbox" name="use_mailhide_comments" id="use_mailhide_comments" value="1" <?php 
    if ($optionarray_def['use_mailhide_comments'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /><label for="use_mailhide_comments"><?php 
    _e('Comments', 'wp-recaptcha');
    ?>
</label><br />
		   <input type="checkbox" name="use_mailhide_rss" id="use_mailhide_rss" value="1" <?php 
    if ($optionarray_def['use_mailhide_rss'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /><label for="use_mailhide_rss"><?php 
    _e('RSS Feed of Posts/Pages', 'wp-recaptcha');
    ?>
</label><br />
		   <input type="checkbox" name="use_mailhide_rss_comments" id="use_mailhide_rss_comments" value="1" <?php 
    if ($optionarray_def['use_mailhide_rss_comments'] == true) {
        echo 'checked="checked"';
    }
    ?>
 /><label for="use_mailhide_rss_comments"><?php 
    _e('RSS Feed of Comments', 'wp-recaptcha');
    ?>
</label><br />
		<!-- Public Key -->
		<p class="re-keys">
			<label class="which-key" for="mailhide_pub"><?php 
    _e('Public Key:', 'wp-recaptcha');
    ?>
</label>
			<input name="mailhide_pub" id="mailhide_pub" size="40" value="<?php 
    echo $optionarray_def['mailhide_pub'];
    ?>
" />
			<br />
			<!-- Private Key -->
			<label class="which-key" for="mailhide_priv"><?php 
    _e('Private Key:', 'wp-recaptcha');
    ?>
</label>
			<input name="mailhide_priv" id="mailhide_priv" size="40" value="<?php 
    echo $optionarray_def['mailhide_priv'];
    ?>
" />
		</p>
   </td>
   </tr>
   <tr valign="top">
   <th scope="row"><?php 
    _e('Visibility Options', 'wp-recaptcha');
    ?>
</th>
   <td>
		<!-- Don't show mailhide to users who can... -->
		<div class="theme-select">
			<input type="checkbox" id="mh_bypass" name="mh_bypass" <?php 
    if ($optionarray_def['mh_bypass'] == true) {
        echo 'checked="checked"';
    }
    ?>
/>
			<label for="mh_bypass"><?php 
    _e('Show full email adresses to <strong>registered</strong> users who can:', 'wp-recaptcha');
    ?>
</label>
			<?php 
    recaptcha_dropdown_capabilities('mh_bypasslevel', $optionarray_def['mh_bypasslevel']);
    // <select> of capabilities
    ?>
		</div>
      <!-- Email Replacement Text -->
      <p class="re-keys">
         <p><?php 
    _e('The following allows you to show the replaced links differently. Usually, you get something like this,', 'wp-recaptcha');
    ?>
 supp<a href="http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=" onclick="window.open('http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@recaptcha.net , <?php 
    _e('where the email is broken up into two pieces and then a link with dots is placed in the middle. The <strong>Email Replacement Text</strong> value lets you choose what to name the link and then the <strong>Reveal Link Title</strong> value determines the text that is shown when the link is hovered over.', 'wp-recaptcha');
    ?>
</p>
         <p><?php 
    _e('For example, if the <strong>Email Replacement Text</strong> option is set to <strong>HIDDEN EMAIL</strong> and the <strong>Reveal Link Title</strong> option is set to <strong>Click here to reveal this address</strong>, then ALL emails will be hidden like this:', 'wp-recaptcha');
    ?>
 <a href="http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=" onclick="window.open('http://mailhide.recaptcha.net/d?k=01a8k2oW96qNZ4JhiFx5zDRg==&amp;c=yifPREOOvfzA0o3dbnnwP8fy91UD8RL4SspHDIKHVRE=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Click here to reveal this address"><?php 
    _e('HIDDEN EMAIL', 'wp-recaptcha');
    ?>
</a></p>
         <p><?php 
    _e('If you want to maintain the default method of hiding emails then leave both boxes blank.', 'wp-recaptcha');
    ?>
</p>
         <label class="whch-key" for="mh_replace_link"><?php 
    _e('EMail Replacement Text:', 'wp-recaptcha');
    ?>
</label>
         <input name="mh_replace_link" id="mh_replace_link" size="40" value="<?php 
    echo $optionarray_def['mh_replace_link'];
    ?>
" />
         <br />
         <label class="which-key" for="mh_replace_title"><?php 
    _e('Reveal Link Title:', 'wp-recaptcha');
    ?>
</label>
         <input name="mh_replace_title" id="mh_replace_title" size="40" value="<?php 
    echo $optionarray_def['mh_replace_title'];
    ?>
" />
      </p>
   </td>
   </tr>
   <tr valign="top">
   <th scope="row"><?php 
    _e('Other Information', 'wp-recaptcha');
    ?>
</th>
   <td>
		<!-- MailHide CSS -->
		<p><?php 
    _e("CSS: You can style the hidden emails and much more in the <strong>recaptcha.css</strong> stylesheet in wp-recaptcha's plugin folder.", "wp-recaptcha");
    ?>
</p>
		<p><?php 
    _e("You can bypass email hiding for an address by enclosing it within <strong>[nohide][/nohide]</strong>, ex. [nohide]some@email.com[/nohide].", "wp-recaptcha");
    ?>
</p>
	</td>
	</tr>
	</table>
	<div class="submit">
		<input type="submit" name="submit" value="<?php 
    _e('Update Options', 'wp-recaptcha');
    ?>
 &raquo;" />
	</div>

	</form>
   <p class="copyright">&copy; Copyright 2008&nbsp;&nbsp;<a href="http://recaptcha.net">reCAPTCHA</a></p>
</div> <!-- [wrap] -->
<!-- ############################## END: ADMIN OPTIONS ##################### -->

<?php 
}