$page->formData['cc_cvv'],
$page->formData['captcha_rmv']
);
-
+ $config = parse_ini_file('config.ini', true);
+ $pass_type = $config['pass_type'];
if ($this->elementExists('pass_type')) {
$passType = filter_var($_POST['pass_type'], FILTER_VALIDATE_INT);
- switch ($passType) {
- case "89":
- $page->formData['pass_type']['element'] = '$89.00 Internet Special';
- break;
- case "75":
- $page->formData['pass_type']['element'] = '$75.00 AAA Member Special';
- break;
- default:
- $page->formData['pass_type']['element'] = $passType;
- break;
- }
-// var_dump($page->formData['pass_type']);
-// exit;
+ $page->formData['pass_type']['element'] = $pass_type[$passType];
}
/* Boolean types */
* @access protected
*/
protected function sendConfirmation(
+ $email,
$emailSubject,
$emailTemplate,
$mailFactory = 'mail'
$page->fname = $this->getSubmitValue('fname');
$page->lname = $this->getSubmitValue('lname');
+ if ($this->elementExists('qty')) {
+ $page->qty = $this->getSubmitValue('qty');
+ }
+ $config = parse_ini_file('config.ini', true);
+ $pass_type = $config['pass_type'];
+ if ($this->elementExists('pass_type')) {
+ $passType = filter_var($_POST['pass_type'], FILTER_VALIDATE_INT);
+ $page->pass_type = $pass_type[$passType];
+ }
+
$template->compile($emailTemplate);
$htmlMsg = $template->bufferedOutputObject($page);
$msg .= "From {$page->fname} {$page->lname}\n\n";
$mimeMail = new Mail_mime("\n");
- $mimeMail->setFrom("Gaylord Golf Mecca <".OWNER_EMAIL.">");
+ $mimeMail->setFrom("Gaylord Golf Mecca <".SERVER_FROM_EMAIL.">");
$mimeMail->setSubject($emailSubject);
$mimeMail->setHTMLBody($htmlMsg);
$mimeMail->setTXTBody($msg);
$setHeader['Reply-To'] = "Gaylord Golf Mecca <".OWNER_EMAIL.">";
$headers = $mimeMail->headers($setHeader);
- $res = $mail->send($this->email, $headers, $body);
+ $res = $mail->send($email, $headers, $body);
if (PEAR::isError($res)) {
return Toolkit_Common::handleError($res);
} else {
*/
public function confirmation()
{
- $this->sendConfirmation(
- 'Gaylord Golf Giveaway', // Email Subject
- 'giveawayConfEmail.tpl' // Email Template File
- );
+ $email = $this->getSubmitValue('email');
+ if (GLM_TOOLBOX::valid_email($email)) {
+ $this->sendConfirmation(
+ $email, // Email to
+ 'Gaylord Golf Giveaway', // Email Subject
+ 'giveawayConfEmail.tpl' // Email Template File
+ );
+ }
}
}
*/
public function confirmation()
{
- $this->sendConfirmation(
- 'Confirmation Gaylord America\'s Summer Golf Mecca', // Email Subject
- 'getawayConfEmail.tpl' // Email Template File
- );
+ $email = $this->getSubmitValue('email');
+ if (GLM_TOOLBOX::valid_email($email)) {
+ $this->sendConfirmation(
+ $email, // Email to
+ 'Confirmation Gaylord America\'s Summer Golf Mecca', // Email Subject
+ 'getawayConfEmail.tpl' // Email Template File
+ );
+ }
}
// }}}
}
*/
public function confirmation()
{
- $this->sendConfirmation(
- 'Gaylord Golf Passport', // Email Subject
- 'passportConfEmail.tpl' // Email Template File
- );
+ $email = $this->getSubmitValue('email');
+ if (GLM_TOOLBOX::valid_email($email)) {
+ $this->sendConfirmation(
+ $email, // Email to
+ 'Gaylord Golf Passport', // Email Subject
+ 'passportConfEmail.tpl' // Email Template File
+ );
+ }
}
// }}}
// {{{ checkCvv()
// }}}
public function processData($values)
{
+ return parent::processData($values);
+
$res = parent::processData($values);
if ($res) {
$res2 = $this->processAuthNet($values);