<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function validateForm() {
if(document.Enquiry.Name.value == "") {
alert("Please Enter The Value For name ");
return false;
}
if(document.Enquiry.Email.value == "") {
alert("Please Enter The Value For email ");
return false;
}
if(document.Enquiry.Phone.value == "") {
alert("Please Enter The Value For phone number");
return false;
}
return true;
}
/* This script is Copyright (c) Paul McFedries and
Logophilia Limited ([url]http://www.mcfedries.com/)[/url].
Permission is granted to use this script as long as
this Copyright notice remains in place.*/
function CalculateTotal(frm) {
var order_total = 0
// Run through all the form fields
for (var i=0; i < frm.elements.length; ++i) {
// Get the current field
form_field = frm.elements[i]
// Get the field's name
form_name = form_field.name
// Is it a "product" field?
if (form_name.substring(0,4) == "PROD") {
// If so, extract the price from the name
item_price = parseFloat(form_name.substring(form_name.lastIndexOf("_") + 1))
// Get the quantity
item_quantity = parseInt(form_field.value)
// Update the order total
if (item_quantity >= 0) {
order_total += item_quantity * item_price
}
}
}
// Display the total rounded to two decimal places
frm.TOTAL.value = round_decimals(order_total, 2)
}
function round_decimals(original_number, decimals) {
var result1 = original_number * Math.pow(10, decimals)
var result2 = Math.round(result1)
var result3 = result2 / Math.pow(10, decimals)
return pad_with_zeros(result3, decimals)
}
function pad_with_zeros(rounded_value, decimal_places) {
// Convert the number to a string
var value_string = rounded_value.toString()
// Locate the decimal point
var decimal_location = value_string.indexOf(".")
// Is there a decimal point?
if (decimal_location == -1) {
// If no, then all decimal places will be padded with 0s
decimal_part_length = 0
// If decimal_places is greater than zero, tack on a decimal point
value_string += decimal_places > 0 ? "." : ""
}
else {
// If yes, then only the extra decimal places will be padded with 0s
decimal_part_length = value_string.length - decimal_location - 1
}
// Calculate the number of decimal places that need to be padded with 0s
var pad_total = decimal_places - decimal_part_length
if (pad_total > 0) {
// Pad the string with 0s
for (var counter = 1; counter <= pad_total; counter++)
value_string += "0"
}
return value_string
}
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<title>Enquiries</title>
</head>
<body MARGINHEIGHT="0" TOPMARGIN="0" bgcolor="#000000" onload="MM_preloadImages('Images/contact1.jpg','Images/machines.jpg','Images/enquiries.jpg','Images/ourproducts.jpg','Images/ourservice.jpg','Images/coffeeorder.jpg','Images/home.jpg')">
<div align="center" height="100%">
<table height="100%" border="0" cellspacing="0" id="layout" >
<tbody>
<tr>
<td width="200" id="tl"> </td>
<td id="tr"> <div antact-us">
</a><> </a><a href="Contact.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','Images/contact1.jpg',1)"><img src="Images/contact2.jpg" alt="Contact Us" name="Image11" width="80" height="13" border="0" id="Image11" /></a><a href="Machines.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','Images/machines.jpg',1)"><img src="Images/machines2.jpg" alt="Machines" name="Image12" width="72" height="13" border="0" id="Image12" /></a><a href="Order.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','Images/coffeeorder.jpg',1)"><img src="Images/coffeeorder2.jpg" alt="Coffee Order" name="Image16" width="91" height="13" border="0" id="Image16" /></a><a href="Enqiries.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','Images/enquiries.jpg',1)"><img src="Images/enquiries2.jpg" alt="Enquires" name="Image13" width="69" height="13" border="0" id="Image13" /></a><a href="Products.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','Images/ourproducts.jpg',1)"><img src="Images/ourproducts2.jpg" alt="Products" name="Image14" width="93" height="13" border="0" id="Image14" /></a><a href="OurService.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','Images/ourservice.jpg',1)"><img src="Images/ourservice2.jpg" alt="Our Service" name="Image15" width="83" height="13" border="0" id="Image15" /></a><a href="Home.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','Images/home.jpg',1)"><img src="Images/home2.jpg" alt="Home" name="Image17" width="50" height="13" border="0" id="Image17" /></a></div></td>
</tr>
<tr>
<td colspan="2" id="banner"><div id="headimg"><img src="Images/banner.jpg" width="981" height="126" /></div></td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" id="tagline"><img src="Images/special.jpg" width="399" height="30" />v</td>
</tr>
<tr bgcolor="#000000">
<td id="sidebar"> <div align="center"><img src="Images/bean.jpg" width="200" height="300" align="baseline" /></div>
<font color="#999999" size="-2" face="Arial">All content Copyright
ont></td>
<td bgcolor="#FFFFFF" id="content"> <div id="contentbox">
<div style=" width:778px; height:395px; overflow:auto;">
<table width="759" height="360" border="0" align="center" cellpadding="6" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr>
<td height="356"><font color="#333399" size="4"><em><strong><br />
</strong></em></font> <blockquote style="margin-right: 0px;" dir="ltr">
<div align="center">
<?php
$mail_recipient = "hghghghggh";
$mail_subject = "Enquiries";
$Name = Trim(stripslashes($_REQUEST['Name']));
$Email = Trim(stripslashes($_REQUEST['Email']));
$Company = Trim(stripslashes($_REQUEST['Company']));
$Address = Trim(stripslashes($_REQUEST['Address']));
$Phone = Trim(stripslashes($_REQUEST['Phone']));
$Comments = Trim(stripslashes($_REQUEST['Comments']));
$Body = "";
$Body .= $Name. "\n";
$Body .= $Email. "\n";
$Body .= $Company. "\n";
$Body .= $Address. "\n";
$Body .= $Phone. "\n";
$Body .= $Comments. "\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text; charset=iso-8859-1' . "\r\n";
// send email
$success = mail($mail_recipient, $mail_subject, $Body, $headers);
if($success==true) {
echo "Your mail has been Sent Successfully";}
else
{echo "Your mail has Not Sent Successfully";}
?>
</div>
<div align="center"></div>
</blockquote>
</td>
</tr>
</table>
<div align="center"></div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body></html>
Bookmarks