alert('Invalid Verification Code'); history.back();");
}
}
include_once('./config.php');
include_once('./validate-special.php');
function isCleanInput($input) {
$input = strtolower($input);
// Check if the input is a 10-digit mobile number starting with 6, 7, 8, or 9
if (preg_match('/^[6789]\d{9}$/', $input)) {
return true; // Mobile number is valid
}
// Check if the input contains digits (e.g., a number or decimal)
if (preg_match('/\d+(\.\d+)?/', $input)) {
return false;
}
// Check if the input contains a URL
if (preg_match('/https?:\/\/[^\s]+/i', $input) ||
preg_match('/www\.[^\s]+/i', $input) ||
preg_match('/[a-z0-9\-]+\.(com|net|org|info|ru|cn|in|co|biz|xyz|link|top|site|live|app)(\/[^\s]*)?/i', $input)) {
return false;
}
// Block specific keywords
$blocked_keywords = ['btc', 'bitcoin', 'verify', 'transfer', 'poll', 'wallet'];
foreach ($blocked_keywords as $word) {
if (stripos($input, $word) !== false) {
return false;
}
}
return true;
}
// Check if the mobile number input is valid
if (isset($_POST['mobile_number']) && !isCleanInput($_POST['mobile_number'])) {
echo "
Invalid mobile number. Please try again. Redirecting...
";
exit;
}
// Check if the applicant name is valid
if (isset($_POST['applicant_name']) && !isCleanInput($_POST['applicant_name'])) {
echo "
Invalid request. Please try again. Redirecting...
";
exit;
}
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 ='MSMEREGISTRAR.NET';
$url1 = 'msmeregistrar.net';
$webpath = pathinfo($url1, PATHINFO_FILENAME);
$website = strtoupper($webpath);
$table='msme_form';
//All Udyam New & Re Forms
if (isset($_POST['tos']) && ($_POST['tos'] == "on")) {
//Retrive Product Price According To Product Name(form_id)
$_SESSION['table_id'] = 'msme_form';
$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"];
$form_page_url = $_POST["form_id"].'.php';
$form_page_url = str_replace('_','-',$form_page_url);
$authId = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyz"), 00000, 99999);
if(!empty($_FILES['upload_aadhaar_card_front']['name'])) {
$url = "https://360degree.news/upload.php";
$tmp_file_name = $_FILES['upload_aadhaar_card_front']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_front']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_front']['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_aadhaar_card_front = curl_exec($ch);
curl_close($ch);
}
}else{
$upload_aadhaar_card_front = '';
}
$sql =
"
INSERT INTO $table (
form_name, authId, form_page_url, applicant_name, mobile_number, email_id, business_address, plant_state, plant_district, plant_pincode, office_address, office_state, office_district, office_pincode, annual_turnover, gender, social_category, physically_handicapped, aadhaar_number, uam_number, gstin_number, pan_card_number, bank_account_number, ifsc_code, business_name, date_of_commencement_of_business, type_of_organisation, main_business_activity_of_enterprise, additional_details_about_business, persons_employed_male, persons_employed_female, persons_employed_other, persons_employed_total, investment_in_plant_and_machinery, upload_aadhaar_card_front, total_amount, payment_status,order_id, terms_of_service,organisation_date,form_created_on
)
VALUES (
'".$_POST["form_name"]."', '".$authId."', '".$form_page_url."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["business_address"]."', '".$_POST["plant_state"]."', '".$_POST["plant_district"]."', '".$_POST["plant_pincode"]."', '".$_POST["office_address"]."', '".$_POST["office_state"]."', '".$_POST["office_district"]."', '".$_POST["office_pincode"]."', '".$_POST["annual_turnover"]."', '".$_POST["gender"]."', '".$_POST["social_category"]."', '".$_POST["physically_handicapped"]."', '".$_POST["aadhaar_number"]."', '".$_POST["uam_number"]."', '".$_POST["gstin_number"]."', '".$_POST["pan_card_number"]."', '".$_POST["bank_account_number"]."', '".$_POST["ifsc_code"]."', '".$_POST["business_name"]."', '".$_POST["date_of_commencement_of_business"]."', '".$_POST["type_of_organisation"]."', '".$_POST["main_business_activity_of_enterprise"]."', '".$_POST["additional_details_about_business"]."', '".$_POST["persons_employed_male"]."', '".$_POST["persons_employed_female"]."', '".$_POST["persons_employed_other"]."', '".$_POST["persons_employed_total"]."', '".$_POST["investment_in_plant_and_machinery"]."','".$upload_aadhaar_card_front."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked','".$_POST['organisation_date']."','".$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://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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;
// Payment Gateway Redirection
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'print_udyam_application')) {
if(!empty($_FILES['upload_aadhaar_card_front']['name'])) {
$url = "https://360degree.news/upload.php";
$tmp_file_name = $_FILES['upload_aadhaar_card_front']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_front']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_front']['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_aadhaar_card_front = curl_exec($ch);
curl_close($ch);
}
}else{
$upload_aadhaar_card_front = '';
}
$_SESSION['table_id'] = 'msme_form';
$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"];
$form_page_url = $_POST["form_id"].'.php';
$form_page_url = str_replace('_','-',$form_page_url);
$sql =
"
INSERT INTO $table (
form_name,udyam_number, form_page_url, applicant_name,mobile_number,email_id,upload_aadhaar_card_front, total_amount,payment_status,order_id,terms_of_service,office_state
)
VALUES (
'".$_POST["form_name"]."','".$_POST["udyam_number"]."','".$form_page_url."','".$_POST["applicant_name"]."','".$_POST["mobile_number"]."','".$_POST["email_id"]."','".$upload_aadhaar_card_front."','".$product_price."','".$payment_status."','".$orderId."','Checked','".$_POST["office_state"]."','".$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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'update_udyam_certificate')) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql=
"
INSERT INTO $table (
form_name,udyam_number,applicant_name,mobile_number,email_id,opt_selected,upload_aadhaar_card_front,updated_details,total_amount,payment_status,order_id,terms_of_service,office_state,form_created_on
)
VALUES (
'".$_POST["form_name"]."','".$_POST["udyam_number"]."','".$_POST["applicant_name"]."','".$_POST["mobile_number"]."','".$_POST["email_id"]."','".$_POST["opt_selected"]."','".$link_1."','".$_POST["updated_details"]."','".$product_price."','".$payment_status."','".$orderId."','Checked','".$_POST["office_state"]."','".$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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id'])&& $_POST['form_id'] == 'print_udyam_registration') && (isset($_POST['toso']) && ($_POST['toso'] == "on"))) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql =
"
INSERT INTO $table (
form_name, applicant_name, mobile_number, email_id, uam_number, aadhaar_number, total_amount, payment_status,order_id, terms_of_service, office_state,form_created_on
)
VALUES (
'".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$_POST["aadhaar_number"]."', '".$product_price."', '".$payment_status."','".$orderId."', 'Checked', '".$_POST["office_state"]."','".$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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'trace_udyam_registration') && (isset($_POST['tos1']) && ($_POST['tos1'] == "on"))) {
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql =
"
INSERT INTO $table (
form_name, applicant_name, mobile_number, email_id, uam_number, aadhaar_number, total_amount, payment_status,order_id, terms_of_service, office_state,form_created_on
)
VALUES (
'".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$_POST["aadhaar_number"]."', '".$product_price."', '".$payment_status."','".$orderId."', 'Checked', '".$_POST["office_state"]."','".$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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'update_certificate')) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql=" INSERT INTO $table ( form_name, applicant_name, mobile_number, email_id, uam_number, upload_aadhaar_card_front, updated_details, total_amount, payment_status,order_id, terms_of_service, office_state,form_created_on)
VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$link_1."', '".$_POST["updated_details"]."', '".$product_price."', '".$payment_status."', '".$orderId."','Checked', '".$_POST["office_state"]."','".$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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'print_certificate')) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql =
"
INSERT INTO $table (
form_name, applicant_name, mobile_number, email_id, uam_number,total_amount, payment_status,order_id, terms_of_service, office_state,form_created_on
)
VALUES (
'".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."','".$product_price."', '".$payment_status."', '".$orderId."','Checked', '".$_POST["office_state"]."'
)
";
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=MSME&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;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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
include_once('./payu/payu-submit.php');
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'trace_certificate')) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$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"];
$sql =
"
INSERT INTO $table (
form_name, applicant_name, mobile_number, email_id, uam_number,total_amount, payment_status,order_id, terms_of_service, office_state,form_created_on
)
VALUES ('".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."','".$product_price."', '".$payment_status."', '".$orderId."','Checked', '".$_POST["office_state"]."','".$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://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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;
$ch = curl_init('https://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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;
// 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');
}
}
}
if ((isset($_POST['form_id']) && $_POST['form_id'] == 'test')) {
include_once('uploads.php');
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$product_price = '1';
$sql =
"
INSERT INTO $table (
form_name, applicant_name, mobile_number, email_id, uam_number,total_amount, payment_status,order_id, terms_of_service, office_state
)
VALUES ('".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."','".$product_price."', '".$payment_status."', '".$orderId."','Checked', '".$_POST["office_state"]."'
)
";
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://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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;
$ch = curl_init('https://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&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;
// 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');
}
}
}
?>