rendered paste body<?php include ('includes/header.php');?><title>Haven House - Order</title><?php include ('includes/metajavacss.php');?><style type="text/css" media="screen">div#content{ margin-left: 0px;}.errorbox { border: 2px !important; border-style: solid !important; border-color: #c33 !important;}label { display: block; width: 8em; clear: left; text-align:left;}label, fieldset input, span { float: left; margin-top: 1em;}fieldset { margin-bottom:1em;}input { border: 1px; border-style: solid; border-color: #000;}input[type="submit"] { float: right; margin-right: 1em; background-color:#fff;}input[type="text"] { padding-left: .2em; padding-right: .2em;}select { float: left; margin-top:1em;}address, .send { margin-left: 1em;}</style><?php include ('includes/bgnav.php');?><div class="myBox" id="body"><div id="content"><div><?php if ($cdone ==true) {$errorCardHolder=false;$errorCreditCardType=false;$errorCreditCardNum=false;$errorExpireM=false;$errorExpireY=false;if($creditCardType=="none"){$errorcreditCardType=true; $errorFlag=true;}if($expireM=="none"){$errorExpireM=true; $errorFlag=true;}if($expireY=="none"){$errorExpireY=true; $errorFlag=true;}if(!$creditCardNum) {$errorCreditCardNum=true; $errorFlag=true;}if(!$cardHolder) {$errorCardHolder=true; $errorFlag=true;}$pattern="[0-9]";if(!eregi($pattern,$cardHolder)){$errorCardHolder=true; $errorFlag=true;}$pattern="[2-9][0-9]{15}";if(!eregi($pattern,$creditCardNum)){$errorCreditCardNum = true; $errorFlag = true;}if($errorFlag==true){?><form action="formhandler2.php" method="post"><fieldset><legend>Payment Information</legend><label for="cardHolder">Card Holder</label> <input type="text" name="cardHolder" id="cardHolder" tabindex="1" maxlength="30" size="33" value="<?php echo $cardHolder;?>" class="<?php if ($errorCardHolder==true){echo "errorbox";}?>"/><label for="creditCardType">Credit Card: </label><select id="creditCardType" name="creditCardType" tabindex="2" class="<?php if($errorCreditCardType==true) {echo "errorbox";} ?>" value="<?php echo $creditCardType; ?>"><option value="none" <?php if ($creditcardType=="none") {echo "selected"; } ?>>--Choose One--</option><option value="visa" <?php if ($creditcardType=="visa") {echo "selected"; } ?>>Visa</option><option value="mc" <?php if ($creditcardType=="mc") {echo "selected"; } ?>>Master Card</option><option value="amex" <?php if ($creditcardType=="amex") {echo "selected"; } ?>>American Express</option></select> <label for="creditCardNum">Credit Card Number: </label><input type="text" id="creditCardNum" name="creditCardNum" tabindex="3" maxlength="16" size="19" value="<?php echo $creditCardNum;?>" class="<?php if ($errorCreditCardNum==true){echo "errorbox";}?>"/><label for="expireM">Expiration Date: </label><select id="expireM" name="expireM" tabindex="4" class="<?php if($errorExpireM==true) {echo "errorbox";} ?>" value="<?php echo $expireM; ?>"><option value="none" <?php if ($expireM=="none") {echo "selected"; } ?>>--please select a month--</option><option value="01" <?php if ($expireM=="01") {echo "selected"; } ?>>01</option><option value="02" <?php if ($expireM=="02") {echo "selected"; } ?>>02</option><option value="03" <?php if ($expireM=="03") {echo "selected"; } ?>>03</option><option value="04" <?php if ($expireM=="04") {echo "selected"; } ?>>04</option><option value="05" <?php if ($expireM=="05") {echo "selected"; } ?>>05</option><option value="06" <?php if ($expireM=="06") {echo "selected"; } ?>>06</option><option value="07" <?php if ($expireM=="07") {echo "selected"; } ?>>07</option><option value="08" <?php if ($expireM=="08") {echo "selected"; } ?>>08</option><option value="09" <?php if ($expireM=="09") {echo "selected"; } ?>>09</option><option value="10" <?php if ($expireM=="10") {echo "selected"; } ?>>10</option><option value="11" <?php if ($expireM=="11") {echo "selected"; } ?>>11</option><option value="12" <?php if ($expireM=="12") {echo "selected"; } ?>>12</option></select><select id="expireY" name="expireY" tabindex="5" class="<?php if($errorExpireY==true) {echo "errorbox";} ?>" value="<?php echo $expireY; ?>"><option value="none" <?php if ($expireY=="none") {echo "selected"; } ?>>--please select a year--</option><option value="07" <?php if ($expireY=="07") {echo "selected"; } ?>>07</option><option value="08" <?php if ($expireY=="08") {echo "selected"; } ?>>08</option><option value="09" <?php if ($expireY=="09") {echo "selected"; } ?>>09</option><option value="10" <?php if ($expireY=="10") {echo "selected"; } ?>>10</option><option value="11" <?php if ($expireY=="11") {echo "selected"; } ?>>11</option><option value="12" <?php if ($expireY=="12") {echo "selected"; } ?>>12</option><option value="13" <?php if ($expireY=="13") {echo "selected"; } ?>>13</option><option value="14" <?php if ($expireY=="14") {echo "selected"; } ?>>14</option><option value="15" <?php if ($expireY=="15") {echo "selected"; } ?>>15</option><option value="16" <?php if ($expireY=="16") {echo "selected"; } ?>>16</option></select><input type="hidden" name="cdone" value="true"/><input type="hidden" value="<?php echo $firstName; ?>" name="firstName" /><input type="hidden" value="<?php echo $lastName; ?>" name="lastName"/><input type="hidden" value="<?php echo $address; ?>" name="address" /><input type="hidden" value="<?php echo $address2; ?>" name="address2" /><input type="hidden" value="<?php echo $city; ?>" name="city" /><input type="hidden" value="<?php echo $province; ?>" name="province" /><input type="hidden" value="<?php echo $postalCode; ?>" name="postalCode" /><input type="hidden" value="<?php echo $phoneArea; ?>" name="phoneArea" /><input type="hidden" value="<?php echo $trimPhoneNumber; ?>" name="trimPhoneNumber" /><input type="hidden" value="<?php echo $eMail; ?>" name="eMail"/><input type="hidden" value="<?php echo $firstNameB; ?>" name="firstNameB" /><input type="hidden" value="<?php echo $lastNameB; ?>" name="lastNameB"/><input type="hidden" value="<?php echo $addressB; ?>" name="addressB" /><input type="hidden" value="<?php echo $address2B; ?>" name="address2B" /><input type="hidden" value="<?php echo $cityB; ?>" name="cityB" /><input type="hidden" value="<?php echo $provinceB; ?>" name="provinceB" /><input type="hidden" value="<?php echo $postalCodeB; ?>" name="postalCodeB" /><input type="hidden" value="<?php echo $phoneAreaB; ?>" name="phoneAreaB"/><input type="hidden" value="<?php echo $trimPhoneNumberB; ?>" name="trimPhoneNumberB"/><input type="hidden" value="<?php echo $eMailB; ?>" name="eMailB"/><label id="submitthinger"></label><input type="submit" value="Submit"/></form></fieldset><?php }else{ ?><fieldset><p>Hello, <?php echo ucwords($firstName.' '.$lastName); ?>. Thank you for ordering from Haven House. Your order will by delivered in 5-9 days.</p><p><?php if ($bill==true) {$firstNameB=$firstName; $lastNameB=$lastName; $addressB=$address; $address2B=$address2; $cityB=$city; $postalCodeB=$postalCode; $phoneAreaB=$phoneArea; $trimPhoneNumberB=$trimPhoneNumber; $provinceB=$province; $eMailB=$eMail;}?><fieldset><legend>Shipping Information</legend><p><?php echo ucwords($firstName.' '.$lastName); ?></p><p><?php echo ($address.' '.$address2); ?></p><p><?php echo $city.' '.$province; ?>, Canada</p><p><?php echo strtoupper($postalCode);?></p><p>(<?php echo $phoneArea.') '.$trimPhoneNumber;?></p><p><?php echo $eMail; ?></p></fieldset><fieldset><legend>Billing Information</legend><p><?php echo ucwords($firstNameB.' '.$lastNameB); ?></p><p><?php echo ($addressB.' '.$address2B); ?></p><p><?php echo $cityB.' '.$provinceB; ?>, Canada</p><p><?php echo strtoupper($postalCodeB);?></p><p>(<?php echo $phoneAreaB.') '.$trimPhoneNumberB;?></p><p><?php echo $eMailB; ?></p></fieldset><fieldset><legend>Payment Information</legend><p><?php echo ucwords($cardHolder); ?></p><p>Credit Card:<?php echo strtoupper($creditCardType); ?></p><p><?php echo ($creditCardNum); ?></p><p>Expiration Date: <?php echo ($expireM.'/'.$expireY); ?></p></fieldset><?php$myConnection=mysql_connect('coldfusion.ict.sait.ca','user','user')or trigger_error(mysql_error(),E_USER_ERROR);$insert="INSERT INTO customerinfo (customerBillingFirstName , customerBillingLastName,customerBillingAddress1 ,customerBillingAddress2,customerBillingCity ,customerBillingPostalCode ,customerBillingProvince , customerBillingPhoneNoAreaCode , customerBillingPhoneNo , customerBillingeMailAddress , customerShippingFirstName , customerShippingLastName , customerShippingAddress1 , customerShippingAddress2,customerShippingCity,customerShippingProvince , customerShippingPostalCode , customerShippingPhoneNoAreaCode , customerShippingPhoneNo, customerShippingeMailAddress,cardType,cardHolder,cardNo , cardSecNo , cardExpiryMonth , cardExpiryYear) VALUES('$firstNameB','$lastNameB','$addressB','$address2B','$cityB','$postalCodeB','$provinceB','$phoneAreaB','$trimPhoneNumberB','$eMailB','$firstName','$lastName','$address','$address2','$city','$province','$postalCode','$phoneArea','$trimPhoneNumber','$eMail','$creditCardType','$cardHolder','$creditCardNum','','$expireM','$expireY')";mysql_select_db('mmda322b',$myConnection);$enterInfo=mysql_query($insert,$myConnection) or die(mysql_error());?><p style="text-align:right;"><a href="shop.php">Return to shop</a></p></fieldset><?php } ?><?php } ?><?php if($billb == true){$errorFirstNameB = false;$errorLastNameB = false;$errorAddressB = false;$errorCityB = false;$errorProvinceB = false;$errorPostalCodeB = false;$errorPhoneAreaB = false;$errorPhoneNumberB = false;$erroreMailB = false;$errorFlagB = false;if(!$firstNameB) {$errorFirstNameB=true; $errorFlag=true;}if(!$lastNameB) {$errorLastNameB=true; $errorFlag=true;}if(!$addressB) {$errorAddressB=true; $errorFlag=true;}if(!$cityB) {$errorCityB=true; $errorFlag=true;}if(!$postalCodeB) {$errorPostalCodeB=true; $errorFlag=true;}if(!$phoneAreaB) {$errorPhoneAreaB=true; $errorFlag=true;}if(!$phoneNumberB) {$errorPhoneNumberB=true; $errorFlag=true;}if(!$eMailB) {$erroreMailB=true; $errorFlag=true;}if( $provinceB=="none"){$errorProvinceB=true; $errorFlag=true;}$pattern = "[0-9]";if(eregi($pattern,$firstNameB)){$errorFirstNameB = true; $errorFlag = true;}if(eregi($pattern,$lastNameB)){$errorLastNameB = true; $errorFlag = true;}if(eregi($pattern,$cityB)){$errorCityB = true; $errorFlag = true;}$pattern="[a-z][0-9][a-z][0-9][a-z][0-9]";$trimPostalCode=str_replace(" ","",$postalCodeB);$trimPostalCode=str_replace("-","",$trimPostalCodeB);if(!eregi($pattern,$trimPostalCodeB)){$errorPostalCodeB=true; $errorFlag=true;}$trimPhoneNumberB = str_replace("-","", $phoneNumberB);$trimPhoneNumberB = str_replace(" ","", $trimPhoneNumberB);$pattern = "[2-9][0-9]{2}";if(!eregi($pattern,$phoneAreaB)){$errorPhoneAreaB = true; $errorFlag = true;}$pattern = "[2-9][0-9]{6}";if(!eregi($pattern,$trimPhoneNumberB)){$errorPhoneNumberB = true; $errorFlag = true;}$pattern = "[a-z]";if (!eregi($pattern, $cityB)) { $errorflag = true; $errorCityB = true;}$pattern="[@]";if(!eregi($pattern, $eMailB)){$erroreMailB = true; $errorFlag = true;}if($errorFlag==true){?><p>You have filled the form out incorrectly.</p><form action="formhandler2.php" method="post"><fieldset><legend>Billing Information</legend><label for="firstName">First Name</label><input type="text" name="firstNameB" tabindex="1" id="firstNameB" value="<?php echo $firstName; ?>" class="<?php if($errorFirstName==true) {echo "errorbox";}?>"/><label for="lastName">Last Name</label><input type="text" name="lastNameB" tabindex="2" id="lastNameB" value="<?php echo $lastName; ?>" class="<?php if($errorLastName==true) {echo "errorbox";}?>" /> <label for="address">Address 1</label> <input name="addressB" type="text" id="addressB" tabindex="3" size="50" maxlength="53" value="<?php echo $address; ?>" class="<?php if($errorAddress==true) {echo "errorbox";}?>"/> <label for="address2">Address 2</label> <input name="address2B" type="text" id="address2B" tabindex="4" size="50" maxlength="53" value="<?php echo $address2; ?>" /> <label for="city">City</label> <input type="text" name="cityB" tabindex="5" id="cityB" value="<?php echo $city; ?>" class="<?php if($errorCity==true) {echo "errorbox";}?>"/><label for="province">Province</label><select id="provinceB" name="provinceB" tabindex="6" class="<?php if($errorProvinceB==true) {echo "errorbox";} ?>" value="<?php echo $provinceB; ?>"><option value="none" <?php if ($provinceB=="none") {echo "selected"; } ?> >--please select a province--</option><option value="AB" <?php if ($provinceB=="AB") {echo "selected"; } ?>>Alberta</option><option value="BC" <?php if ($provinceB=="BC") {echo "selected"; } ?>>British Columbia</option><option value="MB" <?php if ($provinceB=="MB") {echo "selected"; } ?>>Manitoba</option><option value="NB" <?php if ($provinceB=="NB") {echo "selected"; } ?>>New Brunswick</option><option value="NL" <?php if ($provinceB=="NL") {echo "selected"; } ?>>Newfoundland</option><option value="NS" <?php if ($provinceB=="NS") {echo "selected"; } ?>>Nova Scotia</option><option value="NT" <?php if ($provinceB=="NT") {echo "selected"; } ?>>Northwest Territories</option><option value="NU" <?php if ($provinceB=="NU") {echo "selected"; } ?>>Nunavut</option><option value="ON" <?php if ($provinceB=="ON") {echo "selected"; } ?>>Ontario</option><option value="PE" <?php if ($provinceB=="PE") {echo "selected"; } ?>>Prince Edward Island</option><option value="QC" <?php if ($provinceB=="QC") {echo "selected"; } ?>>Quebec</option><option value="SK" <?php if ($provinceB=="SK") {echo "selected"; } ?>>Saskatechewan</option><option value="YT" <?php if ($provinceB=="YT") {echo "selected"; } ?>>Yukon</option></select> <label for="postalCode">Postal Code</label> <input type="text" name="postalCodeB" tabindex="7" id="postalCodeB" value="<?php echo $postalCode; ?>" class="<?php if($errorPostalCode == true) {echo "errorbox";} ?>"/> <label for="phone">Phone Number </label> <span>(</span> <input name="phoneAreaB" type="text" id="phoneAreaB" tabindex="8" size="5" maxlength="3" value="<?php echo $phoneArea; ?>" class="<?php if($errorPhoneArea == true) {echo "errorbox";} ?>"/> <span> ) </span> <input name="phoneNumberB" type="text" id="phoneNumberB" tabindex="9" size="10" maxlength="8" value="<?php echo $phoneNumber; ?>" class="<?php if($errorPhoneNumber == true) {echo "errorbox";} ?>"/> <label for="eMail">eMail</label> <input name="eMailB" type="text" id="eMailB" tabindex="10" size="53" maxlength="50" value="<?php echo $eMail; ?>" class="<?php if($erroreMail==true) {echo "errorbox";}?>"/><input type="hidden" value="<?php echo $firstName; ?>" name="firstName" /><input type="hidden" value="<?php echo $lastName; ?>" name="lastName"/><input type="hidden" value="<?php echo $address; ?>" name="address" /><input type="hidden" value="<?php echo $address2; ?>" name="address2" /><input type="hidden" value="<?php echo $city; ?>" name="city" /><input type="hidden" value="<?php echo $province; ?>" name="province" /><input type="hidden" value="<?php echo $postalCode; ?>" name="postalCode" /><input type="hidden" value="<?php echo $phoneArea; ?>" name="phoneArea" /><input type="hidden" value="<?php echo $trimPhoneNumber; ?>" name="trimPhoneNumber" /><input type="hidden" value="<?php echo $eMail; ?>" name="eMail"/><label id="submitthinger"></label><input type="submit" value="Submit"/></form><?php } else { ?><form action="formhandler2.php" method="post"><fieldset><legend>Billing Information</legend><label for="firstName">First Name</label> <input type="text" name="firstNameB" id="firstNameB" tabindex="1" maxlength="30" size="33"/><label for="lastName">Last Name</label> <input type="text" name="lastNameB" id="lastNameB" tabindex="2" maxlength="30" size="33"/><label for="address">Address 1</label><input name="addressB" type="text" id="addressB" tabindex="3" size="50" maxlength="53"/><label for="address2">Address 2</label><input name="address2B" type="text" id="address2B" tabindex="4" size="50" maxlength="53"/><label>City:</label> <input type="text" name="cityB" id="cityB" tabindex="6" maxlength="30" size="33" value="Calgary"/><label for="province">Province</label><select id="provinceB" name="provinceB" tabindex="7" ><option value="none" selected>--please select a province--</option><option value="AB">Alberta</option><option value="BC">British Columbia</option><option value="MB">Manitoba</option><option value="NB">New Brunswick</option><option value="NL">Newfoundland</option><option value="NS">Nova Scotia</option><option value="NT">Northwest Territories</option><option value="NU">Nunavut</option><option value="ON">Ontario</option><option value="PE">Prince Edward Island</option><option value="QC">Quebec</option><option value="SK">Saskatchewan</option><option value="YT">Yukon</option></select><label for="postalCode">Postal Code</label> <input type="text" name="postalCodeB" tabindex="8" id="postalCodeB" maxlength="7" size="10"/><label for="phone">Phone Number</label> <span>( </span> <input name="phoneAreaB" type="text" id="phoneAreaB" tabindex="9" size="5" maxlength="3"/> <span> ) </span> <input name="phoneNumberB" type="text" id="phoneNumberB" tabindex="9" size="10" maxlength="8"/><label for="eMail">eMail</label><input name="eMailB" type="text" id="eMailB" tabindex="10" size="53" maxlength="50"/><input type="hidden" name="billb" value="true"/><input type="hidden" value="<?php echo $firstName; ?>" name="firstName" /><input type="hidden" value="<?php echo $lastName; ?>" name="lastName"/><input type="hidden" value="<?php echo $address; ?>" name="address" /><input type="hidden" value="<?php echo $address2; ?>" name="address2" /><input type="hidden" value="<?php echo $city; ?>" name="city" /><input type="hidden" value="<?php echo $province; ?>" name="province" /><input type="hidden" value="<?php echo $postalCode; ?>" name="postalCode" /><input type="hidden" value="<?php echo $phoneArea; ?>" name="phoneArea" /><input type="hidden" value="<?php echo $trimPhoneNumber; ?>" name="trimPhoneNumber" /><input type="hidden" value="<?php echo $eMail; ?>" name="eMail"/><input type="hidden" value="<?php echo $firstNameB; ?>" name="firstNameB" /><input type="hidden" value="<?php echo $lastNameB; ?>" name="lastNameB"/><input type="hidden" value="<?php echo $addressB; ?>" name="addressB" /><input type="hidden" value="<?php echo $address2B; ?>" name="address2B" /><input type="hidden" value="<?php echo $cityB; ?>" name="cityB" /><input type="hidden" value="<?php echo $provinceB; ?>" name="provinceB" /><input type="hidden" value="<?php echo $postalCodeB; ?>" name="postalCodeB" /><input type="hidden" value="<?php echo $phoneAreaB; ?>" name="phoneAreaB"/><input type="hidden" value="<?php echo $trimPhoneNumberB; ?>" name="trimPhoneNumberB"/><input type="hidden" value="<?php echo $eMailB; ?>" name="eMailB"/><label for="submitthinger"></label><input type="submit" value="Submit" id="submitthinger"/></fieldset></form><?php } ?><?php } ?></div></div></div><?php include ('includes/subnavclose.php');?>