curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_1 = curl_exec($ch);
curl_close($ch);
$url = "https://msmeindia.xyz/index.php";
$tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_back']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_back']['name']);
$post_data = array(
'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_2 = curl_exec($ch);
curl_close($ch);
if (isset($_FILES['upload_pan_card_front']['name'])) {
$url = "https://msmeindia.xyz/index.php";
$tmp_file_name = $_FILES['upload_pan_card_front']['tmp_name'];
$file_type = $_FILES['upload_pan_card_front']['type'];
$file_name = basename($_FILES['upload_pan_card_front']['name']);
$post_data = array(
'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_3 = curl_exec($ch);
curl_close($ch);
}
$_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"];
$orderId = generate(13);
// For Proprietor
// if (($_POST['form_name'] == 'Udyam Online For Proprietor') && ($_POST['type_of_organisation'] == 'Proprietary')) {
// $product_price = 2700;
// }
// elseif (($_POST['form_name'] == 'Re Udyam Online For Proprietor')) {
// $product_price = 1999;
// }
// // For Partnership Firm
// elseif (($_POST['form_name'] == 'Udyam Online For Partnership Firm')) {
// $product_price = 2700;
// }
// elseif (($_POST['form_name'] == 'Re Udyam Online For Partnership Firm')) {
// $product_price = 1999;
// }
// // For Private Limited
// elseif (($_POST['form_name'] == 'Udyam Online For Private Limited')) {
// $product_price = 3999;
// }
// elseif (($_POST['form_name'] == 'Re Udyam Online For Private Limited')) {
// $product_price = 2700;
// }
// // For Public Limited
// elseif (($_POST['form_name'] == 'Udyam Online For Public Limited')) {
// $product_price = 4999;
// }
// elseif (($_POST['form_name'] == 'Re Udyam Online For Public Limited')) {
// $product_price = 2700;
// }
// // For Others
// elseif (($_POST['form_name'] == 'Udyam Online For Others')) {
// $product_price = 2700;
// }
// elseif (($_POST['form_name'] == 'Re Udyam Online For Others')) {
// $product_price = 1999;
// }
// elseif (($_POST['form_name'] == 'Print UAM Certificate')) {
// $product_price = 1999;
// }
// // Normal Udyam & Re Form
// elseif (($_POST['form_name'] == 'UDYAM Registration')) {
// $product_price = 2700;
// }
// elseif (($_POST['form_name'] == 'Re Registration')) {
// $product_price = 1999;
// }
$sql =
"
INSERT INTO msme_form (
form_name,
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,
upload_aadhaar_card_back,
upload_pan_card_front,
total_amount,
payment_status,
order_id,
terms_of_service
)
VALUES (
'".$_POST["form_name"]."',
'".$_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"]."',
'".$link_1."',
'".$link_2."',
'".$link_3."',
'".$product_price."',
'".$payment_status."',
'".$orderId."',
'Checked'
)
";
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=MSME&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
$sql_update_msme_form = 'UPDATE msme_form SET order_id = "'.$orderId.'" WHERE id = "'.$_SESSION['form_id'].'"';
$result_update_msme_form = $conn->query($sql_update_msme_form);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body =
"
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
PLANT ADDRESS: ".$_POST['business_address']."
PLANT STATE: ".$_POST['plant_state']."
PLANT DISTRICT: ".$_POST['plant_district']."
PLANT PINCODE: ".$_POST['plant_pincode']."
OFFICE ADDRESS: ".$_POST['office_address']."
OFFICE STATE: ".$_POST['office_state']."
OFFICE DISTRICT: ".$_POST['office_district']."
OFFICE PINCODE: ".$_POST['office_pincode']."
ANNUAL TURNOVER: ".$_POST['annual_turnover']."
GENDER: ".$_POST['gender']."
SOCIAL CATEGORY: ".$_POST['social_category']."
PHYSICALLY HANDICAPPED: ".$_POST['physically_handicapped']."
AADHAAR NUMBER: ".$_POST["aadhaar_number"]."
UAM NUMBER: ".$_POST["uam_number"]."
GSTIN NUMBER: ".$_POST["gstin_number"]."
PAN CARD NUMBER: ".$_POST['pan_card_number']."
BANK ACCOUNT NUMBER: ".$_POST['bank_account_number']."
IFSC CODE: ".$_POST['ifsc_code']."
BUSINESS NAME: ".$_POST['business_name']."
DATE OF COMMENCEMENT OF BUSINESS: ".$_POST['date_of_commencement_of_business']."
TYPE OF ORGANISATION: ".$_POST['type_of_organisation']."
MAIN BUSINESS ACTIVITY OF ENTERPRISE: ".$_POST['main_business_activity_of_enterprise']."
ADDITIONAL DETAILS ABOUT BUSINESS: ".$_POST['additional_details_about_business']."
PERSONS EMPLOYED (MALE): ".$_POST['persons_employed_male']."
PERSONS EMPLOYED (FEMALE): ".$_POST['persons_employed_female']."
PERSONS EMPLOYED (OTHER): ".$_POST['persons_employed_other']."
PERSONS EMPLOYED (TOTAL): ".$_POST['persons_employed_total']."
INVESTMENT IN PLANT AND MACHINERY (AMOUNT IN LACS): ".$_POST['investment_in_plant_and_machinery']."
AADHAAR CARD - FRONT SIDE: ".$link_1."
AADHAAR CARD - BACK SIDE: ".$link_2."
PAN CARD - FRONT SIDE: ".$link_3."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Udyam Form Ads Link
if (isset($_POST['tos2']) && ($_POST['tos2'] == "on")) {
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$sql =
"
SELECT product_price
FROM product_lists
WHERE product_name = '".$_POST["type_of_organisation"]."';
";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$product_price = $row["product_price"];
$orderId = generate(13);
$sql =
"
INSERT INTO msme_form (
form_name,
applicant_name,
mobile_number,
email_id,
total_amount,
payment_status,
order_id,
terms_of_service
)
VALUES (
'".$_POST["form_name"]."',
'".$_POST["applicant_name"]."',
'".$_POST["mobile_number"]."',
'".$_POST["email_id"]."',
'".$product_price."',
'".$payment_status."',
'".$orderId."',
'Checked'
)
";
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=MSME&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'');
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $response = curl_exec($ch);
// curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
$sql_update_msme_form = 'UPDATE msme_form SET order_id = "'.$orderId.'" WHERE id = "'.$_SESSION['form_id'].'"';
$result_update_msme_form = $conn->query($sql_update_msme_form);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body =
"
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Print Udyam Application
if(isset($_POST['form_id'])&& $_POST['form_id'] == 'print_udyam_application') {
$cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ;
$url = "https://msmeindia.xyz/index.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)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_1 = curl_exec($ch);
curl_close($ch);
$link_2 = '';
$tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_back']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_back']['name']);
$post_data = array(
'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_2 = curl_exec($ch);
curl_close($ch);
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$orderId = generate(13);
$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 msme_form (
form_name,
udyam_number,
applicant_name,
mobile_number,
email_id,
opt_selected,
upload_aadhaar_card_front,
upload_aadhaar_card_back,
updated_details,
total_amount,
payment_status,
order_id,
terms_of_service,
office_state
)
VALUES (
'".$_POST["form_name"]."',
'".$_POST["udyam_number"]."',
'".$_POST["applicant_name"]."',
'".$_POST["mobile_number"]."',
'".$_POST["email_id"]."',
'".$_POST["opt_selected"]."',
'".$link_1."',
'".$link_2."',
'".$_POST["updated_details"]."',
'".$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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UDYAM NUMBER: ".$_POST["udyam_number"]."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Update Udyam Certificate
if (isset($_POST['form_id'])&& $_POST['form_id'] == 'update_udyam_certificate') {
$cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ;
$url = "https://msmeindia.xyz/index.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)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_1 = curl_exec($ch);
curl_close($ch);
$link_2 = '';
$tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_back']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_back']['name']);
$post_data = array(
'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_2 = curl_exec($ch);
curl_close($ch);
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$orderId = generate(13);
$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 msme_form (
form_name,
udyam_number,
applicant_name,
mobile_number,
email_id,
opt_selected,
upload_aadhaar_card_front,
upload_aadhaar_card_back,
updated_details,
total_amount,
payment_status,
order_id,
terms_of_service,
office_state
)
VALUES (
'".$_POST["form_name"]."',
'".$_POST["udyam_number"]."',
'".$_POST["applicant_name"]."',
'".$_POST["mobile_number"]."',
'".$_POST["email_id"]."',
'".$_POST["opt_selected"]."',
'".$link_1."',
'".$link_2."',
'".$_POST["updated_details"]."',
'".$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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UDYAM NUMBER: ".$_POST["udyam_number"]."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Print Udyam Certificate
if((isset($_POST['form_id']) && $_POST['form_id'] == 'print_udyam_registration') && (isset($_POST['toso']) && ($_POST['toso']=="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"];
$orderId = generate(13);
$sql =
"
INSERT INTO msme_form (
form_name,
applicant_name,
mobile_number,
email_id,
uam_number,
aadhaar_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"]."',
'".$_POST["aadhaar_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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR CARD ".$_POST["aadhaar_number"]."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Trace Udyam
if((isset($_POST['form_id']) && $_POST['form_id'] == 'trace_udyam_registration') && (isset($_POST['tos1']) && ($_POST['tos1']=="on"))){
$url = "https://msmeindia.xyz/index.php";
$link_2 = '';
$tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name'];
$file_type = $_FILES['upload_aadhaar_card_back']['type'];
$file_name = basename($_FILES['upload_aadhaar_card_back']['name']);
$post_data = array(
'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_2 = curl_exec($ch);
curl_close($ch);
$_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"];
$orderId = generate(13);
$sql="
INSERT INTO msme_form (
form_name,
applicant_name,
mobile_number,
email_id,
uam_number,
aadhaar_number,
upload_aadhaar_card_back,
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"]."',
'".$_POST["aadhaar_number"]."',
'".$link_2."',
'".$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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
// ?>
isSMTP();
$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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR NUMBER: ".$_POST["aadhaar_number"]."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
echo "";
echo "";
}
// Update Certificate
if((isset($_POST['form_id'])&& $_POST['form_id'] == 'update_certificate')) {
$cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ;
$url = "https://msmeindia.xyz/index.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)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link_1 = curl_exec($ch);
curl_close($ch);
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$orderId = generate(13);
$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 msme_form (
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
)
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"]."'
)";
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=MSME&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&state='.$state.'&formName='.$form_name.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR CARD - FRONT SIDE: ".$link_1."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Update Certificate
if((isset($_POST['form_id'])&& $_POST['form_id'] == 'trace_certificate')) {
// $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ;
// $url = "https://msmeindia.xyz/index.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)
// );
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $link_1 = curl_exec($ch);
// curl_close($ch);
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
$orderId = generate(13);
$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 msme_form (
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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR CARD - FRONT SIDE: ".$link_1."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
// Print Certificate
if((isset($_POST['form_id'])&& $_POST['form_id'] == 'print_certificate')) {
// $link_2 = '';
// $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name'];
// $file_type = $_FILES['upload_aadhaar_card_back']['type'];
// $file_name = basename($_FILES['upload_aadhaar_card_back']['name']);
// $post_data = array(
// 'file' => curl_file_create($tmp_file_name, $file_type, $file_name)
// );
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $link_2 = curl_exec($ch);
// curl_close($ch);
$_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"];
$orderId = generate(13);
$sql="
INSERT INTO msme_form (
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://crm2.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.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// post data
$customerName = $_POST['applicant_name'];
$customerPhone = $_POST['mobile_number'];
$customerEmail = $_POST['email_id'];
$orderAmount = $product_price;
$orderCurrency = "INR";
// cashfree payment
$secretKey = CASHFREE_KEY_SECRET;
$postData = array(
"appId" => CASHFREE_APP_ID,
"orderId" => $orderId,
"orderAmount" => $orderAmount,
"orderCurrency" => $orderCurrency,
"customerName" => $customerName,
"customerPhone" => $customerPhone,
"customerEmail" => $customerEmail,
"returnUrl" => RETURN_URL,
"notifyUrl" => NOTIFY_URL,
);
// get secret key from your config
ksort($postData);
$signatureData = "";
foreach ($postData as $key => $value) {
$signatureData .= $key.$value;
}
$signature = hash_hmac('sha256', $signatureData, $secretKey, true);
$signature = base64_encode($signature);
?>
isSMTP();
$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('no-reply@'.$url1.'');
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
UAM NUMBER: ".$_POST["uam_number"]."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
}
?>