]*>|<\/?script.*?>/i', $applicant_name) || strlen($applicant_name) > 50) { exit("Invalid applicant name."); } foreach ($suspicious_patterns as $pattern) { if (preg_match($pattern, $applicant_name)) { exit("Invalid applicant name. It contains suspicious content."); } } if (!preg_match('/^[6789]\d{9}$/', $mobile_number)) { exit("Invalid mobile number. It must be a 10-digit number starting with 6, 7, 8, or 9."); } $_SESSION['table_id'] = 'licence_guide_book_form'; $payment_status = 'Unpaid'; $product_price = 525; if((isset($_POST['coupon'])) && ((strtoupper($_POST['coupon']) == 'OFFER200'))){ $product_price = 525 - 200; } $sql = " INSERT INTO licence_guide_book_form ( form_name, applying_for, applicant_name, mobile_number, email_id, address, state, district, landmark, pincode, total_amount, payment_status, form_created_on, c_gateway, c_gateway_merchant, payment_stage, form_created_date, payment_id, order_id ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applying_for"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["present_address"]."', '".$_POST["office_state"]."', '".$_POST["office_district"]."', '".$_POST["landmark"]."', '".$_POST["pincode"]."', '".$product_price."', '".$payment_status."', '".$date."', '".$currentPaymentGateway."', '".$merchantEmail."', '".$stage."', '".$TodayDate."', '".$payment_id."', '".$orderId."' )"; if(!$result = $conn->query($sql)) { die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $form_name = urlencode($_POST["form_name"]); // $api_url = "https://demolounge.in/admin/api_insert_sales.php"; // $data = [ // 'site_url' => 'https://'.strtolower('drivinglicencehelp.com'), // 'form_name' => $_POST["form_name"], // 'business_area' => 'DL', // 'cus_full_name' => $_POST['applicant_name'], // 'cus_mobile' => $mobile_number, // 'cus_email' => $email_id, // 'state' => $_POST['office_state'], // 'order_id' => $orderId, // 'payment_amount' => 525 // ]; // $ch = curl_init($api_url); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); // curl_setopt($ch, CURLOPT_POST, true); // curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); // $response = curl_exec($ch); // if (curl_errno($ch)) { // throw new Exception('cURL Error: ' . curl_error($ch)); // } // curl_close($ch); $ch = curl_init('https://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=DL&website=DRIVINGLICENCEHELP.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; $_SESSION['form_name'] = $_POST['form_name']; $_SESSION['applicant_name'] = $_POST['applicant_name']; $_SESSION['mobile_number'] = $_POST['mobile_number']; $_SESSION['email_id'] = $_POST['email_id']; $_SESSION['total_amount'] = $product_price; $_SESSION['order_id'] = generateTxnId(17); // $api_url = "https://demolounge.in/admin/api_insert_sales.php"; // $data = [ // 'site_url' => 'https://'.strtolower('drivinglicencehelp.com'), // 'form_name' => $_POST["form_name"], // 'business_area' => 'DL', // 'cus_full_name' => $_POST['applicant_name'], // 'cus_mobile' => $_POST['mobile_number'], // 'cus_email' => $email_id, // 'state' => $_POST['email_id'], // 'order_id' => $orderId, // 'payment_amount' => $product_price // ]; // $ch = curl_init($api_url); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); // curl_setopt($ch, CURLOPT_POST, true); // curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); // $response = curl_exec($ch); // if (curl_errno($ch)) { // throw new Exception('cURL Error: ' . curl_error($ch)); // } // curl_close($ch); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->SMTPDebug = 2; $mail->Host = 'smtp.hostinger.com'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@drivinglicencehelp.com'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@drivinglicencehelp.com", "Driving Licence Registration"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; $mail->Body = " Dear ".$_POST["applicant_name"].",

Thank you for submitting your application for ".$_POST["form_name"]." on our website.

"; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@drivinglicencehelp.com"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = "APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } include_once("editable/submit-form.php"); // Easebuzz Payment $easebuzzObj = new Easebuzz($MERCHANT_KEY, $SALT, $ENV); $postData = array ( "txnid" => "".$_SESSION['order_id']."", "amount" => "".$product_price.".00"."", "firstname" => "".$_POST["applicant_name"]."", "email" => "".$_POST["email_id"]."", "phone" => "".$_POST["mobile_number"]."", "productinfo" => "".$_POST["form_name"]."", "surl" => "https://drivinglicencehelp.com/response.php", "furl" => "https://drivinglicencehelp.com/response.php", "udf1" => "".$_SESSION["form_id"]."", "udf2" => "licence_guide_book_form", ); $easebuzzObj->initiatePaymentAPI($postData); } die(); // Enquiry if(isset($_POST["submit"])) { $sql=" INSERT INTO licence_guide_book_form ( form_name, applicant_name, mobile_number, email_id, form_created_on ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$date."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $product_price = 'ENQUIRY'; // ---------------------------------- $post = [ 'api_key' => 123456, 'formId' => $_SESSION["form_id"], 'vendor' => 'TTG', 'business' => 'DL', 'website' => 'drivinglicencehelp.com', 'amount' => $product_price, 'status' => 'Unpaid', 'name' => $_POST['applicant_name'], 'mobile' => $_POST['mobile_number'], 'email' => $_POST['email_id'], 'state' => $_POST['state'], 'formName' => $_POST['form_name'], 'orderId' => $orderId, ]; $ch = curl_init('https://newcrm.techlounge.co.in/v1/form-data-send-to-crm'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); curl_close($ch); // -------------------------------------- $ch = curl_init('https://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=DL&website=DRIVINGLICENCEHELP.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; $ch = curl_init('https://crm5.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=DL&website=DRIVINGLICENCEHELP.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_5"] = $response; $form_name = urlencode($_POST["form_name"]); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'smtp.hostinger.com'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@drivinglicencehelp.com'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@drivinglicencehelp.com", "Driving Licence Registration"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; $mail->Body = " Dear ".$_POST["applicant_name"].",

Thank you for submitting your application for ".$_POST["form_name"]." on our website.

"; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@drivinglicencehelp.com"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = "APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } echo ""; echo ""; } } ?>