Файловый менеджер - Редактировать - /home/d46091/foodlicenceportal.net/submitRenewal1.php
Назад
<?php require("config-test.php"); //require('razorpay-php/Razorpay.php'); session_start(); date_default_timezone_set('Asia/Kolkata'); $date=date('d-m-Y H:i:s'); //use Razorpay\Api\Api; 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; } // if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'CASHFREE') { // $orderId = generate(13); // } else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'PAYU') { // $orderId = generate(13); // } else { // $orderId =''; // } $orderId = generate(13); $merchantEmail = 'novaelite32@gmail.com'; $stage='Production'; // echo 'test'; // echo $_POST['dayx']; // RENEWAL FOOD licence if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'renewal_food_licence') // (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']='Renewal FOOD Licence'; $_SESSION['table_id'] = 'fssai'; $payment_status = 'Unpaid'; $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); $ac = $_POST["have_acount"] = ''; // if(isset($_POST['nature_business']) && ($_POST['nature_business']=='Manufacturer')){ // $year = $_POST['yearx']; // }else{ // $year = $_POST['years']; // } $year = $_POST['years']; // $fine = 0; // $expired_licence_date = strtotime($_POST['date_of_expiring']); // $current_date = strtotime(date('d-m-Y')); // $diffDays = $current_date - $expired_licence_date; // $Days = abs(round($diffDays/(24*60*60))); // echo $Days ."</br>"; // echo $expired_licence_date ."</br>"; // echo $current_date ."</br>"; if(!empty($_FILES['upload_existing_fssai_licence']['name'])) { $url = "https://uploadmsme.in/upload.php"; $tmp_file_name = $_FILES['upload_existing_fssai_licence']['tmp_name']; $file_type = $_FILES['upload_existing_fssai_licence']['type']; $file_name = basename($_FILES['upload_existing_fssai_licence']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); if(empty($tmp_file_name)) { echo''; }else { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $upload_existing_fssai_licence = curl_exec($ch); curl_close($ch); } }else{ $upload_existing_fssai_licence = ''; } //For Normal Registration// if (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '1_Year')) { $product_price = 2997; } elseif (($_POST['nature_business'] == 'Manufacturer') && ($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['yearx'] == '1_Year')) { $product_price = 3700; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '2_Year')) { $product_price = 3297; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '3_Year')) { $product_price = 3897; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '4_Year')) { $product_price = 4397; } elseif (($_POST['turnover'] == 'Turnover Upto 12 Lacs') && ($_POST['years'] == '5_Year')) { $product_price = 4897; } elseif ($_POST['turnover'] =='Turnover Above 12 Lacs Upto 20CR'){ $manufacturedList = array( "Manufacturer" ); $turnover = $_POST['turnover']; $kindOfBuissness = $_POST['nature_business']; // $productionCapacity = $_POST['production_capacity']; if (in_array($kindOfBuissness, $manufacturedList)) { $price='5150'; $servicePrice ='4847'; }else{ $price='3500'; $servicePrice ='3497'; } $years = $_POST['yearx']; $orderAmount = $servicePrice + $price; $product_price = $orderAmount ; }elseif ($_POST['turnover'] =='Turnover Above 20CR'){ $servicePrice ='8850'; $years = $_POST['yearx']; $price= 8147; $orderAmount = $servicePrice + $price; $product_price = $orderAmount ; } // echo $product_price; $sql=" INSERT INTO fssai ( form_name, form_page_url, applicant_name, email_id, mobile_number, business_name, have_account, username, password, name_of_applicant_responsible_for_taking_necessary_steps, designition, business_address, modify_existing_licence, existing_licence_number, upload_existing_fssai_licence, specify, state, pan_card_number, pincode, expiry_date, food_category, nature_business, turnover, years, total_amount, payment_status, order_id, terms_of_service, form_created_on, c_gateway, c_gateway_merchant, payment_stage ) VALUES ( '".mysqli_real_escape_string($conn,$_POST["form_name"])."', 'renewal-existing-food-licence.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,$ac)."', '".mysqli_real_escape_string($conn,$_POST["username"])."', '".mysqli_real_escape_string($conn,$_POST["password"])."', '".mysqli_real_escape_string($conn,$_POST["applicant1_name"])."', '".mysqli_real_escape_string($conn,$_POST["designition"])."', '".mysqli_real_escape_string($conn,$_POST["business_address"])."', '".mysqli_real_escape_string($conn,$_POST["modify_existing"])."', '".mysqli_real_escape_string($conn,$_POST["existing_licence_number"])."', '".$upload_existing_fssai_licence."', '".mysqli_real_escape_string($conn,$_POST["specify"])."', '".mysqli_real_escape_string($conn,$_POST["state"])."', '".mysqli_real_escape_string($conn,$_POST["pan_card_number"])."', '".mysqli_real_escape_string($conn,$_POST["pincode"])."', '".mysqli_real_escape_string($conn,$_POST["expiry_date"])."', '".mysqli_real_escape_string($conn,$_POST["food_category"])."', '".mysqli_real_escape_string($conn,$_POST["nature_business"])."', '".mysqli_real_escape_string($conn,$_POST["turnover"])."', '".mysqli_real_escape_string($conn,$year)."', '".$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; include_once("./editable/submit-form.php"); $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=FOODLICENCEAPPLY.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; if (($_POST['turnover'] == 'Turnover Above 12 Lacs Upto 20CR') Or ($_POST['turnover'] == 'Turnover Above 20CR')) { include_once('editable/submit-form.php'); $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=FOODLICENCEAPPLY.COM&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // define('PAYU_REQUEST_TXN_ID', $orderId); // define('PAYU_REQUEST_FIRST_NAME', $_POST['applicant_name']); // define('PAYU_REQUEST_EMAIL', $_POST['email_id']); // define('PAYU_REQUEST_PHONE', $_POST['mobile_number']); // define('PAYU_REQUEST_AMOUNT', $product_price); // define('PAYU_REQUEST_PRODUCT_INFO', $_POST["form_name"]); // define('PAYU_REQUEST_HASH', hash('sha512', ''.PAYU_MERCHANT_KEY.'|'.PAYU_REQUEST_TXN_ID.'|'.PAYU_REQUEST_AMOUNT.'|'.PAYU_REQUEST_PRODUCT_INFO.'|'.PAYU_REQUEST_FIRST_NAME.'|'.PAYU_REQUEST_EMAIL.'|'.PAYU_MID.'||||||||||'.PAYU_MERCHANT_SALT.'')); // $curl = curl_init(); // curl_setopt_array($curl, array( // CURLOPT_URL => PAYU_BASE_URL, // CURLOPT_RETURNTRANSFER => true, // CURLOPT_HEADER => true, // CURLOPT_NOBODY => 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( // 'key' => PAYU_MERCHANT_KEY, // 'surl' => PAYU_SURL, // 'furl' => PAYU_FURL, // 'service_provider' => PAYU_SERVICE_PROVIDER, // 'txnid' => PAYU_REQUEST_TXN_ID, // 'firstname' => PAYU_REQUEST_FIRST_NAME, // 'email' => PAYU_REQUEST_EMAIL, // 'phone' => PAYU_REQUEST_PHONE, // 'udf1' => PAYU_MID, // 'amount' => PAYU_REQUEST_AMOUNT, // 'productinfo' => PAYU_REQUEST_PRODUCT_INFO, // 'hash' => PAYU_REQUEST_HASH // ) // )); // $response = curl_exec($curl); // curl_close($curl); // preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $response, $location); // // header('Location: '.$location[0][0].''); // $urlPay = $location[0][0]; include_once('./nimbbl/create-order.php'); include("MakePaymentRenw.php"); }else{ // Payment Gateway Redirection #include_once('payu/payu-submit.php'); include_once('./nimbbl/create-order.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://payregistrationfee.org/TransactionPayment.php?invId='.$invRandGenId.''; // $curls = curl_init(); // curl_setopt_array($curls, array( // CURLOPT_URL => 'https://payregistrationfee.org/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' => 'Renewal 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; $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 = 'renewal-existing-food-licence.php'; $rand =''; $payCondtn='&oid=true&oid=true'; $host_name = 'foodlicenceapply.com/'.$pageName; $payment_links = 'https://' . $host_name . '?cid=' . $cid . '&cmpnsl=true'; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка