MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b744/limousinebustoronto.com/
File Upload :
Current < : /hermes/sb_web/b744/limousinebustoronto.com/incQuickQuote.php

<?php
	$errorMessage	=	NULL;

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

	//	Validate form fields and send confirmation email to contact and campaign team

		//if	(!empty($_POST['contactName']))
		//	$contactName					=	$_POST['contactName'];
		//else
		//	$errorMessage	=	"Please Fill Out All The Fields.";

		//if	(!empty($_POST['contactPhone']))
		//	$contactPhone					=	$_POST['contactPhone'];
		//else
		//	$errorMessage	=	"Please Fill Out All The Fields.";

		if	(!empty($_POST['contactEmail']))
			$contactEmail					=	$_POST['contactEmail'];
		else
			$errorMessage	=	"Please Fill Out Your Email Address.";

		if (!preg_match("/^\S+@[A-Za-z0-9_.-]+\.[A-Za-z]{2,6}$/",$contactEmail))
			$errorMessage	=	"Please Enter A Valid Email Address.";

		if	(!empty($_POST['contactDate']))
			$contactDate				=	$_POST['contactDate'];
		else
			$errorMessage	=	"Please Enter The Date Requested.";

		if	(!empty($_POST['contactType']))
			$contactType				=	$_POST['contactType'];
		else
			$errorMessage	=	"Please Enter The Type Of Event.";

		if	(!empty($_POST['contactHours']))
			$contactHours				=	$_POST['contactHours'];
		else
			$errorMessage	=	"Please Enter The Number Of Hours Requested.";

		if	(!empty($_POST['contactVehicle']))
			$contactVehicle				=	$_POST['contactVehicle'];
		else
			$errorMessage	=	"Please Enter The Type Of Vehicle Requested";

		//if	(!empty($_POST['contactPax']))
		//	$contactPax				=	$_POST['contactPax'];
		//else
		//	$errorMessage	=	"Please Fill Out All The Fields.";

		$contactComments	=	$_POST['contactComments'];

		if	($errorMessage==NULL)	{

			$to      		= "joe@flyingcoachlimo.com";
			$subject 		= "Flying Coach Limousine Services - Message From Website User";


			$headers 		= "From: " . $contactEmail  . "\r\n" .
			   "Reply-To: " . $contactEmail . "\r\n" .
			   "X-Mailer: PHP/" . phpversion();


$comments	=

'
Flying Coach Limousine Services - Quick QUote
---------------------------------------------------
Name: ' . $contactName . '

Phone: ' . $contactPhone . '

Email: ' . $contactEmail . '

Date Requested: ' . $contactDate . '

Type Of Event: ' . $contactType . '

Hours Requested: ' . $contactHours . '

Vehicle Requested: ' . $contactVehicle . '

Number of Passengers: ' . $contactPax . '

Comments: ' . $contactComments;



			if(mail($to, $subject, $comments, $headers))
				$sentMessage = "$contactName - Thank you taking the time to contact Flying Coach Limousine Services. We will contact you shortly.";
			else
				$errorMessage =  "Contact form was not sent due to technical difficulties";

		}


	}

?>
	<div id="quickquote">
		<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><img src="images/quickquote.gif" alt="Get a quick quote on our limos, sedans, and party buses to go anywhere in Toronto" /></a>
		<div id="light" class="white_content">

			<div id="xclose">
			<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">
				<img src="images/x2.jpg" alt="Close Quick Quote"/>
			</a>
			</div>

			<img src="images/testclose2.gif" />
<?php

		//	Determine if an error message is detected. If so, display message to user

		if	($errorMessage != NULL)
			echo "<b><h3 style=color:red;font-size:18px;>$errorMessage</h3></b>";

		if	(isset($sentMessage))
			echo "<b><h2 style=color:red;font-size:18px;>$sentMessage</h2></b>";
?>
			<p>
			</p>
			<form action="quickquote.php" method="post">
				<table width="500px">
					<tr>
						<td>
							Name
						</td>
						<td>
							<input type="text" name="contactName" class="formfield" value="<?php echo $contactName; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Phone Number
						</td>
						<td>
							<input type="text" name="contactPhone" class="formfield" value="<?php echo $contactPhone; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Email Address
						</td>
						<td>
							<input type="text" name="contactEmail" class="formfield" value="<?php echo $contactEmail; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Date Requested
						</td>
						<td>
							<input type="text" name="contactDate" class="formfield" value="<?php echo $contactDate; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Type of Event
						</td>
						<td>
							<input type="text" name="contactType" class="formfield" value="<?php echo $contactType; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Hours Vehicle Required
						</td>
						<td>
							<input type="text" name="contactHours" class="formfield" value="<?php echo $contactHours; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Vehicle Requested
						</td>
						<td>
							<select class="formfield" name="contactVehicle">
								<option value="Stretch Navigator ">Stretch Navigator </option>
								<option value="Big Party Bus - 30 Seater">Big Party Bus - 30 Seater</option>
								<option value="Small Party Bus - 20 Seater">Small Party Bus - 20 Seater</option>
								<option value="Cadillac Esclade SUV">Cadillac Esclade SUV</option>
								<option value="Cadillac DTS - Luxury Sedan">Cadillac DTS - Luxury Sedan</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>
							Number of Passengers
						</td>
						<td>
							<input type="text" name="contactPax" class="formfield" value="<?php echo $contactPax; ?>" />
						</td>
					</tr>
					<tr>
						<td>
							Comments
						</td>
						<td>
							<textarea name="contactComments" class="formfield" rows="5" cols="10"><?php echo $contactComments; ?></textarea>
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td>
							<input name="submit" type="submit" class="formfield" value="Get A Quick Quote Now" />
						</td>
					</tr>
				</table>
			</form>
			<a href="javascript:;" onclick="window.open('terms.pdf');">Terms &amp; Conditions</a>
			<br/><br/>
<?php

//	Connect to database

	$con = mysql_connect("flyingcoachlimo.startlogicmysql.com","flyingcoachlimo","tiptop76c#");


//	Determine if database server is available

if (!$con)	{

	die('Could not connect to database - db_connect.inc: ' . mysql_error());

}


//	Connect to database

mysql_select_db("flyingcoachfc", $con);


//	Query database

$query = "SELECT * FROM pages WHERE pageName='quickquote.php'";


//	Place results into variables

$result = mysql_query($query);
if(!$result)
{
    echo 'Query failed: '.mysql_error();
}
while($row = mysql_fetch_array($result))
{


	$pageText2 = "<pre style='width: 480px; font-size: 10px; font-family: Verdana;'>".$row[2]."</pre>";

}


//	Close database connection

	mysql_close();

	echo $pageText2;

?>
		</div>
		<div id="fade" class="black_overlay"></div>
	</div>