ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <?php //change email details from heres $emailto = "djschairs@bigpond.com"; $headers = "From: DJSUA Webmaster <info@djsua.com>"; $subject = "DJSUA Enquiry"; $content = "Dear DJSUA Owner, There is one enquiry has been submitted on the website enquiry page, and here is the details /r/n/r/n First Name: [first_name] Last Name: [last_name] Company: [company] Phone: [phone] Email: [email] Address: [address] Enquiry Details: [enquiry] Delivery Address: [deliveryaddr] Delivery Instructions: [instructions] Pleaes get back to the enquiry ASAP. Thanks! DJSUA Webmaster"; $response = "Your enquiry has been sent through to us, and we will get back to you ASAP. Thanks!"; //change email details end here ?> <html> <head> <META NAME="keywords" CONTENT="antiques, upholstery, Sydney, Australia"/> <META NAME="description" CONTENT="Antique shop in Sydney, Australia"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>DJ's Upholstery & Antiques</title> <STYLE> A:link{color: #000000; text-decoration: none} A:visited{color: #FF0000; text-decoration: none} </STYLE> <script type="text/javascript"> function copyAddr(){ if(document.getElementById("sameasaddr").checked == 1){ document.forms['enquiry'].deliveryaddr.value = document.forms['enquiry'].address.value; }else{ document.forms['enquiry'].deliveryaddr.value = ""; } } function Validate(){ var rfalse = 0; if(document.forms['enquiry'].first_name.value == "") { document.getElementById('first_name_msg').style.display = "inline"; rfalse = 1; } else { document.getElementById('first_name_msg').style.display = "none"; } if(document.forms['enquiry'].last_name.value == "") { document.getElementById('last_name_msg').style.display = "inline"; rfalse = 1; } else { document.getElementById('last_name_msg').style.display = "none"; } if(document.forms['enquiry'].phone.value == "") { document.getElementById('phone_msg').style.display = "inline"; rfalse = 1; } else { document.getElementById('phone_msg').style.display = "none"; } if(document.forms['enquiry'].email.value == "" || document.forms['enquiry'].email.value.indexOf('@') == -1) { document.getElementById('email_msg').style.display = "inline"; rfalse = 1; } else { document.getElementById('email_msg').style.display = "none"; } if(document.forms['enquiry'].enquiry.value == "") { document.getElementById('enquiry_msg').style.display = "inline"; rfalse = 1; } else { document.getElementById('enquiry_msg').style.display = "none"; } if(rfalse == 0) return true; else return false; } </script> </head> <body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <table width="820" height="663" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999"> <tr> <td height="661" valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="10"></td> </tr> </table> <table width="780" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000"> <tr> <td height="617" valign="top" bgcolor="#FFFFFF"> <table width="780" height="223" border="0" cellpadding="0" cellspacing="0"> <tr bgcolor="#78783D"> <td height="5" colspan="2" valign="top"></td> </tr> <tr> <td width="280" rowspan="2" align="center" valign="middle" bgcolor="#000000"><img src="Pics/home.JPG" width="280" height="200"></td> <td height="116" valign="top" bgcolor="#DDCDA9"><img src="Pics/topmap01.jpg" width="500" height="120"></td> </tr> <tr> <td height="102" valign="middle" bgcolor="#504645"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="21%" height="34"><div align="center"><font color="#FFFFFF" size="+2" face="Century"><strong>Enquiry</strong></font></div></td> <td width="20%"><font color="#FFFFFF" size="3"><strong><img src="Pics/c001.JPG" width="72" height="60"></strong></font></td> <td width="20%"><img src="Pics/vegas 17.JPG" width="72" height="61"></td> <td width="19%"><img src="Pics/c001.JPG" width="72" height="60"></td> <td width="20%"><img src="Pics/vegas 17.JPG" width="72" height="61"></td> </tr> </table></td> </tr> </table> <table width="780" height="391" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="6" colspan="3" valign="top" bgcolor="#666633"></td> </tr> <tr> <td width="151" height="342" align="left" valign="top" bgcolor="#FFFFFF"> <table width="100%" height="320" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="16" bgcolor="#FFFFFF">&nbsp;</td> </tr> <tr> <td height="44" bgcolor="#E6E6E6"><a href="index.html"><img src="imeges/g-home.gif" width="150" height="50" border="0"></a></td> </tr> <tr> <td height="31"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="9"> <a href="about.html"><font color="#333333">About Us</font></font></td> </tr> <tr> <td height="50"><a href="chair1.html"><img src="imeges/g-catelogue.gif" width="150" height="50" border="0"></a></td> </tr> <tr> <td height="148" valign="top"> <table width="98%" height="148" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30" valign="middle"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="chair1.html"><font color="#333333">Antique Chairs</font></font></td> <tr> <td height="29"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="furniture.html"><font color="#333333">Furniture</font></font></td> </tr> </tr> <tr> <td height="29"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="antoth.html"><font color="#333333">Antique Other</font></font></td> </tr> <tr> <td height="30"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="deco.html"><font color="#333333">Decorative Items</font></font></td> </tr> <tr> <td height="30"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="painting.html"><font color="#333333">Paintings</font></font></td> </tr> <tr> <td height="29"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="service.html"><font color="#333333">Our Services</font></font></td> </tr> <tr> <td height="30"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="video.html"><font color="#333333">Video</font></font></td> </tr> </table></td> </tr> <tr> <td><a href="contact.html"><img src="imeges/g-contact.gif" width="150" height="50" border="0"></a></td> </tr> <tr> <td height="29"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="imeges/dot.gif" width="8" height="8"> <a href="enquiry.php"><font color="#333333">Enquiry</font></font></td> </tr> </table></td> <td width="6" align="left" valign="top" bgcolor="#504645"></td> <td width="628" align="right" valign="top"><table width="100%" height="55" border="0" cellpadding="0" cellspacing="20"> <tr> <td><strong><font color="#666666" size="5" face="Arial, Helvetica, sans-serif">Enquiry</font></strong></td> </tr> </table> <table width="94%" border="0" cellspacing="10" cellpadding="0"> <tr> <td width="40%" valign="top"> <?php if($_POST["send_enquiry"] == 1){ //send email $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $company = $_POST["company"]; $phone = $_POST["phone"]; $email = $_POST["email"]; $address = $_POST["address"]; $enquiry = $_POST["enquiry"]; $deliveryaddr = $_POST["deliveryaddr"]; $instructions = $_POST["instructions"]; $content = str_replace("[first_name]",$first_name,$content); $content = str_replace("[last_name]",$last_name,$content); $content = str_replace("[company]",$company,$content); $content = str_replace("[phone]",$phone,$content); $content = str_replace("[email]",$email,$content); $content = str_replace("[address]",$address,$content); $content = str_replace("[enquiry]",$enquiry,$content); $content = str_replace("[deliveryaddr]",$deliveryaddr,$content); $content = str_replace("[instructions]",$instructions,$content); if(mail($emailto,$subject,$content,$headers)){ ?> <span style='color:green;'><?php echo $response;?></span> <?php } }else{ //display enquiry filling page ?> <form name="enquiry" action="enquiry.php" method="post" onsubmit="return Validate()"> <table width="82%" height="157" border="0" cellpadding="0" cellspacing="20"> <tr> <td height="18" colspan="2"><SPAN class=rw_word> </SPAN><font size="3"><span class=rw_word>Please send your enquiry to DJ's Upholstery and Antiques:</span></font></td> </tr> <tr> <td height="14"><font size="3">First Name*:</font></td> <td><input type="text" name="first_name" /><span style="color:red; display:none;" id="first_name_msg">Required</span></td> </tr> <tr> <td height="14"><font size="3">Last Name*: </font></td> <td><input type="text" name="last_name" /><span style="color:red; display:none;" id="last_name_msg">Required</span></td> </tr> <tr> <td height="14"><font size="3">Company Name: </font></td> <td><input type="text" name="company" /></td> </tr> <tr> <td height="14"><font size="3">Phone*: </font></td> <td><input type="text" name="phone" /><span style="color:red; display:none;" id="phone_msg">Required</span></td> </tr> <tr> <td height="14"><font size="3">Email*: </font></td> <td><input type="text" name="email" /><span style="color:red; display:none;" id="email_msg">Valid Email Required</span></td> </tr> <tr> <td height="14"><font size="3">Address: </font></td> <td><textarea rows="3" cols="30" name="address"></textarea></td> </tr> <tr> <td height="12"><font size="3"><SPAN class=rw_word>Enquiry Details*: </SPAN></font></td> <td><textarea rows="3" cols="30" name="enquiry"></textarea><span style="color:red; display:none;" id="enquiry_msg">Required</span></td> </tr> <tr> <td height="13"><font size="3">Delivery Address: </font><br/><input type="checkbox" name="sameasaddr" id="sameasaddr" onclick="copyAddr()"/><label for="sameasaddr">Same as Address</label></td> <td><textarea rows="3" cols="30" name="deliveryaddr"></textarea></td> </tr> <tr> <td height="13"><font size="3">Instructions: </font></td> <td><textarea rows="3" cols="30" name="instructions"></textarea></td> </tr> <tr> <td height="13" colspan="2" align="center"> <input type="hidden" name="send_enquiry" value="1"/> <input type="submit" name="submit" value="Send Enquiry"/> </td> </tr> </table> </form> <?php } ?> </td> </tr> </table> </td> </tr> </table></td> </tr> </table> <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><font color="#666666" size="2">Copyright &copy; 2008 - 2011 DJ's Upholstery & Antiques. All rights reserved.</font></div></td> </tr> </table> </td> </tr> </table> </body> </html>