Пример #1
0
         if ($reCaptchaPrivateKey === 'disabled') {
             $resp = TRUE;
         } else {
             $resp = recaptcha_check_answer($reCaptchaPrivateKey, $_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"]);
         }
     } else {
         // Must be disabled
         $resp = TRUE;
     }
     if ($resp && ($theVerify = new Verify($theDropbox))) {
         // They passed the Captcha so send them on their way if at all possible!
         if ($theVerify->formInitError() != "") {
             NSSError($theVerify->formInitError(), "Verify error");
             $smarty->display('error.tpl');
         } else {
             if (!$theVerify->sendVerifyEmail()) {
                 NSSError("Sending the verification email failed.", "Email error");
             }
             $smarty->assign('autoHome', TRUE);
             $smarty->display('verify_sent.tpl');
         }
         exit;
     }
     // If they reached here, they failed the Captcha test
     $smarty->assign('verifyFailed', TRUE);
 } else {
     // They are an authorised user so don't need a Captcha
     if ($theVerify = new Verify($theDropbox)) {
         if ($theVerify->formInitError() != "") {
             NSSError($theVerify->formInitError(), "Verify error");
             $smarty->display('error.tpl');