Last active
August 29, 2015 14:00
-
-
Save gmann1982/11291302 to your computer and use it in GitHub Desktop.
email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
###################################################### | |
# # | |
# Forms To Go 4.5.4 # | |
# http://www.bebosoft.com/ # | |
# # | |
###################################################### | |
define('kOptional', true); | |
define('kMandatory', false); | |
define('kStringRangeFrom', 1); | |
define('kStringRangeTo', 2); | |
define('kStringRangeBetween', 3); | |
define('kYes', 'yes'); | |
define('kNo', 'no'); | |
error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
ini_set('track_errors', true); | |
function DoStripSlashes($fieldValue) { | |
// temporary fix for PHP6 compatibility - magic quotes deprecated in PHP6 | |
if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { | |
if (is_array($fieldValue) ) { | |
return array_map('DoStripSlashes', $fieldValue); | |
} else { | |
return trim(stripslashes($fieldValue)); | |
} | |
} else { | |
return $fieldValue; | |
} | |
} | |
function FilterCChars($theString) { | |
return preg_replace('/[\x00-\x1F]/', '', $theString); | |
} | |
function CheckString($value, $low, $high, $mode, $limitAlpha, $limitNumbers, $limitEmptySpaces, $limitExtraChars, $optional) { | |
$regEx = ''; | |
if ($limitAlpha == kYes) { | |
$regExp = 'A-Za-z'; | |
} | |
if ($limitNumbers == kYes) { | |
$regExp .= '0-9'; | |
} | |
if ($limitEmptySpaces == kYes) { | |
$regExp .= ' '; | |
} | |
if (strlen($limitExtraChars) > 0) { | |
$search = array('\\', '[', ']', '-', '$', '.', '*', '(', ')', '?', '+', '^', '{', '}', '|', '/'); | |
$replace = array('\\\\', '\[', '\]', '\-', '\$', '\.', '\*', '\(', '\)', '\?', '\+', '\^', '\{', '\}', '\|', '\/'); | |
$regExp .= str_replace($search, $replace, $limitExtraChars); | |
} | |
if ( (strlen($regExp) > 0) && (strlen($value) > 0) ){ | |
if (preg_match('/[^' . $regExp . ']/', $value)) { | |
return false; | |
} | |
} | |
if ( (strlen($value) == 0) && ($optional === kOptional) ) { | |
return true; | |
} elseif ( (strlen($value) >= $low) && ($mode == kStringRangeFrom) ) { | |
return true; | |
} elseif ( (strlen($value) <= $high) && ($mode == kStringRangeTo) ) { | |
return true; | |
} elseif ( (strlen($value) >= $low) && (strlen($value) <= $high) && ($mode == kStringRangeBetween) ) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
function CheckEmail($email, $optional) { | |
if ( (strlen($email) == 0) && ($optional === kOptional) ) { | |
return true; | |
} elseif ( preg_match("/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i", $email) == 1 ) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$clientIP = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} else { | |
$clientIP = $_SERVER['REMOTE_ADDR']; | |
} | |
$FTGSpecialInstructions = DoStripSlashes( $_POST['SpecialInstructions'] ); | |
$FTGDepot = DoStripSlashes( $_POST['Depot'] ); | |
$FTGContactName = DoStripSlashes( $_POST['ContactName'] ); | |
$FTGTelephone = DoStripSlashes( $_POST['Telephone'] ); | |
$FTGFax = DoStripSlashes( $_POST['Fax'] ); | |
$FTGEmail = DoStripSlashes( $_POST['Email'] ); | |
$FTGDeliveryAddress = DoStripSlashes( $_POST['DeliveryAddress'] ); | |
$FTGPWPoloSmallQTY = DoStripSlashes( $_POST['PWPoloSmallQTY'] ); | |
$FTGPWPoloMediumQTY = DoStripSlashes( $_POST['PWPoloMediumQTY'] ); | |
$FTGPWPoloLargeQTY = DoStripSlashes( $_POST['PWPoloLargeQTY'] ); | |
$FTGPWPoloXLQTY = DoStripSlashes( $_POST['PWPoloXLQTY'] ); | |
$FTGPWPoloXXLQTY = DoStripSlashes( $_POST['PWPoloXXLQTY'] ); | |
$FTGPWPoloXXXLQTY = DoStripSlashes( $_POST['PWPoloXXXLQTY'] ); | |
$FTGPWPoloQTY = DoStripSlashes( $_POST['PWPoloQTY'] ); | |
$FTGPWTShirtSmallQTY = DoStripSlashes( $_POST['PWTShirtSmallQTY'] ); | |
$FTGPWTShirtMediumQTY = DoStripSlashes( $_POST['PWTShirtMediumQTY'] ); | |
$FTGPWTShirtLargeQTY = DoStripSlashes( $_POST['PWTShirtLargeQTY'] ); | |
$FTGPWTShirtXLQTY = DoStripSlashes( $_POST['PWTShirtXLQTY'] ); | |
$FTGPWTShirtXXLQTY = DoStripSlashes( $_POST['PWTShirtXXLQTY'] ); | |
$FTGPWTShirtXXXLQTY = DoStripSlashes( $_POST['PWTShirtXXXLQTY'] ); | |
$FTGPWTShirtQTY = DoStripSlashes( $_POST['PWTShirtQTY'] ); | |
$FTGPWSweatShirtSmallQTY = DoStripSlashes( $_POST['PWSweatShirtSmallQTY'] ); | |
$FTGPWSweatShirtMediumQTY = DoStripSlashes( $_POST['PWSweatShirtMediumQTY'] ); | |
$FTGPWSweatShirtLargeQTY = DoStripSlashes( $_POST['PWSweatShirtLargeQTY'] ); | |
$FTGPWSweatShirtXLQTY = DoStripSlashes( $_POST['PWSweatShirtXLQTY'] ); | |
$FTGPWSweatShirtXXLQTY = DoStripSlashes( $_POST['PWSweatShirtXXLQTY'] ); | |
$FTGPWSweatShirtXXXLQTY = DoStripSlashes( $_POST['PWSweatShirtXXXLQTY'] ); | |
$FTGPWSweatShirtQTY = DoStripSlashes( $_POST['PWSweatShirtQTY'] ); | |
$FTGNavyCombatSpecifics = DoStripSlashes( $_POST['NavyCombatSpecifics'] ); | |
$FTGPWCombatTrousersQTY = DoStripSlashes( $_POST['PWCombatTrousersQTY'] ); | |
$FTGPWCoverallSmallQTY = DoStripSlashes( $_POST['PWCoverallSmallQTY'] ); | |
$FTGPWCoverallMediumQTY = DoStripSlashes( $_POST['PWCoverallMediumQTY'] ); | |
$FTGPWCoverallLargeQTY = DoStripSlashes( $_POST['PWCoverallLargeQTY'] ); | |
$FTGPWCoverallXLQTY = DoStripSlashes( $_POST['PWCoverallXLQTY'] ); | |
$FTGPWCoverallXXLQTY = DoStripSlashes( $_POST['PWCoverallXXLQTY'] ); | |
$FTGPWCoverallXXXLQTY = DoStripSlashes( $_POST['PWCoverallXXXLQTY'] ); | |
$FTGPWCoverallXXXXLQTY = DoStripSlashes( $_POST['PWCoverallXXXXLQTY'] ); | |
$FTGPWHiVisJacketQTY = DoStripSlashes( $_POST['PWHiVisJacketQTY'] ); | |
$FTGPWTrafficJacketSmallQTY = DoStripSlashes( $_POST['PWTrafficJacketSmallQTY'] ); | |
$FTGPWTrafficJacketMediumQTY = DoStripSlashes( $_POST['PWTrafficJacketMediumQTY'] ); | |
$FTGPWTrafficJacketLargeQTY = DoStripSlashes( $_POST['PWTrafficJacketLargeQTY'] ); | |
$FTGPWTrafficJacketXLQTY = DoStripSlashes( $_POST['PWTrafficJacketXLQTY'] ); | |
$FTGPWTrafficJacketXXLQTY = DoStripSlashes( $_POST['PWTrafficJacketXXLQTY'] ); | |
$FTGPWTrafficJacketXXXLQTY = DoStripSlashes( $_POST['PWTrafficJacketXXXLQTY'] ); | |
$FTGPWTrafficJacketXXXXLQTY = DoStripSlashes( $_POST['PWTrafficJacketXXXXLQTY'] ); | |
$FTGPWTrafficJacketQTY = DoStripSlashes( $_POST['PWTrafficJacketQTY'] ); | |
$FTGPWBomberJacketSmallQTY = DoStripSlashes( $_POST['PWBomberJacketSmallQTY'] ); | |
$FTGPWBomberJacketMediumQTY = DoStripSlashes( $_POST['PWBomberJacketMediumQTY'] ); | |
$FTGPWBomberJacketLargeQTY = DoStripSlashes( $_POST['PWBomberJacketLargeQTY'] ); | |
$FTGPWBomberJacketXLQTY = DoStripSlashes( $_POST['PWBomberJacketXLQTY'] ); | |
$FTGPWBomberJacketXXLQTY = DoStripSlashes( $_POST['PWBomberJacketXXLQTY'] ); | |
$FTGPWBomberJacketXXXLQTY = DoStripSlashes( $_POST['PWBomberJacketXXXLQTY'] ); | |
$FTGPWBomberJacketXXXXLQTY = DoStripSlashes( $_POST['PWBomberJacketXXXXLQTY'] ); | |
$FTGPWBomberJacketQTY = DoStripSlashes( $_POST['PWBomberJacketQTY'] ); | |
$FTGPWHiVisTrousersQTY = DoStripSlashes( $_POST['PWHiVisTrousersQTY'] ); | |
$FTGPWTFleeceSmallQTY = DoStripSlashes( $_POST['PWTFleeceSmallQTY'] ); | |
$FTGPWFleeceMediumQTY = DoStripSlashes( $_POST['PWFleeceMediumQTY'] ); | |
$FTGPWFleeceLargeQTY = DoStripSlashes( $_POST['PWFleeceLargeQTY'] ); | |
$FTGPWFleeceXLQTY = DoStripSlashes( $_POST['PWFleeceXLQTY'] ); | |
$FTGPWFleeceXXLQTY = DoStripSlashes( $_POST['PWFleeceXXLQTY'] ); | |
$FTGPWFleeceXXXLQTY = DoStripSlashes( $_POST['PWFleeceXXXLQTY'] ); | |
$FTGPWFleeceXXXXLQTY = DoStripSlashes( $_POST['PWFleeceXXXXLQTY'] ); | |
$FTGPWFleeceQTY = DoStripSlashes( $_POST['PWFleeceQTY'] ); | |
$FTGPWCentHardHatQTY = DoStripSlashes( $_POST['PWCentHardHatQTY'] ); | |
$FTGPWToeCapBootsSize = DoStripSlashes( $_POST['PWToeCapBootsSize'] ); | |
$FTGPWToeCapBootsQTY = DoStripSlashes( $_POST['PWToeCapBootsQTY'] ); | |
$FTGPWDewaltBootsSize = DoStripSlashes( $_POST['PWDewaltBootsSize'] ); | |
$FTGPWDewaltBootsQTY = DoStripSlashes( $_POST['PWDewaltBootsQTY'] ); | |
$FTGPWLEDHeadTorchQTY = DoStripSlashes( $_POST['PWLEDHeadTorchQTY'] ); | |
$FTGPWBumpCapQTY = DoStripSlashes( $_POST['PWBumpCapQTY'] ); | |
$FTGPWBeanieQTY = DoStripSlashes( $_POST['PWBeanieQTY'] ); | |
$FTGPWEarDefendersQTY = DoStripSlashes( $_POST['PWEarDefendersQTY'] ); | |
$FTGPWFaceShieldQty = DoStripSlashes( $_POST['PWFaceShieldQty'] ); | |
$FTGPWGoggleQty = DoStripSlashes( $_POST['PWGoggleQty'] ); | |
$FTGPWFaceShieldGogglesQTY = DoStripSlashes( $_POST['PWFaceShieldGogglesQTY'] ); | |
$FTGPWLatexGloveQTY = DoStripSlashes( $_POST['PWLatexGloveQTY'] ); | |
$FTGPWWellingtonsSize = DoStripSlashes( $_POST['PWWellingtonsSize'] ); | |
$FTGPWWellingtonsQTY = DoStripSlashes( $_POST['PWWellingtonsQTY'] ); | |
$FTGPWWorkerIDQTY = DoStripSlashes( $_POST['PWWorkerIDQTY'] ); | |
$FTGPWHoldallLogoEndsAndMiddleQTY = DoStripSlashes( $_POST['PWHoldallLogoEndsAndMiddleQTY'] ); | |
$FTGPWHoldallLogoEndsOnlyQTY = DoStripSlashes( $_POST['PWHoldallLogoEndsOnlyQTY'] ); | |
$FTGPWHoldallQTY = DoStripSlashes( $_POST['PWHoldallQTY'] ); | |
$FTGPWPVCGloveQTY = DoStripSlashes( $_POST['PWPVCGloveQTY'] ); | |
$FTGPWPVCGauntletQTY = DoStripSlashes( $_POST['PWPVCGauntletQTY'] ); | |
$FTGPWPaperRollQTY = DoStripSlashes( $_POST['PWPaperRollQTY'] ); | |
$FTGPWFirstAid1to10QTY = DoStripSlashes( $_POST['PWFirstAid1to10QTY'] ); | |
$FTGPWFirstAid11to20QTY = DoStripSlashes( $_POST['PWFirstAid11to20QTY'] ); | |
$FTGPWFirstAid21to50QTY = DoStripSlashes( $_POST['PWFirstAid21to50QTY'] ); | |
$FTGPWFirstAidKitQTY = DoStripSlashes( $_POST['PWFirstAidKitQTY'] ); | |
$FTGPWEyewashQTY = DoStripSlashes( $_POST['PWEyewashQTY'] ); | |
$FTGPWWadersSize = DoStripSlashes( $_POST['PWWadersSize'] ); | |
$FTGPWWadersQTY = DoStripSlashes( $_POST['PWWadersQTY'] ); | |
$FTGPWGrimeEzeQTY = DoStripSlashes( $_POST['PWGrimeEzeQTY'] ); | |
$FTGPWMedimaxSanisafeQTY = DoStripSlashes( $_POST['PWMedimaxSanisafeQTY'] ); | |
$FTGPWSafetyGlassesQTY = DoStripSlashes( $_POST['PWSafetyGlassesQTY'] ); | |
$FTGPWSafetyGogglesQTY = DoStripSlashes( $_POST['PWSafetyGogglesQTY'] ); | |
$FTGPWTomahawkBootSize = DoStripSlashes( $_POST['PWTomahawkBootSize'] ); | |
$FTGPWTomahawkBootQTY = DoStripSlashes( $_POST['PWTomahawkBootQTY'] ); | |
$FTGPWOverShoesQTY = DoStripSlashes( $_POST['PWOverShoesQTY'] ); | |
$FTGPWWetsuitQTY = DoStripSlashes( $_POST['PWWetsuitQTY'] ); | |
$FTGPWTailoredShirtsSSQTY = DoStripSlashes( $_POST['PWTailoredShirtsSSQTY'] ); | |
$FTGPWTailoredShirtsLSQTY = DoStripSlashes( $_POST['PWTailoredShirtsLSQTY'] ); | |
$FTGPWTChestWadersQTY = DoStripSlashes( $_POST['PWTChestWadersQTY'] ); | |
$FTGPWNitrileGloveQTY = DoStripSlashes( $_POST['PWNitrileGloveQTY'] ); | |
$FTGSpecialInstructions = strip_tags($FTGSpecialInstructions); | |
$FTGDepot = strip_tags($FTGDepot); | |
$FTGContactName = strip_tags($FTGContactName); | |
$FTGTelephone = strip_tags($FTGTelephone); | |
$FTGFax = strip_tags($FTGFax); | |
$FTGEmail = strip_tags($FTGEmail); | |
$FTGDeliveryAddress = strip_tags($FTGDeliveryAddress); | |
$FTGPWPoloSmallQTY = strip_tags($FTGPWPoloSmallQTY); | |
$FTGPWPoloMediumQTY = strip_tags($FTGPWPoloMediumQTY); | |
$FTGPWPoloLargeQTY = strip_tags($FTGPWPoloLargeQTY); | |
$FTGPWPoloXLQTY = strip_tags($FTGPWPoloXLQTY); | |
$FTGPWPoloXXLQTY = strip_tags($FTGPWPoloXXLQTY); | |
$FTGPWPoloXXXLQTY = strip_tags($FTGPWPoloXXXLQTY); | |
$FTGPWPoloQTY = strip_tags($FTGPWPoloQTY); | |
$FTGPWTShirtSmallQTY = strip_tags($FTGPWTShirtSmallQTY); | |
$FTGPWTShirtMediumQTY = strip_tags($FTGPWTShirtMediumQTY); | |
$FTGPWTShirtLargeQTY = strip_tags($FTGPWTShirtLargeQTY); | |
$FTGPWTShirtXLQTY = strip_tags($FTGPWTShirtXLQTY); | |
$FTGPWTShirtXXLQTY = strip_tags($FTGPWTShirtXXLQTY); | |
$FTGPWTShirtXXXLQTY = strip_tags($FTGPWTShirtXXXLQTY); | |
$FTGPWTShirtQTY = strip_tags($FTGPWTShirtQTY); | |
$FTGPWSweatShirtSmallQTY = strip_tags($FTGPWSweatShirtSmallQTY); | |
$FTGPWSweatShirtMediumQTY = strip_tags($FTGPWSweatShirtMediumQTY); | |
$FTGPWSweatShirtLargeQTY = strip_tags($FTGPWSweatShirtLargeQTY); | |
$FTGPWSweatShirtXLQTY = strip_tags($FTGPWSweatShirtXLQTY); | |
$FTGPWSweatShirtXXLQTY = strip_tags($FTGPWSweatShirtXXLQTY); | |
$FTGPWSweatShirtXXXLQTY = strip_tags($FTGPWSweatShirtXXXLQTY); | |
$FTGPWSweatShirtQTY = strip_tags($FTGPWSweatShirtQTY); | |
$FTGNavyCombatSpecifics = strip_tags($FTGNavyCombatSpecifics); | |
$FTGPWCombatTrousersQTY = strip_tags($FTGPWCombatTrousersQTY); | |
$FTGPWCoverallSmallQTY = strip_tags($FTGPWCoverallSmallQTY); | |
$FTGPWCoverallMediumQTY = strip_tags($FTGPWCoverallMediumQTY); | |
$FTGPWCoverallLargeQTY = strip_tags($FTGPWCoverallLargeQTY); | |
$FTGPWCoverallXLQTY = strip_tags($FTGPWCoverallXLQTY); | |
$FTGPWCoverallXXLQTY = strip_tags($FTGPWCoverallXXLQTY); | |
$FTGPWCoverallXXXLQTY = strip_tags($FTGPWCoverallXXXLQTY); | |
$FTGPWCoverallXXXXLQTY = strip_tags($FTGPWCoverallXXXXLQTY); | |
$FTGPWHiVisJacketQTY = strip_tags($FTGPWHiVisJacketQTY); | |
$FTGPWTrafficJacketSmallQTY = strip_tags($FTGPWTrafficJacketSmallQTY); | |
$FTGPWTrafficJacketMediumQTY = strip_tags($FTGPWTrafficJacketMediumQTY); | |
$FTGPWTrafficJacketLargeQTY = strip_tags($FTGPWTrafficJacketLargeQTY); | |
$FTGPWTrafficJacketXLQTY = strip_tags($FTGPWTrafficJacketXLQTY); | |
$FTGPWTrafficJacketXXLQTY = strip_tags($FTGPWTrafficJacketXXLQTY); | |
$FTGPWTrafficJacketXXXLQTY = strip_tags($FTGPWTrafficJacketXXXLQTY); | |
$FTGPWTrafficJacketXXXXLQTY = strip_tags($FTGPWTrafficJacketXXXXLQTY); | |
$FTGPWTrafficJacketQTY = strip_tags($FTGPWTrafficJacketQTY); | |
$FTGPWBomberJacketSmallQTY = strip_tags($FTGPWBomberJacketSmallQTY); | |
$FTGPWBomberJacketMediumQTY = strip_tags($FTGPWBomberJacketMediumQTY); | |
$FTGPWBomberJacketLargeQTY = strip_tags($FTGPWBomberJacketLargeQTY); | |
$FTGPWBomberJacketXLQTY = strip_tags($FTGPWBomberJacketXLQTY); | |
$FTGPWBomberJacketXXLQTY = strip_tags($FTGPWBomberJacketXXLQTY); | |
$FTGPWBomberJacketXXXLQTY = strip_tags($FTGPWBomberJacketXXXLQTY); | |
$FTGPWBomberJacketXXXXLQTY = strip_tags($FTGPWBomberJacketXXXXLQTY); | |
$FTGPWBomberJacketQTY = strip_tags($FTGPWBomberJacketQTY); | |
$FTGPWHiVisTrousersQTY = strip_tags($FTGPWHiVisTrousersQTY); | |
$FTGPWTFleeceSmallQTY = strip_tags($FTGPWTFleeceSmallQTY); | |
$FTGPWFleeceMediumQTY = strip_tags($FTGPWFleeceMediumQTY); | |
$FTGPWFleeceLargeQTY = strip_tags($FTGPWFleeceLargeQTY); | |
$FTGPWFleeceXLQTY = strip_tags($FTGPWFleeceXLQTY); | |
$FTGPWFleeceXXLQTY = strip_tags($FTGPWFleeceXXLQTY); | |
$FTGPWFleeceXXXLQTY = strip_tags($FTGPWFleeceXXXLQTY); | |
$FTGPWFleeceXXXXLQTY = strip_tags($FTGPWFleeceXXXXLQTY); | |
$FTGPWFleeceQTY = strip_tags($FTGPWFleeceQTY); | |
$FTGPWCentHardHatQTY = strip_tags($FTGPWCentHardHatQTY); | |
$FTGPWToeCapBootsSize = strip_tags($FTGPWToeCapBootsSize); | |
$FTGPWToeCapBootsQTY = strip_tags($FTGPWToeCapBootsQTY); | |
$FTGPWDewaltBootsSize = strip_tags($FTGPWDewaltBootsSize); | |
$FTGPWDewaltBootsQTY = strip_tags($FTGPWDewaltBootsQTY); | |
$FTGPWLEDHeadTorchQTY = strip_tags($FTGPWLEDHeadTorchQTY); | |
$FTGPWBumpCapQTY = strip_tags($FTGPWBumpCapQTY); | |
$FTGPWBeanieQTY = strip_tags($FTGPWBeanieQTY); | |
$FTGPWEarDefendersQTY = strip_tags($FTGPWEarDefendersQTY); | |
$FTGPWFaceShieldQty = strip_tags($FTGPWFaceShieldQty); | |
$FTGPWGoggleQty = strip_tags($FTGPWGoggleQty); | |
$FTGPWFaceShieldGogglesQTY = strip_tags($FTGPWFaceShieldGogglesQTY); | |
$FTGPWLatexGloveQTY = strip_tags($FTGPWLatexGloveQTY); | |
$FTGPWWellingtonsSize = strip_tags($FTGPWWellingtonsSize); | |
$FTGPWWellingtonsQTY = strip_tags($FTGPWWellingtonsQTY); | |
$FTGPWWorkerIDQTY = strip_tags($FTGPWWorkerIDQTY); | |
$FTGPWHoldallLogoEndsAndMiddleQTY = strip_tags($FTGPWHoldallLogoEndsAndMiddleQTY); | |
$FTGPWHoldallLogoEndsOnlyQTY = strip_tags($FTGPWHoldallLogoEndsOnlyQTY); | |
$FTGPWHoldallQTY = strip_tags($FTGPWHoldallQTY); | |
$FTGPWPVCGloveQTY = strip_tags($FTGPWPVCGloveQTY); | |
$FTGPWPVCGauntletQTY = strip_tags($FTGPWPVCGauntletQTY); | |
$FTGPWPaperRollQTY = strip_tags($FTGPWPaperRollQTY); | |
$FTGPWFirstAid1to10QTY = strip_tags($FTGPWFirstAid1to10QTY); | |
$FTGPWFirstAid11to20QTY = strip_tags($FTGPWFirstAid11to20QTY); | |
$FTGPWFirstAid21to50QTY = strip_tags($FTGPWFirstAid21to50QTY); | |
$FTGPWFirstAidKitQTY = strip_tags($FTGPWFirstAidKitQTY); | |
$FTGPWEyewashQTY = strip_tags($FTGPWEyewashQTY); | |
$FTGPWWadersSize = strip_tags($FTGPWWadersSize); | |
$FTGPWWadersQTY = strip_tags($FTGPWWadersQTY); | |
$FTGPWGrimeEzeQTY = strip_tags($FTGPWGrimeEzeQTY); | |
$FTGPWMedimaxSanisafeQTY = strip_tags($FTGPWMedimaxSanisafeQTY); | |
$FTGPWSafetyGlassesQTY = strip_tags($FTGPWSafetyGlassesQTY); | |
$FTGPWSafetyGogglesQTY = strip_tags($FTGPWSafetyGogglesQTY); | |
$FTGPWTomahawkBootSize = strip_tags($FTGPWTomahawkBootSize); | |
$FTGPWTomahawkBootQTY = strip_tags($FTGPWTomahawkBootQTY); | |
$FTGPWOverShoesQTY = strip_tags($FTGPWOverShoesQTY); | |
$FTGPWWetsuitQTY = strip_tags($FTGPWWetsuitQTY); | |
$FTGPWTailoredShirtsSSQTY = strip_tags($FTGPWTailoredShirtsSSQTY); | |
$FTGPWTailoredShirtsLSQTY = strip_tags($FTGPWTailoredShirtsLSQTY); | |
$FTGPWTChestWadersQTY = strip_tags($FTGPWTChestWadersQTY); | |
$FTGPWNitrileGloveQTY = strip_tags($FTGPWNitrileGloveQTY); | |
$validationFailed = false; | |
# Fields Validations | |
if (!CheckString($FTGContactName, 1, 0, kStringRangeFrom, kNo, kNo, kNo, '', kMandatory)) { | |
$FTGErrorMessage['ContactName'] = 'Please Enter Your Name'; | |
$validationFailed = true; | |
} | |
if (!CheckString($FTGTelephone, 1, 0, kStringRangeFrom, kNo, kNo, kNo, '', kMandatory)) { | |
$FTGErrorMessage['Telephone'] = 'Please Enter A Contact Number'; | |
$validationFailed = true; | |
} | |
if (!CheckEmail($FTGEmail, kMandatory)) { | |
$FTGErrorMessage['Email'] = 'Please Enter A Valid Email Address'; | |
$validationFailed = true; | |
} | |
# Include message in error page and dump it to the browser | |
if ($validationFailed === true) { | |
$errorPage = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Error</title></head><body>Errors found: <!--VALIDATIONERROR--></body></html>'; | |
$errorPage = str_replace('<!--FIELDVALUE:SpecialInstructions-->', $FTGSpecialInstructions, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:Depot-->', $FTGDepot, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:ContactName-->', $FTGContactName, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:Telephone-->', $FTGTelephone, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:Fax-->', $FTGFax, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:Email-->', $FTGEmail, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:DeliveryAddress-->', $FTGDeliveryAddress, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloSmallQTY-->', $FTGPWPoloSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloMediumQTY-->', $FTGPWPoloMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloLargeQTY-->', $FTGPWPoloLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloXLQTY-->', $FTGPWPoloXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloXXLQTY-->', $FTGPWPoloXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloXXXLQTY-->', $FTGPWPoloXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPoloQTY-->', $FTGPWPoloQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtSmallQTY-->', $FTGPWTShirtSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtMediumQTY-->', $FTGPWTShirtMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtLargeQTY-->', $FTGPWTShirtLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtXLQTY-->', $FTGPWTShirtXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtXXLQTY-->', $FTGPWTShirtXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtXXXLQTY-->', $FTGPWTShirtXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTShirtQTY-->', $FTGPWTShirtQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtSmallQTY-->', $FTGPWSweatShirtSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtMediumQTY-->', $FTGPWSweatShirtMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtLargeQTY-->', $FTGPWSweatShirtLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtXLQTY-->', $FTGPWSweatShirtXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtXXLQTY-->', $FTGPWSweatShirtXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtXXXLQTY-->', $FTGPWSweatShirtXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSweatShirtQTY-->', $FTGPWSweatShirtQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:NavyCombatSpecifics-->', $FTGNavyCombatSpecifics, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCombatTrousersQTY-->', $FTGPWCombatTrousersQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallSmallQTY-->', $FTGPWCoverallSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallMediumQTY-->', $FTGPWCoverallMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallLargeQTY-->', $FTGPWCoverallLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallXLQTY-->', $FTGPWCoverallXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallXXLQTY-->', $FTGPWCoverallXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallXXXLQTY-->', $FTGPWCoverallXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCoverallXXXXLQTY-->', $FTGPWCoverallXXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWHiVisJacketQTY-->', $FTGPWHiVisJacketQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketSmallQTY-->', $FTGPWTrafficJacketSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketMediumQTY-->', $FTGPWTrafficJacketMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketLargeQTY-->', $FTGPWTrafficJacketLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketXLQTY-->', $FTGPWTrafficJacketXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketXXLQTY-->', $FTGPWTrafficJacketXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketXXXLQTY-->', $FTGPWTrafficJacketXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketXXXXLQTY-->', $FTGPWTrafficJacketXXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTrafficJacketQTY-->', $FTGPWTrafficJacketQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketSmallQTY-->', $FTGPWBomberJacketSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketMediumQTY-->', $FTGPWBomberJacketMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketLargeQTY-->', $FTGPWBomberJacketLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketXLQTY-->', $FTGPWBomberJacketXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketXXLQTY-->', $FTGPWBomberJacketXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketXXXLQTY-->', $FTGPWBomberJacketXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketXXXXLQTY-->', $FTGPWBomberJacketXXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBomberJacketQTY-->', $FTGPWBomberJacketQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWHiVisTrousersQTY-->', $FTGPWHiVisTrousersQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTFleeceSmallQTY-->', $FTGPWTFleeceSmallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceMediumQTY-->', $FTGPWFleeceMediumQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceLargeQTY-->', $FTGPWFleeceLargeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceXLQTY-->', $FTGPWFleeceXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceXXLQTY-->', $FTGPWFleeceXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceXXXLQTY-->', $FTGPWFleeceXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceXXXXLQTY-->', $FTGPWFleeceXXXXLQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFleeceQTY-->', $FTGPWFleeceQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWCentHardHatQTY-->', $FTGPWCentHardHatQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWToeCapBootsSize-->', $FTGPWToeCapBootsSize, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWToeCapBootsQTY-->', $FTGPWToeCapBootsQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWDewaltBootsSize-->', $FTGPWDewaltBootsSize, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWDewaltBootsQTY-->', $FTGPWDewaltBootsQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWLEDHeadTorchQTY-->', $FTGPWLEDHeadTorchQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBumpCapQTY-->', $FTGPWBumpCapQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWBeanieQTY-->', $FTGPWBeanieQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWEarDefendersQTY-->', $FTGPWEarDefendersQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFaceShieldQty-->', $FTGPWFaceShieldQty, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWGoggleQty-->', $FTGPWGoggleQty, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFaceShieldGogglesQTY-->', $FTGPWFaceShieldGogglesQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWLatexGloveQTY-->', $FTGPWLatexGloveQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWellingtonsSize-->', $FTGPWWellingtonsSize, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWellingtonsQTY-->', $FTGPWWellingtonsQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWorkerIDQTY-->', $FTGPWWorkerIDQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWHoldallLogoEndsAndMiddleQTY-->', $FTGPWHoldallLogoEndsAndMiddleQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWHoldallLogoEndsOnlyQTY-->', $FTGPWHoldallLogoEndsOnlyQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWHoldallQTY-->', $FTGPWHoldallQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPVCGloveQTY-->', $FTGPWPVCGloveQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPVCGauntletQTY-->', $FTGPWPVCGauntletQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWPaperRollQTY-->', $FTGPWPaperRollQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFirstAid1to10QTY-->', $FTGPWFirstAid1to10QTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFirstAid11to20QTY-->', $FTGPWFirstAid11to20QTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFirstAid21to50QTY-->', $FTGPWFirstAid21to50QTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWFirstAidKitQTY-->', $FTGPWFirstAidKitQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWEyewashQTY-->', $FTGPWEyewashQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWadersSize-->', $FTGPWWadersSize, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWadersQTY-->', $FTGPWWadersQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWGrimeEzeQTY-->', $FTGPWGrimeEzeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWMedimaxSanisafeQTY-->', $FTGPWMedimaxSanisafeQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSafetyGlassesQTY-->', $FTGPWSafetyGlassesQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWSafetyGogglesQTY-->', $FTGPWSafetyGogglesQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTomahawkBootSize-->', $FTGPWTomahawkBootSize, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTomahawkBootQTY-->', $FTGPWTomahawkBootQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWOverShoesQTY-->', $FTGPWOverShoesQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWWetsuitQTY-->', $FTGPWWetsuitQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTailoredShirtsSSQTY-->', $FTGPWTailoredShirtsSSQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTailoredShirtsLSQTY-->', $FTGPWTailoredShirtsLSQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWTChestWadersQTY-->', $FTGPWTChestWadersQTY, $errorPage); | |
$errorPage = str_replace('<!--FIELDVALUE:PWNitrileGloveQTY-->', $FTGPWNitrileGloveQTY, $errorPage); | |
$errorPage = str_replace('<!--ERRORMSG:ContactName-->', $FTGErrorMessage['ContactName'], $errorPage); | |
$errorPage = str_replace('<!--ERRORMSG:Telephone-->', $FTGErrorMessage['Telephone'], $errorPage); | |
$errorPage = str_replace('<!--ERRORMSG:Email-->', $FTGErrorMessage['Email'], $errorPage); | |
$errorList = @implode("<br />\n", $FTGErrorMessage); | |
$errorPage = str_replace('<!--VALIDATIONERROR-->', $errorList, $errorPage); | |
echo $errorPage; | |
} | |
if ( $validationFailed === false ) { | |
# Email to Form Owner | |
$emailSubject = FilterCChars("Order from Lanes Online"); | |
$emailBody = "Special Instructions : $FTGSpecialInstructions\r\n" | |
. "Depot : $FTGDepot\r\n" | |
. "Contact Name : $FTGContactName\r\n" | |
. "Telephone : $FTGTelephone\r\n" | |
. "Fax : $FTGFax\r\n" | |
. "Email : $FTGEmail\r\n"; | |
$emailBody .= (empty($FTGDeliveryAddress) ?: "Delivery Address : $FTGDeliveryAddress\r\n"); | |
$emailBody .= (empty($FTGPWPoloSmallQTY) ?: "PW Polo Small QTY : $FTGPWPoloSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloMediumQTY) ?: "PW Polo Medium QTY : $FTGPWPoloMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloLargeQTY) ?: "PW Polo Large QTY : $FTGPWPoloLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloXLQTY) ?: "PW Polo XL QTY : $FTGPWPoloXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloXXLQTY) ?: "PW Polo XXL QTY : $FTGPWPoloXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloXXXLQTY) ?: "PW Polo XXXL QTY : $FTGPWPoloXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWPoloQTY) ?: "PW Polo QTY : $FTGPWPoloQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtSmallQTY) ?: "PW TShirt Small QTY : $FTGPWTShirtSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtMediumQTY) ?: "PW TShirt Medium QTY : $FTGPWTShirtMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtLargeQTY) ?: "PW TShirt Large QTY : $FTGPWTShirtLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtXLQTY) ?: "PW TShirt XL QTY : $FTGPWTShirtXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtXXLQTY) ?: "PW TShirt XXL QTY : $FTGPWTShirtXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtXXXLQTY) ?: "PW TShirt XXXL QTY : $FTGPWTShirtXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTShirtQTY) ?: "PW TShirt QTY : $FTGPWTShirtQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtSmallQTY) ?: "PW Sweat Shirt Small QTY : $FTGPWSweatShirtSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtMediumQTY) ?: "PW Sweat Shirt Medium QTY : $FTGPWSweatShirtMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtLargeQTY) ?: "PW Sweat Shirt Large QTY : $FTGPWSweatShirtLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtXLQTY) ?: "PW Sweat Shirt XL QTY : $FTGPWSweatShirtXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtXXLQTY) ?: "PW Sweat Shirt XXL QTY : $FTGPWSweatShirtXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtXXXLQTY) ?: "PW Sweat Shirt XXXL QTY : $FTGPWSweatShirtXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWSweatShirtQTY) ?: "PW Sweat Shirt QTY : $FTGPWSweatShirtQTY\r\n"); | |
$emailBody .= (empty($FTGNavyCombatSpecifics) ?: "PW Navy Combat Specifics : $FTGNavyCombatSpecifics\r\n"); | |
$emailBody .= (empty($FTGPWCombatTrousersQTY) ?: "PW Combat Trousers QTY : $FTGPWCombatTrousersQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallSmallQTY) ?: "PW Coverall Small QTY : $FTGPWCoverallSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallMediumQTY) ?: "PW Coverall Medium QTY : $FTGPWCoverallMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallLargeQTY) ?: "PW Coverall Large QTY : $FTGPWCoverallLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallXLQTY) ?: "PW Coverall XL QTY : $FTGPWCoverallXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallXXLQTY) ?: "PW Coverall XXL QTY : $FTGPWCoverallXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallXXXLQTY) ?: "PW Coverall XXXL QTY : $FTGPWCoverallXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWCoverallXXXXLQTY) ?: "PW Coverall XXXXL QTY : $FTGPWCoverallXXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWHiVisJacketQTY) ?: "PW Hi Vis Jacket QTY : $FTGPWHiVisJacketQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketSmallQTY) ?: "PW Traffic Jacket Small QTY : $FTGPWTrafficJacketSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketMediumQTY) ?: "PW Traffic Jacket Medium QTY : $FTGPWTrafficJacketMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketLargeQTY) ?: "PW Traffic Jacket Large QTY : $FTGPWTrafficJacketLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketXLQTY) ?: "PW Traffic Jacket XL QTY : $FTGPWTrafficJacketXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketXXLQTY) ?: "PW Traffic Jacket XXL QTY : $FTGPWTrafficJacketXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketXXXLQTY) ?: "PW Traffic Jacket XXXL QTY : $FTGPWTrafficJacketXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketXXXXLQTY) ?: "PW Traffic Jacket XXXXL QTY : $FTGPWTrafficJacketXXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWTrafficJacketQTY) ?: "PW Traffic Jacket QTY : $FTGPWTrafficJacketQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketSmallQTY) ?: "PW Bomber Jacket Small QTY : $FTGPWBomberJacketSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketMediumQTY) ?: "PW Bomber Jacket Medium QTY : $FTGPWBomberJacketMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketLargeQTY) ?: "PW Bomber Jacket Large QTY : $FTGPWBomberJacketLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketXLQTY) ?: "PW Bomber Jacket XL QTY : $FTGPWBomberJacketXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketXXLQTY) ?: "PW Bomber Jacket XXL QTY : $FTGPWBomberJacketXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketXXXLQTY) ?: "PW Bomber Jacket XXXL QTY : $FTGPWBomberJacketXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketXXXXLQTY) ?: "PW Bomber Jacket XXXXL QTY : $FTGPWBomberJacketXXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWBomberJacketQTY) ?: "PW Bomber Jacket QTY : $FTGPWBomberJacketQTY\r\n"); | |
$emailBody .= (empty($FTGPWHiVisTrousersQTY) ?: "PW Hi Vis Trousers QTY : $FTGPWHiVisTrousersQTY\r\n"); | |
$emailBody .= (empty($FTGPWTFleeceSmallQTY) ?: "PW Fleece Small QTY : $FTGPWTFleeceSmallQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceMediumQTY) ?: "PW Fleece Medium QTY : $FTGPWFleeceMediumQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceLargeQTY) ?: "PW Fleece Large QTY : $FTGPWFleeceLargeQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceXLQTY) ?: "PW Fleece XL QTY : $FTGPWFleeceXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceXXLQTY) ?: "PW Fleece XXL QTY : $FTGPWFleeceXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceXXXLQTY) ?: "PW Fleece XXXL QTY : $FTGPWFleeceXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceXXXXLQTY) ?: "PW Fleece XXXXL QTY : $FTGPWFleeceXXXXLQTY\r\n"); | |
$emailBody .= (empty($FTGPWFleeceQTY) ?: "PW Fleece QTY : $FTGPWFleeceQTY\r\n"); | |
$emailBody .= (empty($FTGPWCentHardHatQTY) ?: "PW Cent Hard Hat QTY : $FTGPWCentHardHatQTY\r\n"); | |
$emailBody .= (empty($FTGPWToeCapBootsSize) ?: "PW Toe Cap Boots Size : $FTGPWToeCapBootsSize\r\n"); | |
$emailBody .= (empty($FTGPWToeCapBootsQTY) ?: "PW Toe Cap Boots QTY : $FTGPWToeCapBootsQTY\r\n"); | |
$emailBody .= (empty($FTGPWDewaltBootsSize) ?: "PW Dewalt Boots Size : $FTGPWDewaltBootsSize\r\n"); | |
$emailBody .= (empty($FTGPWDewaltBootsQTY) ?: "PW Dewalt Boots QTY : $FTGPWDewaltBootsQTY\r\n"); | |
$emailBody .= (empty($FTGPWLEDHeadTorchQTY) ?: "PW LEDHead Torch QTY : $FTGPWLEDHeadTorchQTY\r\n"); | |
$emailBody .= (empty($FTGPWBumpCapQTY) ?: "PW Bump Cap QTY : $FTGPWBumpCapQTY\r\n"); | |
$emailBody .= (empty($FTGPWBeanieQTY) ?: "PW Beanie QTY : $FTGPWBeanieQTY\r\n"); | |
$emailBody .= (empty($FTGPWEarDefendersQTY) ?: "PW Ear Defenders QTY : $FTGPWEarDefendersQTY\r\n"); | |
$emailBody .= (empty($FTGPWFaceShieldQty) ?: "PW Face Shield Qty : $FTGPWFaceShieldQty\r\n"); | |
$emailBody .= (empty($FTGPWGoggleQty) ?: "PW Goggle Qty : $FTGPWGoggleQty\r\n"); | |
$emailBody .= (empty($FTGPWFaceShieldGogglesQTY) ?: "PW Face Shield Goggles QTY : $FTGPWFaceShieldGogglesQTY\r\n"); | |
$emailBody .= (empty($FTGPWLatexGloveQTY) ?: "PW Latex Glove QTY : $FTGPWLatexGloveQTY\r\n"); | |
$emailBody .= (empty($FTGPWWellingtonsSize) ?: "PW Wellingtons Size : $FTGPWWellingtonsSize\r\n"); | |
$emailBody .= (empty($FTGPWWellingtonsQTY) ?: "PW Wellingtons QTY : $FTGPWWellingtonsQTY\r\n"); | |
$emailBody .= (empty($FTGPWWorkerIDQTY) ?: "PW Worker ID QTY : $FTGPWWorkerIDQTY\r\n"); | |
$emailBody .= (empty($FTGPWHoldallLogoEndsAndMiddleQTY) ?: "PW Holdall Logo Ends And Middle QTY : $FTGPWHoldallLogoEndsAndMiddleQTY\r\n"); | |
$emailBody .= (empty($FTGPWHoldallLogoEndsOnlyQTY) ?: "PW Holdall Logo Ends Only QTY : $FTGPWHoldallLogoEndsOnlyQTY\r\n"); | |
$emailBody .= (empty($FTGPWHoldallQTY) ?: "PW Holdall QTY : $FTGPWHoldallQTY\r\n"); | |
$emailBody .= (empty($FTGPWPVCGloveQTY) ?: "PW PVC Glove QTY : $FTGPWPVCGloveQTY\r\n"); | |
$emailBody .= (empty($FTGPWPVCGauntletQTY) ?: "PW PVC Gauntlet QTY : $FTGPWPVCGauntletQTY\r\n"); | |
$emailBody .= (empty($FTGPWPaperRollQTY) ?: "PW Paper Roll QTY : $FTGPWPaperRollQTY\r\n"); | |
$emailBody .= (empty($FTGPWFirstAid1to10QTY) ?: "PW First Aid 1 to10 QTY : $FTGPWFirstAid1to10QTY\r\n"); | |
$emailBody .= (empty($FTGPWFirstAid11to20QTY) ?: "PW First Aid 11 to20 QTY : $FTGPWFirstAid11to20QTY\r\n"); | |
$emailBody .= (empty($FTGPWFirstAid21to50QTY) ?: "PW First Aid 21 to50 QTY : $FTGPWFirstAid21to50QTY\r\n"); | |
$emailBody .= (empty($FTGPWFirstAidKitQTY) ?: "PW First Aid Kit QTY : $FTGPWFirstAidKitQTY\r\n"); | |
$emailBody .= (empty($FTGPWEyewashQTY) ?: "PW Eyewash QTY : $FTGPWEyewashQTY\r\n"); | |
$emailBody .= (empty($FTGPWWadersSize) ?: "PW Waders Size : $FTGPWWadersSize\r\n"); | |
$emailBody .= (empty($FTGPWWadersQTY) ?: "PW Waders QTY : $FTGPWWadersQTY\r\n"); | |
$emailBody .= (empty($FTGPWGrimeEzeQTY) ?: "PW Grime Eze QTY : $FTGPWGrimeEzeQTY\r\n"); | |
$emailBody .= (empty($FTGPWMedimaxSanisafeQTY) ?: "PW Medimax Sanisafe QTY : $FTGPWMedimaxSanisafeQTY\r\n"); | |
$emailBody .= (empty($FTGPWSafetyGlassesQTY) ?: "PW Safety Glasses QTY : $FTGPWSafetyGlassesQTY\r\n"); | |
$emailBody .= (empty($FTGPWSafetyGogglesQTY) ?: "PW Safety Goggles QTY : $FTGPWSafetyGogglesQTY\r\n"); | |
$emailBody .= (empty($FTGPWTomahawkBootSize) ?: "PW Tomahawk Boot Size : $FTGPWTomahawkBootSize\r\n"); | |
$emailBody .= (empty($FTGPWTomahawkBootQTY) ?: "PW Tomahawk Boot QTY : $FTGPWTomahawkBootQTY\r\n"); | |
$emailBody .= (empty($FTGPWOverShoesQTY) ?: "PW Over Shoes QTY : $FTGPWOverShoesQTY\r\n"); | |
$emailBody .= (empty($FTGPWWetsuitQTY) ?: "PW Wetsuit QTY : $FTGPWWetsuitQTY\r\n"); | |
$emailBody .= (empty($FTGPWTailoredShirtsSSQTY) ?: "PW Tailored Shirts SS QTY : $FTGPWTailoredShirtsSSQTY\r\n"); | |
$emailBody .= (empty($FTGPWTailoredShirtsLSQTY) ?: "PW Tailored Shirts LS QTY : $FTGPWTailoredShirtsLSQTY\r\n"); | |
$emailBody .= (empty($FTGPWTChestWadersQTY) ?: "PW Chest Waders QTY : $FTGPWTChestWadersQTY\r\n"); | |
$emailBody .= (empty($FTGPWNitrileGloveQTY) ?: "PW Nitrile Glove QTY : $FTGPWNitrileGloveQTY\r\n"); | |
$emailTo = '[email protected]'; | |
$emailFrom = FilterCChars("$FTGEmail"); | |
$emailHeader = "From: $emailFrom\r\n" | |
. "MIME-Version: 1.0\r\n" | |
. "Content-type: text/plain; charset=\"UTF-8\"\r\n" | |
. "Content-transfer-encoding: 8bit\r\n"; | |
mail($emailTo, $emailSubject, $emailBody, $emailHeader); | |
# Confirmation Email to User | |
$confEmailTo = FilterCChars($FTGEmail); | |
$confEmailSubject = FilterCChars("Thank You For Your Order"); | |
$confEmailBody = "Thank you for your order, we will be in touch as soon as possible.\r\n" | |
. "\r\n" | |
. "regards\r\n" | |
. "The SIM Team."; | |
$confEmailHeader = "From: [email protected]\r\n" | |
. "MIME-Version: 1.0\r\n" | |
. "Content-type: text/plain; charset=\"UTF-8\"\r\n" | |
. "Content-transfer-encoding: 8bit\r\n"; | |
mail($confEmailTo, $confEmailSubject, $confEmailBody, $confEmailHeader); | |
# Redirect user to success page | |
header("Location: http://www.safetyindustrial.co.uk/thankyou.html"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment