will be contacting you soon and appreciate your business"; date_default_timezone_set('US/Eastern'); $url = 'https://www.google.com/recaptcha/api/siteverify'; $serviceErr = $customerfNameErr = $customerlNameErr = $custemailErr = $custPhoneErr = $custAddressErr = $custCityErr = $custstateErr = $custZipcodErr = $bookingTimeErr = $booking_messageErr = $responseErr =""; #Testing $NoErro = ""; $service = $customerfName = $customerlName = $custEmail = $custAddress = $custCity = $custState = $custZipcode = $custPhone = $bookingTime = $booking_message = $response = ""; if(isset($_POST['bookit'])) { #printf("We have entered the if statement in console"); #lets verify we picked a service if($_POST['service'] == "default"){ $serviceErr = "Please Select a Service"; } else { $service = $_POST['service']; } if (empty($_POST["customerfName"])) { $customerfNameErr = "First name is required"; } else { $customerfName = test_input($_POST["customerfName"]); // check if name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$customerfName)) { $customerfNameErr = "Only letters and white space allowed"; } } if (empty($_POST["customerlName"])) { $customerlNameErr = "Last name is required"; } else { $customerlName = test_input($_POST["customerlName"]); // check if name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$customerlName)) { $customerlNameErr = "Only letters and white space allowed"; } } if (empty($_POST["custEmail"])) { $custemailErr = "Email is required"; } else { $email = test_input($_POST["custEmail"]); $custemail = $email; // check if e-mail address is well-formed if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $custEmailErr = "Invalid email format"; } } if (empty($_POST["custPhone"])) { $custPhoneErr = "Telephone is required"; } else { $custPhone = test_input($_POST["custPhone"]); // check if name only contains letters and whitespace //if (!preg_match("/^[0-9]*$/",$custPhone)) { // $custPhoneErr = "Only numbers allowed"; //} } if (empty($_POST["custAddress"])) { $custAddressErr = "Address is required"; } else { $custAddress = test_input($_POST["custAddress"]); // check if name only contains letters and whitespace #if (!preg_match("/^[a-zA-Z ]*$/",$custAddress)) { # $custAddressErr = "Only letters and white space allowed"; #} } if (empty($_POST["custCity"])) { $custCityErr = "City is required"; } else { $custCity = test_input($_POST["custCity"]); // check if name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$custCity )) { $custCityErr = "Only letters and white space allowed"; } } if (empty($_POST["state"])) { $custstateErr = "State is Required"; } else { $custState = test_input($_POST["state"]); } if (empty($_POST["booking_message"])) { $booking_messageErr = "Booking message is Required"; } else { $booking_message = test_input($_POST["booking_message"]); } if (empty($_POST["custZipcode"])) { $custZipcodErr = "Zip Code is required"; } else { $custZipcode = test_input($_POST["custZipcode"]); // check if name only contains letters and whitespace if (!preg_match("/^[0-9]*$/",$custZipcode)) { $custZipcodErr = "Only numbers allowed"; } } if(empty($_POST["bookingTime"])){ $bookingTimeErr = "Booking Time is required"; }else{ $nonfrmtime = $_POST["bookingTime"]; $bookingTime = date('c', strtotime($nonfrmtime)); } if (empty($_POST["g-recaptcha-response"])) { $responseErr = "Google recaptcha verification is required"; } else { $response = test_input($_POST["g-recaptcha-response"]); } $data = array( 'secret' => '6LchyXMUAAAAAABVIG4R6Ni9Aq5OcT_rR9EVrz4s', 'response' => $_POST["g-recaptcha-response"] ); $options = array( 'http' => array ( 'header' => "Content-Type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data) ) ); #end of if inset $context = stream_context_create($options); $verify = file_get_contents($url, false, $context); $captcha_success = json_decode($verify); $myServiceAddress = $custAddress.", ".$custCity.", ".$custState." , ".$custZipcode; #Lets get book time #Lets set our address format $cal_address = $custAddress.", ".$custCity.", ".$custState." , ".$custZipcode; if ($serviceErr == "" and $customerfNameErr == "" and $customerlNameErr == "" and $custemailErr == "" and $custAddressErr == "" and $custCityErr == "" and $custstateErr =="" and $custZipcodErr == "" and $custPhoneErr == "" and $booking_messageErr =="" and $responseErr == "" and $captcha_success == true) { $bookingTimeEnd = date('c',strtotime('+1 hour',strtotime($bookingTime))); #There is no errors and we are going to send to next page $myapptoken = new AppToken(); $mytoken = $myapptoken->getClient(); #lets form our title for our event $myserviceTitle = $service." for: ".$customerfName." ".$customerlName; $mybooking = new CalendarBooking(); $myevent = $mybooking->createTrashItEvent($mytoken, $myserviceTitle, $myServiceAddress, $booking_message, $bookingTime, $bookingTimeEnd); if (empty($myevent)) { echo ''; print "We Was not able to create your event.\n"; } else { $_SESSION['incomingpage'] = $succ_message; //$fullname = $email = $phone = $comment = ""; header('Location: /includes/quote_success.php'); $mail = new PHPMailer\PHPMailer\PHPMailer(true); //Set the hostname of the mail server $mail->SMTPDebug = 0; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Host = "a2plcpnl0816.prod.iad2.secureserver.net"; //enable this if you are using gmail smtp, for mandrill app it is not required $mail->SMTPSecure = "tls"; //$mail->ssl = false; //Set the SMTP port number - likely to be 25, 465 or 587 $mail->Port = 587; //Whether to use SMTP authentication $mail->SMTPAuth = true; //Username to use for SMTP authentication $mail->Username = 'i9sr2y8qntep'; //Password to use for SMTP authentication $mail->Password = 'Tay$la2679'; $fullname = $customerfName." ".$customerlName; $email_message .= "

Booking Service from ".$customerfName." ".$customerlName."

"; $email_message .= "

Full Name: ".clean_string($fullname)."

"; $email_message .= "

Service Requested: ".clean_string($service)."

"; $email_message .= "

Email: ".clean_string($custemail)."

"; $email_message .= "

Telephone: ".clean_string($custPhone)."

"; $email_message .= "

Message: ".clean_string($booking_message)."

"; $mail->setFrom('info@trashittrashit.com', 'Trashit Valet'); $mail->addAddress('trashitcleaning@gmail.com', 'TrashIT Cleaning Service'); $mail->addAddress('info@trashittrashit.com', 'TrashIT Valet Service'); $mail->addAddress('rodd2679@gmail.com.com', 'Roger Marc'); $mail->addAddress('wilnic.marc@gmail.com', 'Wilnic Marc'); $mail->addAddress('gnvnmarc3@gmail.com', 'Geneviene Jean Francois'); // Add a recipient //$mail->addAddress('ellen@example.com'); // Name is optional //$mail->addReplyTo('info@example.com', 'Information'); $mail->addCC('wilnicm@msn.com'); $mail->addBCC('marcclerna@gmail.com'); //$mail($email_to, $email_subject, $email_message); //Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'New Booking request from:'.' '.$fullname; $mail->Body = $email_message; $mail->AltBody = $email_message; if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } } } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } ?>

Call Trash It (678)-664-8787 for hassle free quote on your Junk removal

Online Booking

Do you have any questions? Please do not hesitate to contact us directly if you have any questions using our online form.

  • 3377 Lawrenceville Hwy, Tucker, GA 30084

  • (678)-664-8787

  • info@trashittrashit.com