MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/absoluteresultstechnologies.net/public_html/millsbuickgmcupgrade.com/
File Upload :
Current < : /hermes/bosweb/b1705/absoluteresultstechnologies.net/public_html/millsbuickgmcupgrade.com/form.php

<?php
	session_start('millsupgrade');	
	error_reporting(0);
?>
<?php include_once('mysqlUtils.php'); ?>
<?php
/*
	if(!isset($_SESSION['millsupgrade']['user']))
	{
		header("location: index.php");
		exit;
	}
*/
	if(isset($_POST['firstName']))
	{
		unset($_SESSION['millsupgrade']['error']);
		foreach($_POST as $key => $val)
		{
			$_SESSION['millsupgrade']['user'][$key] = $val;
		}
		
		if($_SESSION['millsupgrade']['user']['firstName'] == "") $_SESSION['millsupgrade']['error'] = '* Please tell us your name';
		else if($_SESSION['millsupgrade']['user']['email'] == "") $_SESSION['millsupgrade']['error'] = '* Please tell us your email';		
		
		if(!isset($_SESSION['millsupgrade']['error']))
		{
			$sql = 'INSERT INTO millsupgrade (';
			$sqlArray = array();
			$keyArray = array();
			$valArray = array();
			foreach($_SESSION['millsupgrade']['user'] as $key => $val)
			{
				if(!in_array($key,array('submit')))
				{
					$keyArray[] = $key;
					if($val == "") $valArray[] = 'null';
					else $valArray[] = '"' . $val . '"';				
				}			
			}
			$sql .= implode(",",$keyArray) . ') VALUES (' . implode(",",$valArray) . ')';	
			//$sql .= ' WHERE appointmentID = ' . $_SESSION['millsupgrade']['user']['appointmentID'];
			
			if(mysql_query($sql))
			{
				
						header("location: thanks.php");
						exit;		
						/*
				include_once('displayUtils.php');        	
				include_once('Emailer/swift_required.php');			
								
				try 
				{			
						
					$transport = Swift_SmtpTransport::newInstance('shawmail.vc.shawcable.net');
					$mailer = Swift_Mailer::newInstance($transport);
				
					$message = Swift_Message::newInstance("Bridge City Chrysler Extra Value Coupon");	
					
					$body = '
							 <font style="font-size:10pt;font-family:Arial">
							 	Thank you for participating in the Upgrade program! 
								<br><br>
							 	A $2000 Bridge City Chrysler Extra Value coupon is attached to this email.
							 	<br><br>
								<b>
								Please print and bring with you to the dealership. 
								</b>
								<br><br>
								Thank you!
								<br><br>
								<b><u><i>Your Information</b></u></i>
								<br>
								<b>First Name:</b> ' . $_SESSION['millsupgrade']['user']['firstName'] . ' ' . $_SESSION['millsupgrade']['user']['lastName'] .  '<br>
								<b>Address:</b> ' . $_SESSION['millsupgrade']['user']['address'] . ', ' . $_SESSION['millsupgrade']['user']['city'] . ', ' . $_SESSION['millsupgrade']['user']['province'] . ', ' . $_SESSION['millsupgrade']['user']['postalCode'] . '<br>
								<b>Email:</b> ' . $_SESSION['millsupgrade']['user']['email'] . '<br>
								<b>Main Phone:</b> ' . $_SESSION['millsupgrade']['user']['mainPhone'] . '<br>
								<b>Cell Phone:</b> ' . $_SESSION['millsupgrade']['user']['mobilePhone'] . '<br>
								<b>Current Vehicle:</b> ' . $_SESSION['millsupgrade']['user']['currentVehicleYear'] . ' ' .$_SESSION['millsupgrade']['user']['currentVehicleModel'] . '<br>
								<b>Condition:</b> ' . $_SESSION['millsupgrade']['user']['currentVehicleCondition'] . '<br>
								<b>Financed or Leased:</b> ' . $_SESSION['millsupgrade']['user']['currentVehicleFinanced'] . '<br>
								<b>Amount Owed:</b> ' . $_SESSION['millsupgrade']['user']['currentVehicleOwed'] . '<br>
								<b>Monthly Payment:</b> ' . $_SESSION['millsupgrade']['user']['currentVehiclePayment'] . '<br>
								<b>In Market Date:</b> ' . $_SESSION['millsupgrade']['user']['dateRange'] . '<br>
								<b>Vehicle Interested In:</b> ' . $_SESSION['millsupgrade']['user']['nextVehicleModel'] . '<br>
								<b>Vehicle Type:</b> ' . $_SESSION['millsupgrade']['user']['nextVehicleNewUsed'] . '<br>
							 </font>
							 
							';
									
								
					ob_start();
					include('mills_couponImage.php');
					$l_contents = ob_get_contents();
					ob_end_clean();
					
					
					$attachment = Swift_Attachment::newInstance($l_contents, "Bridge City Chrysler Extra Value Coupon.jpg", 'image/jpeg');  				
					$message->attach($attachment);
					
					$message->setBody($body, 'text/html');
					$message->setTo(array(trim($_SESSION['millsupgrade']['user']['email'])));
					//$message->setTo(array('dpaoa@hotmail.com','davepao@gmx.com'));
					//$message->setTo(array('dave@absoluteresults.com'));
					$message->setBcc(array('dave@absoluteresults.com','jarnoldussen@millschrysler.com'));
					//$message->setBcc(array('dave@absoluteresults.com'));
					$message->setReturnPath('info@millschrysler.com');
					$message->setFrom('info@millschrysler.com');
					
					if($mailer->send($message))
					{
						unset($_SESSION['millsupgrade']);
						header("location: thanks.php");
						exit;			
					}
					else
					{
						$_SESSION['millsupgrade']['error'] = '* An error occurred. Please call us at (403) 328-3325 to receive your coupon.';			
					}
					
					
				} 
				catch (Swift_TransportException $e) 
				{
						$_SESSION['millsupgrade']['error'] = '* An error occurred. Please call us at (403) 328-3325 to receive your coupon.';	
				} 
				catch (Swift_Message_MimeException $e) 
				{
						$_SESSION['millsupgrade']['error'] = '* An error occurred. Please call us at (403) 328-3325 to receive your coupon.';	
				}
				*/
					
			}
			else
			{
				$_SESSION['millsupgrade']['error'] = '* An error occurred.';
			}
		}
		
		header("location: form.php");
		exit;
	}
	
	foreach($_SESSION['millsupgrade']['user'] as $key => $val)
	{
		$_SESSION['millsupgrade']['user'][$key] = stripslashes($val);
	}
?>
<?php include_once('header.php'); ?>
<br>
<div style="font-size:12pt;">
Please enter your information to receive your $1,000 Savings Voucher!
</div>
<br>
<style>
	.formTbl {border:1px solid #aaaaaa;background-color:#eeeeee;width:500px;height:100px;color:#333333;padding:10px}
	.formTbl td {padding-left:5px;padding-right:15px;padding-top:0px;font-size:8pt}
	.formTbl td input {width:100%;font-size:8pt}
	.formTbl td select {font-size:8pt}
</style>
<center>
	<form method="POST">
		<font style="color:red;font-weight:bold"><?= $_SESSION['millsupgrade']['error'] ?>
		<?php unset($_SESSION['millsupgrade']['error']) ?>
		<table cellspacing="0" cellpadding="0" class="formTbl">
			<tr>
				<td style="padding-top:10px">
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td>
								<div style="text-align:left">
									<b>First Name</b>
									<br>
									<input type="text" name="firstName" value="<?= $_SESSION['millsupgrade']['user']['firstName'] ?>">
								</div>
							</td>
							<td>
								<div style="text-align:left">
									Last Name
									<br>
									<input type="text" name="lastName" value="<?= $_SESSION['millsupgrade']['user']['lastName'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td>
								<div style="text-align:left">
									Address
									<br>
									<input type="text" name="address" value="<?= $_SESSION['millsupgrade']['user']['address'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td style="width:50%">
								<div style="text-align:left">
									City
									<br>
									<input type="text" name="city" value="<?= $_SESSION['millsupgrade']['user']['city'] ?>">
								</div>
							</td>
							<td style="width:20%">
								<div style="text-align:left">
									Province
									<br>
									<input type="text" name="province" value="<?= $_SESSION['millsupgrade']['user']['province'] ?>">
								</div>
							</td>
							<td style="width:30%">
								<div style="text-align:left">
									Postal Code
									<br>
									<input type="text" name="postalCode" value="<?= $_SESSION['millsupgrade']['user']['postalCode'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td>
								<div style="text-align:left">
									<b>Email</b>
									<br>
									<input type="text" name="email" value="<?= $_SESSION['millsupgrade']['user']['email'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td>
								<div style="text-align:left">
									Main Phone
									<br>
									<input type="text" name="mainPhone" value="<?= $_SESSION['millsupgrade']['user']['mainPhone'] ?>">
								</div>
							</td>
							<td>
								<div style="text-align:left">
									Cell Phone
									<br>
									<input type="text" name="mobilePhone" value="<?= $_SESSION['millsupgrade']['user']['mobilePhone'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td style="width:30%">
								<div style="text-align:left">
									Current Vehicle Year
									<br>
									<input type="text" name="currentVehicleYear" value="<?= $_SESSION['millsupgrade']['user']['currentVehicleYear'] ?>">
								</div>
							</td>
							<td style="width:70%">
								<div style="text-align:left">
									Current Vehicle
									<br>
									<input type="text" name="currentVehicleModel" value="<?= $_SESSION['millsupgrade']['user']['currentVehicleModel'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td nowrap>
								<div style="text-align:left">
									How would you rate the condition of your Current Vehicle?
								</div>
							</td>
							<td style="text-align:left;width:100%">
								<select name="currentVehicleCondition">
									<option value="" selected></option>
									<option value="excellent" <?= ($_SESSION['millsupgrade']['user']['currentVehicleCondition'] == "excellent" ? 'selected' : '') ?>>Excellent</option>
									<option value="good" <?= ($_SESSION['millsupgrade']['user']['currentVehicleCondition'] == "good" ? 'selected' : '') ?>>Good</option>
									<option value="fair" <?= ($_SESSION['millsupgrade']['user']['currentVehicleCondition'] == "fair" ? 'selected' : '') ?>>Fair</option>
									<option value="poor" <?= ($_SESSION['millsupgrade']['user']['currentVehicleCondition'] == "poor" ? 'selected' : '') ?>>Poor</option>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td nowrap>
								<div style="text-align:left">
									Is your Current Vehicle Leased or Purchased?
								</div>
							</td>
							<td style="text-align:left;width:100%">
								<select name="currentVehicleFinanced">
									<option value="" selected></option>
									<option value="financed" <?= ($_SESSION['millsupgrade']['user']['currentVehicleFinanced'] == "financed" ? 'selected' : '') ?>>Financed</option>
									<option value="leased" <?= ($_SESSION['millsupgrade']['user']['currentVehicleFinanced'] == "leased" ? 'selected' : '') ?>>Leased</option>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td style="width:50%">
								<div style="text-align:left">
									Amount Owed on Current Vehicle $
									<br>
									<input type="text" name="currentVehicleOwed" value="<?= $_SESSION['millsupgrade']['user']['currentVehicleOwed'] ?>">
								</div>
							</td>
							<td style="width:50%">
								<div style="text-align:left">
									Most Recent Monthly Payments $
									<br>
									<input type="text" name="currentVehiclePayment" value="<?= $_SESSION['millsupgrade']['user']['currentVehiclePayment'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td nowrap>
								<div style="text-align:left">
									How soon will you be in the market for a new vehicle?
								</div>
							</td>
							<td style="text-align:left;width:100%">
								<select name="dateRange">
									<option value="" selected></option>
									<option value="immediately" <?= ($_SESSION['millsupgrade']['user']['dateRange'] == "immediately" ? 'selected' : '') ?>>Immediately</option>
									<option value="30days" <?= ($_SESSION['millsupgrade']['user']['dateRange'] == "30days" ? 'selected' : '') ?>>30 Days</option>
									<option value="3months" <?= ($_SESSION['millsupgrade']['user']['dateRange'] == "3months" ? 'selected' : '') ?>>3 Months</option>
									<option value="612months" <?= ($_SESSION['millsupgrade']['user']['dateRange'] == "612months" ? 'selected' : '') ?>>6-12 Months</option>
									<option value="notsure" <?= ($_SESSION['millsupgrade']['user']['dateRange'] == "notsure" ? 'selected' : '') ?>>Not Sure</option>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td>
								<div style="text-align:left">
									Vehicle Interested In
									<br>
									<input type="text" name="nextVehicleModel" value="<?= $_SESSION['millsupgrade']['user']['nextVehicleModel'] ?>">
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table cellspacing="0" cellpadding="0" style="width:100%">
						<tr>
							<td nowrap>
								<div style="text-align:left">
									Vehicle Type
								</div>
							</td>
							<td style="text-align:left;width:100%">
								<select name="nextVehicleNewUsed">
									<option value="" selected></option>
									<option value="new" <?= ($_SESSION['millsupgrade']['user']['nextVehicleNewUsed'] == "new" ? 'selected' : '') ?>>New</option>
									<option value="used" <?= ($_SESSION['millsupgrade']['user']['nextVehicleNewUsed'] == "used" ? 'selected' : '') ?>>Used</option>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<br>
		<input type="submit" value="Submit" style="width:150px">
	</form>
</center>
<?php include_once('footer.php'); ?>