Файловый менеджер - Редактировать - /home/d46091/gemregistrationportal.org/submit.php
Назад
<?php session_start(); if (isset($_POST['vercode'])) { if ((empty($_SESSION["vercode"])) || ($_SESSION["vercode"] != $_POST['vercode'])) { die("<script>alert('Invalid Verification Code'); history.back();</script>"); } } include_once('./config.php'); include_once('./validate-special.php'); 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']); //state// if (isset($_POST['state'])) { $state = urlencode($_POST['state']); } else if (isset($_POST['office_state'])) { $state = urlencode($_POST['office_state']); } else { $state = '-'; } $crm_website = 'GEMREGISTRATIONPORTAL.ORG'; $url1 = 'gemregistrationportal.org'; $webpath = pathinfo($url1, PATHINFO_FILENAME); $website = 'GEMREGISTRATIONPORTAL.ORG'; $table='gem_registration'; //gem Registrations if (isset($_POST['form_id']) && ($_POST['form_id'] == "gem_registration")) { //Retrive Product Price According To Product Name(form_id) $_SESSION['table_id'] = 'gem_registration'; $payment_status = 'Unpaid'; // $sql ="SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'"; // $result = $conn->query($sql); // $row = $result->fetch_assoc(); // $product_price = $row["product_price"]; $product_price = 2996; $form_page_url = $_POST["form_id"].'.php'; $form_page_url = str_replace('_','-',$form_page_url); $_POST["sol_number"] =''; $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; if(!empty($_FILES['upload_pan_card']['name'])) { $url = "https://uploadnow.xyz/upload.php"; $tmp_file_name = $_FILES['upload_pan_card']['tmp_name']; $file_type = $_FILES['upload_pan_card']['type']; $file_name = basename($_FILES['upload_pan_card']['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_pancard = curl_exec($ch); curl_close($ch); } }else{ $upload_pancard = ''; } $sql = "INSERT INTO $table ( form_name, form_page_url, applicant_name, mobile_number, email_id, date_of_birth, office_address, office_state, office_district, office_pincode, aadhaar_number, pan_card_number, udyam_number, bank_name, bank_address, bank_account_number, ifsc_code, business_name, incorporation_date, type_of_organisation, upload_pan_card, total_amount, payment_status, order_id, terms_of_service, form_created_on ) VALUES ( '".$_POST["form_name"]."', '".$form_page_url."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["dob"]."', '".$_POST["office_address"]."', '".$_POST["office_state"]."', '".$_POST["office_district"]."', '".$_POST["office_pincode"]."', '".$_POST["aadhaar_number"]."', '".$_POST["pan_card_number"]."', '".$_POST["udyam_number"]."', '".$_POST["bank_name"]."', '".$_POST["bank_address"]."', '".$_POST["bank_account_number"]."', '".$_POST["ifsc_code"]."', '".$_POST["business_name"]."', '".$_POST["incorporation_date"]."', '".$_POST["type_of_organisation"]."', '".$upload_pancard."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked', '".$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://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=GEM&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; setcookie("panel_form_id_2", $response, time() + (86400 * 30), "/"); $ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=GEM&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); 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') { echo 11;die(); include_once('./payu/payu-submit.php'); }else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'RAZORPAY') { include_once('./razorpay/razorpay-submit.php'); } // mail function generateRandomInvoice($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomInvoice = ''; for ($i = 0; $i < $length; $i++) { $randomInvoice .= $characters[rand(0, $charactersLength - 1)]; } return $randomInvoice; } $rand = generateRandomInvoice(); $host_name = 'gemregistrationportal.org'; // $payUrl = 'https://pmny.in/oI2qyU6Q5LeY'; $payUrl = 'https://pmny.in/VI1oDqJs8cvU'; $payUrl = 'https://'.$host_name.'/Payment.php?uFinVsiD='.$rand.'&name='.$_POST['applicant_name'].'&mobileNumber='.$_POST['mobile_number'].'&emailId='.$_POST['email_id']; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Ref :: Your ".$_POST["form_name"].""; $mail->Body = ' <div style="width:100%; float:left;margin:0;padding:0; background-color: #eee;"> <div style="width:80%;background-color:#fff;margin:auto;"> <div style="padding:30px 0px 30px 0px;text-align:center;background-image:linear-gradient(#286ed8,#286ed8);border-bottom-left-radius: 30px;border-bottom-right-radius:30px;border-bottom: 4px solid #a0a0a0;"> <span style="display:block;color:#fff;font-size:25px;font-weight:700;font-family:sans-serif;">GEM REGISTRATION SERVICE</span> </div> <div style="padding:20px"> Dear <strong>'.$_POST["applicant_name"].'</strong>, <br><br> Thank you for submitting your application for '.$_POST["form_name"].' on our website. <br><br> This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the payment status against the submitted application. <br><br> If you have already made payment, then please sit back and relax, your order will be processed and acknowledgement of the same will be sent on your registered email address. <br><br> If you have not yet made the payment, processing of your application will not be done unless you make the payment. <br><br> <span style="color:#d86400;font-weight:bold">Click on the link below to make payment.</span> <br><br><br> <a href="'.$payUrl.'" style="text-decoration:none;color:#fff;font-size:15px;font-family:sans-serif;background:#f56839;padding:10px" target="_blank">Verify & Pay Here</a> </div> <div style="width:100%;background-image:linear-gradient(#286ed8,#286ed8);margin-top:30px;"> <div style="width:90%;margin:auto;text-align:left;"> <p style="padding:15px; font-family:sans-serif;text-align:left;color:#fff;font-size:16px;">Regards,<br> Team Processing<br> <a href="https://gemregistrationportal.org"style="color:white !important">www.gemregistrationportal.org</a> </p> </div> </div> </div> </div> '; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> DATE OF BIRTH : ".$_POST["dob"]."<br> OFFICE ADDRESS: ".$_POST['office_address']."<br> OFFICE STATE: ".$_POST['office_state']."<br> OFFICE DISTRICT: ".$_POST['office_district']."<br> OFFICE PINCODE: ".$_POST['office_pincode']."<br> AADHAAR NUMBER: ".$_POST["aadhaar_number"]."<br> PAN CARD NUMBER: ".$_POST['pan_card_number']."<br> PAN CARD NUMBER: ".$_POST['udyam_number']."<br> BANK NAME: ".$_POST['bank_name']."<br> BANK ADDRESS: ".$_POST['bank_address']."<br> BANK ACCOUNT NUMBER: ".$_POST['bank_account_number']."<br> IFSC CODE: ".$_POST['ifsc_code']."<br> BUSINESS NAME: ".$_POST['business_name']."<br> DATE OF INCORPORATION: ".$_POST['incorporation_date']."<br> TYPE OF ORGANISATION: ".$_POST['type_of_organisation']."<br> "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } if (isset($_POST['form_id']) && ($_POST['form_id'] == "enquiry")) { $product_price = "Enquiry"; $sql = " INSERT INTO $table ( form_name, applicant_name, mobile_number, email_id, nature_business, business_details, form_created_on ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["nature_business"]."', '".$_POST["business_details"]."', '".$date."' ) "; 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://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=GEM&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=GEM&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'gemregistrationportal.org'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@gemregistrationportal.org'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@gemregistrationportal.org", "GEM Enquiry"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; $mail->Body = " Dear <strong>".$_POST["applicant_name"]."</strong>, <br><br> Thank you for submitting your request for ".$_POST["form_name"]." on our website. <br><br> Regards,<br> Team Processing,<br> For Queries: info@gemregistrationportal.org "; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@gemregistrationportal.org"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } echo "<script>alert('Thanks For submiting your enquiry, Our Team Will assist you shortly.')</script>"; echo "<script>setTimeout(\"history.back();\",300);</script>"; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка