Файловый менеджер - Редактировать - /home/d46091/foodlicenceportal.net/telesales-submit.php
Назад
<?php require("config-tele.php"); session_start(); date_default_timezone_set('Asia/Kolkata'); $date=date('d-m-Y H:i:s'); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; function generate($length = 7) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; $token = ''; while(strlen($token) < $length) { $token .= $chars[mt_rand(0, strlen($chars) - 1)]; } return 'ORDER_' . $token; } date_default_timezone_set('Asia/Kolkata'); $date = date('d-m-Y H:i:s'); if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'CASHFREE') { $orderId = generate(13); } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'PAYU') { $orderId = generate(13); } else { $orderId = ''; } $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); $merchantEmail = 'ttgonline044@gmail.com'; $stage='Production'; // RENEWAL FOOD licence if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'fssai_registration') // (isset($_POST['years'])&& $_POST['years'] =='1_Year') or // (isset($_POST['years'])&& $_POST['years'] =='2_Year') or // (isset($_POST['years'])&& $_POST['years'] =='3_Year') or // (isset($_POST['years'])&& $_POST['years'] =='4_Year') or // (isset($_POST['years'])&& $_POST['years'] =='5_Year') ) { $_SESSION['form_name']='FSSAI Registration'; $_SESSION['form_name']='FSSAI Registration Caterer'; $_SESSION['table_id'] = 'fssai'; $payment_status = 'Unpaid'; if (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '1_Year')) { $product_price = 2999; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '2_Year')) { $product_price = 3299; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '3_Year')) { $product_price = 3899; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '4_Year')) { $product_price = 4399; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '5_Year')) { $product_price = 4899; } elseif ((($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') && ($_POST['years'] == '1_Year')) Or (($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') && ($_POST['years'] == '2_Year')) Or (($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') && ($_POST['years'] == '3_Year')) Or (($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') && ($_POST['years'] == '4_Year')) Or (($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') && ($_POST['years'] == '5_Year'))) { #require('MakePayment.php'); $product_price=$_POST['product_price']; }elseif ((($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '1_Year')) Or (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '2_Year')) Or (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '3_Year')) Or (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '4_Year')) Or (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '5_Year'))) { #require('MakePayment.php'); #exit(); $product_price=$_POST['product_price']; } // elseif (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '1_Year')) { // $product_price = 12999; // } // elseif (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '2_Year')) { // $product_price = 20999; // } // elseif (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '3_Year')) { // $product_price = 28999; // } // elseif (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '4_Year')) { // $product_price = 36999; // } // elseif (($_POST['turnover'] == 'Turnover Above 20CR') && ($_POST['years'] == '5_Year')) { // $product_price = 45999; // } // echo $product_price.'<br>'; // echo $dateDiff; $sql=" INSERT INTO fssai ( form_name, form_page_url, applicant_name, email_id, mobile_number, business_name, nature_business, food_category, designition, office_address, state, pincode, turnover, years, total_amount, payment_status, order_id, terms_of_service, form_created_on, c_gateway, c_gateway_merchant, payment_stage ) VALUES ( '".$_POST["form_name"]."', 'index.php', '".mysqli_real_escape_string($conn,$_POST["applicant_name"])."', '".mysqli_real_escape_string($conn,$_POST["email_id"])."', '".mysqli_real_escape_string($conn,$_POST["mobile_number"])."', '".mysqli_real_escape_string($conn,$_POST["name_of_business"])."', '".mysqli_real_escape_string($conn,$_POST["nature_business"])."', '".mysqli_real_escape_string($conn,$_POST["food_category"])."', '".mysqli_real_escape_string($conn,$_POST["designition"])."', '".mysqli_real_escape_string($conn,$_POST["office_address"])."', '".mysqli_real_escape_string($conn,$_POST["state"])."', '".mysqli_real_escape_string($conn,$_POST["pincode"])."', '".mysqli_real_escape_string($conn,$_POST["turnover"])."', '".mysqli_real_escape_string($conn,$_POST["years"])."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked', '".$date."', '".$currentPaymentGateway."', '".$merchantEmail."', '".$stage."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $ch = curl_init('https://crm.techlounge.co.in/api.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=FSSAI&website=foodlicenceapply.com&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $sales_executive =urlencode($_POST['sales_executive']); $sol_msg = urlencode('Payment Initiated By ').$sales_executive; $ch = curl_init('https://crm5.in/api/telesales-registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=FSSAI&website=foodlicenceapply.com&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'&sales_executive='.$sales_executive.'&solNumber='.$sol_msg.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_5"] = $response; $ch = curl_init('https://crm11.in/api/telesales-registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=FSSAI&website=FOODLICENCEAPPLY.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'&sales_executive='.$sales_executive.'&solNumber='.$sol_msg.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_11"] = $response; //Payment Gateway Redirection if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'CASHFREE') { include_once('./cashfree/request.php'); } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'ATOM') { include_once('./atom/submit.php'); } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'PAYU') { include_once('./payu/payu-submit.php'); } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'RAZORPAY') { include_once('./razorpay/razorpay-submit.php'); } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'INSTAMOJO') { include_once('./instamojo/submit.php'); } function generateRandomInvoice($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomInvoice = ''; for ($i = 0; $i < $length; $i++) { $randomInvoice .= $characters[rand(0, $charactersLength - 1)]; } return $randomInvoice; } $invRandGenId = generateRandomInvoice(); $host_name = 'foodlicenceapply.com'; $email = $_POST['email_id']; // $payment_link ='https://paynw.xyz/Transaction.php?invId='.$invRandGenId.''; // $curls = curl_init(); // curl_setopt_array($curls, array( // CURLOPT_URL => 'https://paynw.xyz/submit.php', // CURLOPT_RETURNTRANSFER => true, // CURLOPT_ENCODING => '', // CURLOPT_MAXREDIRS => 10, // CURLOPT_TIMEOUT => 0, // CURLOPT_FOLLOWLOCATION => true, // CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, // CURLOPT_CUSTOMREQUEST => 'POST', // CURLOPT_POSTFIELDS => array('formIds' => $_SESSION["panel_form_id_2"], 'formName' => 'FSSAI Registration','name' => $applicant_name,'mobile' => $mobile_number,'email' => $email,'website' => $host_name,'invId' => $invRandGenId,'business'=>'FSSAI', 'kindOfBusiness' => $_POST["nature_business"], 'year' => $_POST["years"],'turnover' => $_POST['turnover'] ), // )); // $responses = curl_exec($curls); // curl_close($curls); // $responses; //payVid// $sql_select_cid = 'SELECT * FROM cid WHERE uid = "'.$_SESSION["form_id"].'"'; $result_select_cid = $conn->query($sql_select_cid); $row_select_cid = $result_select_cid ->fetch_assoc(); $uId = $row_select_cid['uid']; $cid = $row_select_cid['cid']; $sql_select_form = 'SELECT * FROM fssai WHERE id = "'.$uId.'"'; $result_select_form = $conn->query($sql_select_form); $row_select_form = $result_select_form->fetch_assoc(); $price = $row_select_form['total_amount']; $pageName = $row_select_form['page_name']; $rand =''; $payCondtn='&oid=true&oid=true'; $host_name = 'foodlicenceapply.com/'.$pageName; $payment_links = 'https://'.$host_name.'?cid='.$cid; header('Refresh: 0;URL=crequire("checkout/{$checkout}.php")'); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'foodlicenceapply.com'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@foodlicenceapply.com'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@foodlicenceapply.com", "FOOD LICENCE"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Ref : Your ".$_POST['form_name']." "; $mail->Body = " <!DOCTYPE HTML PUBLIC '-//W3C//DTD XHTML 1.0 Transitional //EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'> <head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='x-apple-disable-message-reformatting'> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <title></title> <style type='text/css'> table, td { color: #000000; } a { color: #0000ee; text-decoration: underline; } @media only screen and (min-width: 670px) { .u-row { width: 650px !important; } .u-row .u-col { vertical-align: top; } .u-row .u-col-100 { width: 650px !important; } } @media (max-width: 670px) { .u-row-container { max-width: 100% !important; padding-left: 0px !important; padding-right: 0px !important; } .u-row .u-col { min-width: 320px !important; max-width: 100% !important; display: block !important; } .u-row { width: calc(100% - 40px) !important; } .u-col { width: 100% !important; } .u-col > div { margin: 0 auto; } } body { margin: 0; padding: 0; } table, tr, td { vertical-align: top; border-collapse: collapse; } p { margin: 0; } .ie-container table, .mso-container table { table-layout: fixed; } * { line-height: inherit; } a[x-apple-data-detectors='true'] { color: inherit !important; text-decoration: none !important; } </style> <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap' rel='stylesheet' type='text/css'> </head> <body class='clean-body u_body' style='margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #ffffff;color: #000000'> <table style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #ffffff;width:100%' cellpadding='0' cellspacing='0'> <tbody> <tr style='vertical-align: top'> <td style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #dff1ff;'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: #f8f8f8;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 10px solid #f07e01;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 10px solid #019541;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px 0px;font-family:sans-serif;' align='left'> <table width='100%' cellpadding='0' cellspacing='0' border='0'> <tr> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <a href='#' style='cursor:default;'> <img align='center' border='0' src='https://foodlicenceapply.com/assets/img/fssai-logo.png' alt='Image' title='Image' style='outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 15%;max-width: 156px;' width='156'/></a> </td> </tr> </table> </td> </tr> </tbody> </table> <div style='padding: 0px;border-top: 0px solid #f07e01;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 10px solid #f07e01;'></div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #f3fbfd;'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: transparent;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:40px 30px 10px;font-family:sans-serif;' align='left'> <div style='color: #1b262c; line-height: 140%; text-align: left; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 140%;'><strong><span style='font-size: 15px;'>Dear <strong>".$_POST["applicant_name"]."</strong></span></strong></p> </div> </td> </tr> </tbody> </table> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px 30px 20px;font-family:sans-serif;' align='left'> <div style='color: #1b262c; line-height: 140%; text-align: justify; word-wrap: break-word;'> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>Thank you for submitting your application for ".$_POST["form_name"]." on our website.</span></p><br> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>This mail is an acknowledgement of successful submission of your application, however this mail does not confirm the payment status against the submitted application.</span></p><br> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>If you have already made payment, then please sit back and relax, your order will be queued up for processing. If any documents will be required, you will be intimated regarding the same on your registered email address.</span></p><br> <!--<p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>If you have not yet made the payment, click on the link below to make the payment. Processing of your application will be done only after payment is confirmed.</span></p>--> </div> </td> </tr> </tbody> </table> <!--<table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:sans-serif;' align='left'> <div align='center'> <button style='text-align:left;background-image:linear-gradient(to left,#f07e01,#f07e01);padding:10px 20px;border: none;'><a href='".$payment_links."' style='text-decoration:none; color:#fff;font-size:15px;font-family:sans-serif;cursor:pointer;'>Verify and Pay</a></button> </div> </td> </tr> </tbody> </table>--> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:18px 50px 50px;font-family:sans-serif;' align='left'> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background: linear-gradient(#f07e01, #c96600);'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: transparent;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:18px 30px;font-family:sans-serif;' align='left'> <div style='color: #ffffff; line-height: 140%; text-align: left; word-wrap: break-word;'> <p style='font-size: 13px; line-height: 140%;'><span style='font-size: 14px; line-height: 19.6px;'>Regards,<br> Team Processing,<br> For Order Status: <a href='mailto:order@foodlicenceapply.com' style='text-decoration:none;color: #fff !important;'>order@foodlicenceapply.com</a></span></p> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </td> </tr> </tbody> </table> </body> </html>"; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@foodlicenceapply.com"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> EMAIL ID: ".$_POST['email_id']."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> NATURE OF BUSINESS: ".$_POST['nature_business']."<br> FOOD CATEGORY: ".$_POST['food_category']."<br> DESIGNATION: ".$_POST['designition']."<br STATE: ".$_POST['state']."<br> PINCODE: ".$_POST["pincode"]."<br> NUMBER OF YEARS: ".$_POST['years']." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка