<?php
// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
-$GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/PassportForm.js';
+$GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/PassportForm.js?v=1.0.0';
/**
* File Doc Comment
*
'display' => 'State/Province',
'opts' => $GLOBALS['states']
);
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
$e[] = array(
'type' => 'email',
'req' => true,
'name' => 'email_rmv',
'display' => 'Verify E-mail'
);
- $e[] = array(
- 'type' => 'text',
- 'req' => true,
- 'name' => 'zip',
- 'display' => 'ZIP/Postal Code'
- );
$e[] = array(
'type' => 'tel',
'req' => false,
'type' => 'static',
'req' => false,
'display' => '</label><table role="grid">'
- . '<tr><td>Postage and Handling</td><td><input type="text" readonly value="3" style="width: 50px;"></td></tr>'
- . '<tr><td>Total Price</td><td><input type="text" id="passport_total" name="total_price" readonly value="0" style="width: 50px;"></td></tr>'
+ . '<tr><td>Postage and Handling</td><td>$<input type="text" readonly value="3" style="width: 50px;"></td></tr>'
+ . '<tr><td>Total Price</td><td>$<input type="text" id="passport_total" name="total_price" readonly value="0" style="width: 50px;"></td></tr>'
. '</table></label>'
);
'm' => 'mm',
'Y' => 'yyyy'
)
- )
+ ),
+ 'att' => array('style' => 'width: 70px;')
);
$e[] = array(
'type' => 'text',
'req' => true,
'name' => 'cc_cvv',
'display' => 'CVV',
+ 'opts' => array('style' => 'width: 50px;')
);
}
{
$email = $this->getSubmitValue('email');
if (GLM_TOOLBOX::valid_email($email)) {
+ $perPrice = filter_var($_REQUEST['pass_type'], FILTER_VALIDATE_INT);
+ $qtyPassports = filter_var($_REQUEST['qty'], FILTER_VALIDATE_INT);
+ $totalCharge = filter_var($_REQUEST['total_price'], FILTER_VALIDATE_INT);
$this->sendConfirmation(
- $email, // Email to
- 'Gaylord Golf Passport', // Email Subject
- 'passportConfEmail.tpl' // Email Template File
+ 'vagrant@localhost',//$email, // Email to
+ 'Gaylord Golf Passport Order', // Email Subject
+ 'passportConfEmail.tpl', // Email Template File
+ array(
+ 'fields' => array(
+ 'First Name' => filter_var($_REQUEST['fname'], FILTER_SANITIZE_STRING),
+ 'Last Name' => filter_var($_REQUEST['lname'], FILTER_SANITIZE_STRING),
+ 'Address' => filter_var($_REQUEST['address'], FILTER_SANITIZE_STRING),
+ 'City' => filter_var($_REQUEST['city'], FILTER_SANITIZE_STRING),
+ 'State' => filter_var($_REQUEST['state'], FILTER_SANITIZE_STRING),
+ 'ZIP' => filter_var($_REQUEST['zip'], FILTER_SANITIZE_STRING),
+ 'Email' => filter_var($_REQUEST['email'], FILTER_SANITIZE_STRING),
+ 'Telephone' => filter_var($_REQUEST['phone'], FILTER_SANITIZE_STRING),
+ ),
+ 'qtyPassports' => $qtyPassports,
+ 'perPrice' => $perPrice,
+ 'passportPrice' => $qtyPassports * $perPrice,
+ 'shipping' => 3,
+ 'totalCharge' => $totalCharge
+ )
);
}
}
$this->mergeFiles
);
if ($res === true) {
+ $this->captchaQuestion->destroy();
$this->cleanForm();
$this->freeze();
$this->emailOwner();
<b>{subject:h}</b>
</font>
</p>
- <table cellspacing="0" cellpadding="0" bgcolor="#c0c0c0" border="0">
+ <table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
- <table cellspacing="1" cellpadding="5" border="0" bgcolor="#c0c0c0" width="400">
+ <table cellspacing="1" cellpadding="5" border="0" width="450">
<tr><td>
- <p>Thank you for requesting a Golf Passport!</p>
- <p>This is a confirmation of your order for {qty} {pass_type}(s)</p>
- <p>A $3.00 shipping charge is added to your total.</p>
+ <p>Thank you for ordering the Gaylord Golf Mecca Passport.</p>
+ <p>This is a confirmation receipt for:</p>
+ </td></tr>
+ <tr><td>
+ <table cellspacing="1" cellpadding="5" border="0" width="400">
+ {foreach:formData[fields],label,value}
+ <tr>
+ <td>{label}</td>
+ <td>{value}</td>
+ <tr>
+ {end:}
+ <tr>
+ <td>{formData[qtyPassports]} Passports at ${formData[perPrice]} each</td>
+ <td>${formData[passportPrice]}</td>
+ <tr>
+ <tr>
+ <td>Shipping Charge</td>
+ <td>${formData[shipping]}</td>
+ <tr>
+ <tr>
+ <td>Total Charge</td>
+ <td>${formData[totalCharge]}</td>
+ <tr>
+ </tr>
+ </table>
</td></tr>
</table>
</td>
<td>
<table cellspacing="0" cellpadding="10" border="0" width="400">
<tr>
- <td bgcolor="#eeeeee">
+ <td>
<font size="1" face="arial, sans-serif">
To ensure the delivery of these e-mails to your inbox,
please add {email_from:h} to your e-mail Address Book or Safe List.