MSV FM

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

<?php include_once('includes.php'); ?>
<?php
	
	if(isset($_GET['submitList']))
	{
		//unset($_SESSION['registration']['customer']);
		foreach($_GET as $key => $val)
		{
			$_SESSION['registration']['customer'][$key] = $val;
		}
			
		?>
		document.getElementById('emailFrame').src = 'http://ar.absoluteresults.com/digital2013/save35Email.php?regID=<?= urlencode(serialize($_SESSION['registration'])) ?>';
		<?php
		exit;		
	}

	if(isset($_GET['complete'])) $_SESSION['offers'][$currentPage]['complete'] = true;
?>
<?php include_once('header.php'); ?>

<script src="scripts/ajax.js" language="javascript"></script>
<script>			
	function submitList()
	{
		
		
		htmlStr = 'save35.php?submitList=';
		var arr = new Array('fullname','email','postalCode','mobilePhone');
		var arrRequired = new Array('fullname','email','postalCode','mobilePhone');
		for (var i = 0; i < arrRequired.length; i++) 
		{			
			if(document.getElementById(arrRequired[i]).value == "") 
			{
				alert('Please complete all the required fields to see your offer.\nThank you.');
				return false;
			}
		}
		for (var i = 0; i < arr.length; i++) 
		{			
			var temp = '';
			if(document.getElementById(arr[i]) != undefined)  temp=encodeURIComponent(document.getElementById(arr[i]).value);
			htmlStr = htmlStr + '&' + arr[i] + '=' + temp;
		}
		document.getElementById('submitButton').value = 'Please wait...';
		document.getElementById('submitButton').disabled = true;
		
		ajax_do(htmlStr);
	}
	
	
	function emailSent()
	{
		if(document.getElementById('emailFrame').src != "")
		{
			alert('Thank you for your submission.\nPlease check your email for details.');
			location.href = 'save35.php?complete';
			//document.getElementById('submitButton').disabled = false;
			//document.getElementById('submitButton').value = 'See Offer';
		}
	}
	
</script>
<style>
	.formTbl th,.formTbl td {text-align:left;padding-right:10px}
</style>
<table cellspacing="0" cellpadding="0" style="width:100%">
	<tr>
		<td style="width:530px;padding:20px 0px 0px 40px;font-size:15pt;text-align:left;vertical-align:top">
	<?php if(!isset($_GET['complete'])) { ?>			
			<font style="font-weight:bold;font-size:18pt">Fill out the information below<br>to see all our 35% offers</font>
			<br><br>
			<form method="POST">
				<table cellspacing="0" cellpadding="0" class="formTbl">
					<tr>
						<th>First & Last Name</th>
						<td><input type="text" style="width:200px" id="fullname" name="fullname" value="<?= $_SESSION['registration']['customer']['fullname'] ?>"></td>
					</tr>
					<tr>
						<th>Email</th>
						<td><input type="text" style="width:200px" id="email" name="email" value="<?= $_SESSION['registration']['customer']['email'] ?>"></td>
					</tr>
					<tr>
						<th>Mobile Phone</th>
						<td><input type="text" style="width:200px" id="mobilePhone" name="mobilePhone" value="<?= $_SESSION['registration']['customer']['mobilePhone'] ?>"></td>
					</tr>
					<tr>
						<th>Postal Code</th>
						<td><input type="text" style="width:200px" id="postalCode" name="postalCode" value="<?= $_SESSION['registration']['customer']['postalCode'] ?>"></td>
					</tr>
					<tr><td colspan="2" style="height:20px"></td></tr>
					<tr>
						<td colspan="2" style="padding-top:20px">
							<input type="button" id="submitButton" value="See Offers" onClick="submitList()" style="font-weight:bold;font-size:16pt;background-color:#efd23b;width:330px">
						</td>
					</tr>
				</table>
			</form>
	<?php } else { ?>
			<font style="font-weight:bold;font-size:25pt">
				RAM 1500 SXT QUAD CAB
			</font>
			<br>
			<table cellspacing="0" cellpadding="0">
				<tr>
					<td style="font-weight:bold;font-size:20pt">
						MSRP
						<br>
						$39,090
					</td>
					<td rowspan="2" style="width:300px;font-weight:bold;font-size:32pt">
						<center>
							<img src="images/ram.png">
							<br>
							37% OFF!
						</center>
					</td>
				</tr>
				<tr>
					<td style="font-weight:bold;font-size:22pt;color:red;vertical-align:bottom">
						SALE PRICE
						<br>
						<font style="font-weight:bold;font-size:38pt;color:red">$24,498</font>
					</td>
				</tr>
			</table>
			<br>
				<font style="font-weight:bold;font-size:18pt">
					This offer has been emailed to you.
				</font>
			<br><br>
		<?php if($nextOffer != "") { ?>			
			<div style="font-size:12pt"><i>Want another offer?</i></div>
			<a href="<?= $nextOffer ?>.php"><img src="images/<?= $nextOffer ?>Button.png" border="0"></a>
		<?php } ?>			
	<?php } ?>			
		</td>
		<td style="color:white;padding-top:50px;text-align:left;font-size:15pt;vertical-align:top">
			<div style="font-weight:bold;font-size:18pt;padding-bottom:8px">NEWS FLASH</div>
			<div style="padding-bottom:8px">Massive increases in consumer cash rebates lowered truck prices allowing dealers to sell trucks at a huge discount!</div>
			<div style="padding-bottom:8px"><font style="color:yellow;font-weight:bold">Save up to 35%</font> off as they clear out
			extra inventory at incredibly low prices.
			</div>
			<img src="images/<?= $currentPage ?>Image.png">
		</td>
	</tr>
</table>
<iframe id="emailFrame" height="0" width="0" frameborder="0" onload="emailSent()"></iframe>
<?php include_once('footer.php'); ?>