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); $_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/index.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, 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["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://crm2.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_2"] = $response; setcookie("panel_form_id_2", $response, time() + (86400 * 30), "/"); $ch = curl_init('https://crm5.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_5"] = $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-tele-submit.php'); }else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'RAZORPAY') { include_once('razorpay/razorpay-submit.php'); } // mail $mail = new PHPMailer(true); //$payUrl = 'https://pmny.in/oI2qyU6Q5LeY'; $payUrl = 'https://pmny.in/VI1oDqJs8cvU'; 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 = '
Regards,
Team Processing