Пример #1
0
            if (!isset($aSessionVars["VerifyImgString"])) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, GetMessage(MSG_LOG_NO_VERIMG, array(), false));
                UserError("verify_failed", GetMessage(MSG_ARESP_NO_AUTH));
            }
            //
            // the user's entry must match the value in the session; allow
            // spaces in the user's input
            //
            if (str_replace(" ", "", $SPECIAL_VALUES["arverify"]) !== $aSessionVars["VerifyImgString"]) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, GetMessage(MSG_LOG_NO_MATCH, array(), false));
                UserError("ar_verify", GetMessage(MSG_ARESP_NO_MATCH));
            } elseif (!AutoRespond($sAutoRespTo, $sAutoRespSubj, $aRawDataValues)) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, GetMessage(MSG_LOG_FAILED, array(), false));
                SendAlert(GetMessage(MSG_ARESP_FAILED));
            } else {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, GetMessage(MSG_LOG_OK, array(), false));
            }
        }
    }
}
//
// redirect to the good URL page, or create a default page
//
if (!isset($SPECIAL_VALUES["good_url"]) || empty($SPECIAL_VALUES["good_url"])) {
    if (isset($SPECIAL_VALUES["good_template"]) && !empty($SPECIAL_VALUES["good_template"])) {
        OutputTemplate($SPECIAL_VALUES["good_template"], $aRawDataValues);
    } else {
        CreatePage(GetMessage(MSG_THANKS_PAGE));
    }
} else {
    Redirect($SPECIAL_VALUES["good_url"]);
 function _Send($b_use_template)
 {
     global $SPECIAL_VALUES, $HOOK_DIR;
     //
     // declare some global vars for the hook system calls below
     //
     global $aFieldOrder, $aCleanedValues, $aRawDataValues, $aAllRawValues, $aFileVars;
     FMDebug("Sending auto response: " . ($b_use_template ? "template" : "plain"));
     //
     // Hook system: before sending auto response
     //
     if ($HOOK_DIR !== "") {
         if (!@(include "{$HOOK_DIR}/fmhookprearesp.inc.php")) {
             @(include "{$HOOK_DIR}/fmhookprearesp.inc");
         }
     }
     if (!$this->_SendEmail($this->_sTo, $this->_sSubject, $aRawDataValues, $b_use_template)) {
         WriteARLog($this->_sTo, $this->_sSubject, GetMessage(MSG_LOG_FAILED, array(), false));
         SendAlert(GetMessage(MSG_ARESP_FAILED));
     } else {
         WriteARLog($this->_sTo, $this->_sSubject, GetMessage(MSG_LOG_OK, array(), false));
         //
         // Hook system: after sending auto response
         //
         if ($HOOK_DIR !== "") {
             if (!@(include "{$HOOK_DIR}/fmhookpostaresp.inc.php")) {
                 @(include "{$HOOK_DIR}/fmhookpostaresp.inc");
             }
         }
     }
 }
Пример #3
0
            if (!isset($aSessionVars["VerifyImgString"])) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, "No VerifyImgString in session");
                Error("verify_failed", "Failed to obtain authorization to send you email");
            }
            //
            // the user's entry must match the value in the session; allow
            // spaces in the user's input
            //
            if (str_replace(" ", "", $SPECIAL_VALUES["arverify"]) !== $aSessionVars["VerifyImgString"]) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, "User did not match image");
                UserError("ar_verify", "Your entry did not match the image", "", array());
            } elseif (!AutoRespond($sAutoRespTo, $sAutoRespSubj, $aRawDataValues)) {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, "Failed");
                SendAlert("Autoresponder failed");
            } else {
                WriteARLog($sAutoRespTo, $sAutoRespSubj, "OK");
            }
        }
    }
}
//
// redirect to the good URL page, or create a default page
//
if (!isset($SPECIAL_VALUES["good_url"]) || empty($SPECIAL_VALUES["good_url"])) {
    if (isset($SPECIAL_VALUES["good_template"]) && !empty($SPECIAL_VALUES["good_template"])) {
        OutputTemplate($SPECIAL_VALUES["good_template"], $aRawDataValues);
    } else {
        CreatePage("Thanks!  We've received your information and, if it's appropriate, we'll be in contact with you soon.");
    }
} else {
    Redirect($SPECIAL_VALUES["good_url"]);