MSV FM

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

<?php
	include_once('includes.php');
	
	$pageTitle = 'contactUsTitle.jpg';	
                
	$countriesArray = json_decode(file_get_contents('https://ar.absoluteresults.com/rest/constants/countries'),TRUE);

	if(isset($_GET['setProvinces'])) {
		
		$province_re = file_get_contents('https://ar.absoluteresults.com/rest/constants/provinces/'.$_GET['setProvinces']);
		$provincesArray = json_decode($province_re,TRUE);
		
		if(count($provincesArray) > 0) {
			?>
				$('#province').html('');
				$('#province').append($('<option/>', { 
			        value: "",
			        text : ""
			    }));
				$('#provinceTbl').show();
			<?php
			foreach($provincesArray as $prov) {
				?>
				$('#province').append($('<option/>', { 
			        value: "<?= strtoupper($prov) ?>",
			        text : "<?= strtoupper($prov) ?>"
			    }));
				<?php
			}
		}
		else {
			?>
			$('#province').html('');
			$('#provinceTbl').hide();
			<?php
		}

		exit;
	}

	if(isset($_POST['name']))
	{

		$_SESSION['contactUsForm'] = true;

		$url = 'https://ar.absoluteresults.com/rest/contactus/';
		$data = $_POST;
		$data['country'] = $countriesArray[$_POST['countryID']];
		$options = array(
		    'http' => array(
		        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
		        'method'  => 'POST',
		        'content' => http_build_query($data),
		    ),
		);
		$context  = stream_context_create($options);
		$result = file_get_contents($url, false, $context);
		
		header("location: contactus.php");
		exit;
	}


?>
<?php include_once('header.php'); ?>
<?php
	if(isset($_SESSION['contactUsForm']))
	{
		?>
		<script>alert('<?= $lang['Thank you for your inquiry. We will contact you shortly.'] ?>');</script>
		<?php
		unset($_SESSION['contactUsForm']);
	}
?>
<style>
	#provinceTbl {display:none;}
	#url { display:none; }
</style>
<script>
	function setProvinces() {
		$.ajax({data:	{setProvinces: $('#countryID').val()},
				type:	'GET',
				dataType: 'script'
		   	    });


	}
</script>
<table cellspacing="0" cellpadding="0" style="width:100%">
	<tr>		
		<td>
			<table cellspacing="0" cellpadding="0">
				<tr>
					<td>
						<ul id="example1" class="accordion">
			                <li class="locked">
			                    <h3><?= $lang['Contact Us'] ?></h3>				                    
                    			<div class="panel loading">
									<table cellspacing="0" cellpadding="0" class="videoTable">													
										<tr>
											<td>
												<table cellspacing="0" cellpadding="0">
													<tr>
														<?php
														if($_SESSION['langSet'] == 'fr'){
														?>
															<td style="font-size:11pt">
																<b>Absolute Results Productions</b>
																<br>
																360, boul. De la Seigneurie Ouest Loc:205 
																<br>Blainville QC, J7C 5A1
																<br><br>
																<div style="font-size:12pt">
																	<?= $lang['P'] ?>: <b>514.317.2707</b>
																	<br>
																	<?= $lang['F'] ?>: 450.420.6494
																	<br>
																	<?= $lang['E'] ?>: 
																	<font style="font-size: 11pt">
																		<a href="mailto:infoQuebec@absoluteresults.com" style="color:blue">infoQuebec@absoluteresults.com</a>
																		<br>
																		<a href="mailto:infoFrance@absoluteresults.com" style="color:blue">infoFrance@absoluteresults.com</a>
																	</font>
																</div>
																<br><br>
																<div style="font-size:11pt">
																	CA Head Office: <b>1.888.751.7171</b>
																	<br>
																	UK Head Office: <b>07961 385566</b>
																</div>
															</td>
														<?php
														}
														else{
														?>
															<td style="font-size:11pt">
																<b>Absolute Results Productions</b>
																<br>
																104 - 2677 192 St.
																<br>Surrey BC, V3Z 3X1
																<br><br>
																<div style="font-size:12pt">
																	<?= $lang['P'] ?>: <b>1.888.751.7171</b>
																	<br>
																	<?= $lang['F'] ?>: 604.541.9926
																	<br>
																	<?= $lang['E'] ?>: <a href="mailto:info@absoluteresults.com" style="color:blue">info@absoluteresults.com</a>
																</div>
																<br><br>
																<div style="font-size:11pt">
																	UK Head Office: <b>07961 385566</b>
																</div>
															</td>
														<?php
														}
														?>
													</tr>

												</table>
											</td>
										</tr>								
									</table>
								</div>
			                </li>          		           
			            </ul>
					</td>
				</tr>
			</table>
		</td>
		<td rowspan="2"style="width:700px;height:393px;padding-left:10px">			
			 
			<table cellspacing="0" cellpadding="0" style="border:1px solid #ccc;padding:5px;width:100%;background-color:#efefef">
				<tr>
					<td style="text-align:left;padding:10px;padding-bottom:30px;">
						<b><font style="color:#c80000;font-size:14pt"><?= $lang['Tell us a bit about your dealership.'] ?></font><br><?= $lang['Well contact you to make your sales dreams come true.'] ?></b>
					</td>
				</tr>
				<tr>
					<td style="text-align:left;vertical-align:top;height:100%">
						<script>
							function checkForm()
							{
								if(document.getElementById('name').value == "")
								{
									alert('<?= $lang['Please tell us your name.'] ?>');
									return false;
								}
								else if(document.getElementById('dealership').value == "")
								{
									alert('<?= $lang['Please tell us the name of your dealership.'] ?>');
									return false;
								}
								else if(document.getElementById('email').value == "")
								{
									alert('<?= $lang['Please tell us your email.'] ?>');
									return false;
								}
								else if(document.getElementById('phone').value == "")
								{
									alert('<?= $lang['Please tell us your phone number.'] ?>');
									return false;
								}
								
								return true;
							}
						</script>
						<form method="POST" onSubmit="return checkForm()">
							<style>
								.contactUsTbl td {font-size:13pt;vertical-align:middle;padding-left:10px;padding-bottom:5px}
								.contactUsTbl input {width:400px;height:30px;font-size:15pt}
								.contactUsTbl td select {height:30px;font-size:13pt}
							</style>
							<table cellspacing="0" cellpadding="0" class="contactUsTbl">
								<tr>
									<td><?= $lang['Name'] ?></td>
									<td>
										<input id="name" type="text" name="name">
										<input id="url" class="extraForm" type="text" name="url" value="" placeholder="Leave this blank">
									</td>
								</tr>
								<tr>
									<td><?= $lang['Dealership'] ?></td>
									<td><input id="dealership" type="text" name="dealership"></td>
								</tr>
								<tr>
									<td><?= $lang['Email'] ?></td>
									<td><input id="email" type="text" name="email"></td>
								</tr>
								<tr>
									<td><?= $lang['Phone'] ?></td>
									<td><input id="phone" type="text" name="phone"></td>
								</tr>
								<tr>
									<td style="width:83px"><?= $lang['City'] ?></td>
									<td><input id="city" type="text" name="city"></td>
								</tr>
							</table>	
							<table cellspacing="0" cellpadding="0" class="contactUsTbl">
								<tr>
									<td style="width:83px">Country</td>
									<td>
										<select name="countryID" id="countryID" style="width:200px;" onChange="setProvinces()">
											<option value=""></option>
	<?php foreach($countriesArray as $countryID => $desc) { ?>
											<option value="<?= $countryID ?>"><?= $desc ?></option>
	<?php } ?>
										</select>										
									</td>
									<td>
										<table cellspacing="0" cellpadding="0" class="contactUsTbl" id="provinceTbl">
											<tr>
												<td><?= $lang['ProvState'] ?></td>
												<td>
													<select name="province" id="province"></select>										
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>	<!-- 
									<td><?= $lang['ProvState'] ?></td>
									<td>
										<select name="province">
	<?php foreach($state_arr as $abbr => $desc) { ?>
											<option value="<?= $abbr ?>"><?= $abbr ?></option>
	<?php } ?>
										</select>										
									</td> 
								</tr>
							</table>
							-->
							<table cellspacing="0" cellpadding="0" class="contactUsTbl">
								<tr>
									<td><?= $lang['New Vehicles Sold Per Month'] ?></td>
									<td><input type="text" name="new" style="width:248px"></td>
								</tr>				
								<tr>
									<td><?= $lang['Used Vehicles Sold Per Month'] ?></td>
									<td><input type="text" name="used" style="width:248px"></td>
								</tr>		
							</table>
							<table cellspacing="0" cellpadding="0" class="contactUsTbl">
								<tr>
									<td style="padding-top:10px"><?= $lang['How did you hear about Absolute Results?'] ?></td>
								</tr>				
								<tr>
									<td><input type="text" name="hear" style="width:493px"></td>
								</tr>		
							</table>
							<table cellspacing="0" cellpadding="0" class="contactUsTbl">
								<tr>
									<td style="padding-top:10px"><input type="submit" value="<?= $lang['Send'] ?>" style="width:100px;height:40px;font-size:14pt"></td>
								</tr>
							</table>
						</form>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td style="vertical-align:bottom;">
				<!--
			<table cellspacing="0" cellpadding="0" style="border:1px solid #ccc;padding:5px;width:100%;background-color:#efefef">
				<tr>
					<td style="vertical-align:middle">
						<img src="<?= $lang['imgFdr'] ?>/scoreboards.png">
					</td>
				</tr>
				<tr>
					<td style="vertical-align:middle">
						Click <a href="http://www.absoluteresults.com/challenge/" target="_blank">here</a> to see our<br><b>LIVE Challenge Scoreboards</b>
					</td>
				</tr>
			</table>
				-->
		</td>
	</tr>
</table>
<script type="text/javascript">
    $('#example1').accordion();
    $(".loading").removeClass("loading");
    
</script>
<?php include_once('footer.php'); ?>