Changeset 362867
- Timestamp:
- 03/21/2011 01:26:08 PM (15 years ago)
- Location:
- secure-captcha/trunk
- Files:
-
- 1 added
- 1 deleted
- 4 edited
-
admin.php (modified) (3 diffs)
-
handwrittenCaptcha.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
screenshot-1.png (added)
-
secure_captcha.php (modified) (3 diffs)
-
ss-1.png (deleted)
Legend:
- Unmodified
- Added
- Removed
-
secure-captcha/trunk/admin.php
r362800 r362867 21 21 $siteID = get_option('secure_captcha_siteID'); 22 22 $key = get_option('secure_captcha_key'); 23 $hideLink = get_option('secure_captcha_hideLink'); 23 24 $forms_string = get_option('secure_captcha_forms'); 24 25 if ($forms_string == null) $forms_string = 'register,lost_password,comment'; … … 29 30 $key = $_POST['secure_captcha_key']; 30 31 $forms = $_POST['secure_captcha_forms']; 32 $hideLink = $_POST['secure_captcha_hideLink']; 33 if ($hideLink == null) $hideLink = 'yes'; 34 31 35 $forms_string = implode(",", $forms); 32 36 update_option('secure_captcha_siteID', $siteID); 33 37 update_option('secure_captcha_key', $key); 34 38 update_option('secure_captcha_forms', $forms_string); 39 update_option('secure_captcha_hideLink', $hideLink); 35 40 36 41 ?> … … 69 74 </tr> 70 75 76 <tr> 77 <th><?php _e("Show link to the SecureCAPTCHA.net under the CAPTCHA image. ", 'secure_captcha'); ?></th> 78 <td><input type="checkbox" name="secure_captcha_hideLink" value="no" <?php if ($hideLink != 'yes') echo 'checked="true"'; ?>></td> 79 </tr> 80 71 81 </table> 72 82 -
secure-captcha/trunk/handwrittenCaptcha.php
r362800 r362867 35 35 $this->proxyServer = $proxyServer; 36 36 $this->proxyPort = $proxyPort; 37 $this->tid = ''; 37 38 } 38 39 … … 80 81 81 82 $questionURL = '/captcha/generateResponse?auth=' . urlencode($this->siteID) . '&hash=' . urlencode($hash); 83 if ($this->tid != '') { 84 $questionURL = $questionURL . '&tid=' . urlencode($this->tid); 85 } 82 86 $responseText = $this->download($questionURL, $result); 83 87 if ($responseText == null) { -
secure-captcha/trunk/readme.txt
r362837 r362867 41 41 == Screenshots == 42 42 43 1. s s-1.png43 1. screenshot-1.png 44 44 45 45 == Changelog == -
secure-captcha/trunk/secure_captcha.php
r362800 r362867 51 51 $siteID = get_option('secure_captcha_siteID'); 52 52 $key = get_option('secure_captcha_key'); 53 return new CaptchaService($siteID, $key); 53 $hideLink = get_option('secure_captcha_hideLink'); 54 55 $ret = new CaptchaService($siteID, $key); 56 //echo 'x'.$hideLink; 57 if ($hideLink == 'yes') $ret->tid = 'wp'; 58 return $ret; 54 59 } 55 60 56 61 // prints captcha html fragment 57 62 function secure_captcha_print_fragment() { 58 if ( is_admin()) {63 if (current_user_can('administrator')) { 59 64 return; 60 65 } … … 70 75 echo $fragment; 71 76 echo '<label>' . __('Rewrite letters from the image above (lower Latin letters only): ', 'secure_captcha') . '<br />'; 72 echo '<input name="secure_captcha_answer" type="text" class="input" ></label>';77 echo '<input name="secure_captcha_answer" type="text" class="input" tabindex="89"></label>'; 73 78 echo '<input name="secure_captcha_hash" type="hidden" value="' . htmlspecialchars($hash) . '">'; 74 79 echo '<input name="secure_captcha_timestamp" type="hidden" value="' . htmlspecialchars($timestamp) . '">'; … … 77 82 // @returns true when code is correct 78 83 function secure_captcha_validate_code() { 79 if ( is_admin()) {84 if (current_user_can('administrator')) { 80 85 return true; 81 86 }
Note: See TracChangeset
for help on using the changeset viewer.