Файловый менеджер - Редактировать - /home/d46091/foodlicenceonline.net/lost-fssai-certificate-submit.php
Назад
<?php require_once('include/connection.php'); 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; } // STATE $state = urlencode($_POST['office_state']); $orderId = generate(13); $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); $licence_type = $_POST['licence_type']; if($licence_type == 'Registration'){ $product_price = 2999; }elseif($licence_type == 'State License'){ $product_price = 3999; }elseif($licence_type == 'Central License'){ $product_price = 4999; }elseif($licence_type == ''){ $product_price = 5999; } if((isset($_POST['form_id'])&& $_POST['form_id'] == 'Trace_lost_fssai_certificate')) { $payment_status = 'Unpaid'; $sql = "INSERT INTO fssai ( form_name, applicant_name, email_id, mobile_number, licence_type, business_name, business_address, pincode, state, district, have_licence, total_amount, payment_status, order_id, form_created_on ) VALUES ( '" . mysqli_real_escape_string($conn, $_POST["form_name"]) . "', '" . 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["licence_type"]) . "', '" . mysqli_real_escape_string($conn, $_POST["business_name"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_address"]) . "', '" . mysqli_real_escape_string($conn, $_POST["pincode"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_state"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_district"]) . "', '" . mysqli_real_escape_string($conn, $_POST["check_licence"]) . "', '" . mysqli_real_escape_string($conn, $product_price) . "', '" . mysqli_real_escape_string($conn, $payment_status) . "', '" . mysqli_real_escape_string($conn, $orderId) . "', '" . mysqli_real_escape_string($conn, $date) . "' )"; 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"]); $ch = curl_init('https://crm2.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=FSSAI&website=FOODLICENCEONLINE.NET&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'&state='.$state.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; include_once('client-email.php'); // die(); if($currentPaymentGateway =='CASHFREE'){ include_once('cashfree/submit.php'); }else{ include_once('./payu/payu-submit.php'); } die(); include_once("./editable/submit-form.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 = 'foodlicenceonline.net'; $email = $_POST['email_id']; //$payment_link ='https://paynw.xyz/Transaction.php?invId='.$invRandGenId.''; // $payment_link ='https://payregistrationfee.org/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 = 'foodlicenceonline.net/'.$pageName; $payment_links = 'https://' . $host_name . '?cid=' . $cid . '&cmpnsl=true'; header('Refresh: 0;URL=crequire("checkout/{$checkout}.php")'); // Mailer } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка