>". $msg."<<"; // write string fwrite($fd, $str . "\n"); // close file fclose($fd); } logToFile ("mo-error.log","Start of file"); switch($feet){ case "0": $val = 15; break; case "5": $val = 20; break; case "10": $val = 25; break; case "15": $val = 30; break; case "20": $val = 35; break; case "25": $val = 40; break; case "30": $val = 45; break; case "40": $val = 55; break; case "50": $val = 65; break; case "60": $val = 75; break; case "70": $val = 85; break; case "80": $val = 95; break; } $adminExtras = ""; if ($springCleaning == "on") $adminExtras .= "spring cleaning - $$val, "; else $adminExtras .= ""; if ($messy == "on") $adminExtras .= "extra messy - $$val, "; else $adminExtras .= ""; if ($moving == "on") $adminExtras .= "moving in/out - $$val"; else $adminExtras .= ""; //commented out by mo. 30 june 2011 //if ($HTTP_POST_VARS['submit'] == 'Submit Quote Request') { //added by mo to fix the above isse with $HTTP_POST_VARS if ($_POST['submit'] == 'Submit Quote Request') { //inside if statment logToFile ("mo-error.log","inside if statment"); //commented out by mo, 30 june 2011 // $fName = $_POST["fName"]; $lName = $_POST["lName"]; $address = $_POST["address"]; $address2 = $_POST["address2"]; $city = $_POST["city"]; $state = $_POST["state"]; $zip = $_POST["zip"]; $home_phone = $_POST["home_phone"]; $cell_phone = $_POST["cell_phone"]; $email = $_POST["email"]; $extraRooms = $_POST["extraRooms"]; $extras = $_POST["extras"]; $totalCost = $_POST["totalCost"]; $squareFeet = $_POST["squareFeet"]; $preferredContactMethod = $_POST["preferredContactMethod"]; $preferredContactTime = $_POST["preferredContactTime"]; $preferredDay1 = $_POST["preferredDay1"]; $preferredDay2 = $_POST["preferredDay2"]; $preferredTime1 = $_POST["preferredTime1"]; $preferredTime2 = $_POST["preferredTime2"]; $frequency = $_POST["frequency"]; $comments = $_POST["comments"]; $amountWeekly = $_POST["amountWeekly"]; $amountBiMonthly = $_POST["amountBiMonthly"]; $amountMonthly = $_POST["amountMonthly"]; $numOfBeds = $_POST["numOfBeds"]; $numOfBaths = $_POST["numOfBaths"]; logToFile ("mo-error.log","just before send Chay an Email"); // send Chay an Email $to = "efeederstech@gmail.com"; $subject = "Maid Service Maids - Contact Form"; $from = "mail@housecleaningservice.com"; $body = "\n\n"; $body .= "\n\n"; $body .= "First Name: $fName\n"; $body .= "Last Name: $lName\n"; $body .= "Address: $address\n"; $body .= "Address 2: $address2\n"; $body .= "City: $city\n"; $body .= "State: $state\n"; $body .= "Zip: $zip\n\n"; $body .= "Home: $home_area - $home_phone\n\n"; $body .= "Cell: $cell_area - $cell_phone\n\n"; $body .= "E-mail: $email\n\n"; $body .= "Beds: $numOfBeds\n\n"; $body .= "Baths: $numOfBaths\n\n"; $body .= "Square feet: $squareFeet \n\n"; $body .= "Cost of this cleaning: $totalCost\n\n"; $body .= "Weekly: $amountWeekly\n\n"; $body .= "Bi-Weekly: $amountBiMonthly\n\n"; $body .= "Monthly: $amountMonthly\n\n"; $body .= "Preferred contact method: $preferredContactMethod\n\n"; $body .= "Preferred contact time: $preferredContactTime\n\n"; $body .= "Preferred day 1: $preferredDay1\n\n"; $body .= "Preferred day 2: $preferredDay2\n\n"; $body .= "Preferred time 1: $preferredTime1\n\n"; $body .= "Preferred time 2: $preferredTime2\n\n"; $body .= "Future frequency: $frequency\n\n"; $body .= "Extra rooms: $extraRooms\n\n"; $body .= "Extras: $adminExtras\n\n"; $body .= "Comments: $comments\n\n"; $body .= "\n\n"; $MP = "/usr/sbin/sendmail -t"; $spec_envelope = 1; // Access Sendmail // Conditionally match envelope address if($spec_envelope) { $MP .= " -f $from"; } $fd = popen($MP,"w"); fputs($fd, "To: $to\n"); fputs($fd, "From: $from\n"); fputs($fd, "Subject: $subject\n"); fputs($fd, "X-Mailer: PHP4\n"); fputs($fd, $body); pclose($fd); // send customer an Email $to = "$email"; $subject = "Select Maids Quote Request and Terms"; $from = "efeederstech@gmail.com"; $body = "\n\n"; $body .= "\n\n"; $body .= "Below is a copy of the information you submitted along with our Terms and Conditions.\n\n"; $body .= "First Name: $fName\n"; $body .= "Last Name: $lName\n"; $body .= "Address: $address\n"; $body .= "Address 2: $address2\n"; $body .= "City: $city\n"; $body .= "State: $state\n"; $body .= "Zip: $zip\n\n"; $body .= "Home: $home_area - $home_phone\n\n"; $body .= "Cell: $cell_area - $cell_phone\n\n"; $body .= "Beds: $numOfBeds\n\n"; $body .= "Baths: $numOfBaths\n\n"; $body .= "Square feet: $squareFeet\n\n"; $body .= "Cost of this cleaning: $totalCost\n\n"; $body .= "Weekly: $amountWeekly\n\n"; $body .= "Bi-Weekly: $amountBiMonthly\n\n"; $body .= "Monthly: $amountMonthly\n\n"; $body .= "Preferred contact method: $preferredContactMethod\n\n"; $body .= "Preferred contact time: $preferredContactTime\n\n"; $body .= "Preferred day 1: $preferredDay1\n\n"; $body .= "Preferred day 2: $preferredDay2\n\n"; $body .= "Preferred time 1: $preferredTime1\n\n"; $body .= "Preferred time 2: $preferredTime2\n\n"; $body .= "Future frequency: $frequency\n\n"; $body .= "Extra rooms: $extraRooms\n\n"; $body .= "Extras: $extras\n\n"; $body .= "Comments: $comments\n\n"; $body .= "\n\n"; $body .= "Terms and Conditions\n\n"; $body .= "Satisfaction Guarantee\n"; $body .= "Your satisfaction is guaranteed. If you call within 24 hrs we will reclean\n"; $body .= "the problem area at no additional cost to you. No monetary compensation will be provided.\n\n"; $body .= "Appointment-Time Windows\n"; $body .= "We reserve the right to arrive for scheduled appointments within one (1) hour of the\n"; $body .= "scheduled time. For example, if our maids arrive for an appointment scheduled for 10 a.m.\n"; $body .= "anywhere between 9 a.m. and 11 a.m. that day, payment is expected.\n\n"; $body .= "Late Cancellations\n"; $body .= "Any appointment cancelled less than 24 hours prior to the scheduled appointment time will\n"; $body .= "be subject to a $40 cancellation fee.\n\n"; $body .= "Returned Check Fee\n"; $body .= "A $25 fee will be assessed for all cancelled or returned checks.\n\n"; $body .= "Collections Fee\n"; $body .= "A $25 fee will be assessed for all monies owed that must go to our collections office.\n\n"; $body .= "Thank you\n\n"; $body .= "House Cleaning Service\n"; $body .= "\n\n"; $MP = "/usr/sbin/sendmail -t"; $spec_envelope = 1; // Access Sendmail // Conditionally match envelope address if($spec_envelope) { $MP .= " -f $from"; } $fd = popen($MP,"w"); fputs($fd, "To: $to\n"); fputs($fd, "From: $from\n"); fputs($fd, "Subject: $subject\n"); fputs($fd, "X-Mailer: PHP4\n"); fputs($fd, $body); pclose($fd); $html = <<
Quote Request - Submitted
Thanks you for submitting this quote request. We will contact you shortly.
EOMSG; } else { $numOfBeds = $_POST["numOfBeds"]; $numOfBaths = $_POST["numOfBaths"]; $feet = $_POST['feet']; $familyRoom = $_POST['familyRoom']; $bonusRoom = $_POST['bonusRoom']; $formalDiningRoom = $_POST['formalDiningRoom']; $additionalRoom = $_POST['additionalRoom']; $denRoom = $_POST['denRoom']; $officeRoom = $_POST['officeRoom']; $loftRoom = $_POST['loftRoom']; $springCleaning = $_POST['springCleaning']; $messy = $_POST['messy']; $moving = $_POST['moving']; $oven = $_POST['oven']; $fridge = $_POST['fridge']; $petHair = $_POST['petHair']; $totalCost = $_POST['totalCost']; $amountWeekly = $_POST["amountWeekly"]; $amountBiMonthly = $_POST["amountBiMonthly"]; $amountMonthly = $_POST["amountMonthly"]; // translate values: switch($feet){ case "0": $squareFeet = "under 1000"; break; case "5": $squareFeet = "1001 - 1500"; break; case "10": $squareFeet = "1501 - 2000"; break; case "15": $squareFeet = "2001 - 2500"; break; case "20": $squareFeet = "2501 - 3000"; break; case "25": $squareFeet = "3001 - 3500"; break; case "30": $squareFeet = "3501 - 4000"; break; case "40": $squareFeet = "4001 - 5000"; break; case "50": $squareFeet = "5001 - 6000"; break; case "60": $squareFeet = "6001 - 7000"; break; case "70": $squareFeet = "7001 - 8000"; break; case "80": $squareFeet = "8001 - 9000"; break; } $extraRooms = ""; if ($familyRoom == "on") $extraRooms .= "family room, "; if ($bonusRoom == "on") $extraRooms .= "bonus room, "; if ($formalDiningRoom == "on") $extraRooms .= "formal dining room, "; if ($additionalRoom == "on") $extraRooms .= "additional room, "; if ($denRoom == "on") $extraRooms .= "den, "; if ($officeRoom == "on") $extraRooms .= "office, "; if ($loftRoom == "on") $extraRooms .= "loft"; $extras = ""; if ($springCleaning == "on") $extras .= "spring cleaning, "; if ($messy == "on") $extras .= "extra messy, "; if ($moving == "on") $extras .= "moving in/out, "; if ($oven == "on") $extras .= "inside oven, "; if ($fridge == "on") $extras .= "inside fridge, "; if ($dishLoad == "on") $extras .= "1 load of dishes, "; if ($petHair == "on") $extras .= "heavy pet hair removal"; $html = <<
Select Maids Estimate Calculator
First Name
Last Name
Property Location
Address:
Address 2:
City:
State:
Zip:
Preferred
contact
method
Preferred
contact
time
Home Phone:
Any
Home
Cell
Email
Any
Morning
Afternoon
Evening
Cell Phone:
E-mail Address:
Comments:
I have read and agree to the Select Maid
terms and conditions
.
Preferred Days
1st Choice:
Mon
Tue
Wed
Thu
Fri
Sat
2nd Choice:
Mon
Tue
Wed
Thu
Fri
Sat
Preferred Time
1st Choice:
7 - 11:30 AM
11:30 - 4 PM
2nd Choice:
7 - 11:30 AM
11:30 - 4 PM
Future Cleaning
Weekly
Bi-Weekly
Monthly
1-Time Event
Quote Info
Bedrooms:
$numOfBeds
Bathrooms:
$numOfBaths
Square Feet:
$squareFeet
Extra Rooms:
$extraRooms
Extras:
$extras
Total cost of this cleaning:
$ $totalCost
EOMSG; } print($html); ?>