Файловый менеджер - Редактировать - /home/d46091/udyogaadhaaronline.com/mail.php
Назад
<?php $host = "localhost"; $userName = "ukrthboupwvog"; $password = "freeDOM@611#"; $dbName = "dbxbcgka43lgo0"; // Create database connection $conn = new mysqli($host, $userName, $password, $dbName); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } session_start(); date_default_timezone_set('Asia/Kolkata'); $date = date('d-m-Y'); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; $api_key = 'f59b7ef4cacb'; $blog = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]"; $endpoint = "https://$api_key.rest.akismet.com/1.1/comment-check"; if (empty($_POST['applicant_name']) || empty($_POST['mobile_number']) || empty($_POST['email_id'])) { die('Error Occured: Name, Mobile, and Email are required.'); } $applicant_name = $_POST['applicant_name']; $mobile_number = $_POST['mobile_number']; $email_id = $_POST['email_id']; $message = !empty($_POST['message']) ? $_POST['message'] : '-'; $user_ip = $_SERVER['REMOTE_ADDR'] ?? '-'; $user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '-'; $data = [ 'blog' => $blog, 'user_ip' => $user_ip, 'user_agent' => $user_agent, 'comment_type' => 'comment', 'comment_author' => $applicant_name, 'comment_author_email' => $email_id, 'comment_content' => $message, ]; $ch = curl_init($endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); curl_close($ch); $status = ($response === 'true') ? 'SPAM' : (($response === 'false') ? 'NOT SPAM' : 'INVALID'); $logEntry = date('Y-m-d H:i:s') . " | Status: $status | Name: $applicant_name | Email: $email_id | Mobile: $mobile_number | IP: $user_ip\n"; file_put_contents('log.txt', $logEntry, FILE_APPEND); if ($status == 'SPAM') { echo "<p style='color:red; font-weight:bold;'>Access Forbidden</p>"; echo "<script> setTimeout(function() { window.location.href = '/'; }, 2000); </script>"; exit(); } $crm_website = 'UDYOGAADHAARONLINE.COM'; if(isset($_POST['vercode'])){ if((empty($_SESSION["vercode"])) || ($_SESSION["vercode"] != $_POST['vercode'])){ die("<script>alert('Invalid Verification Code'); history.back();</script>"); } } require 'vendor/autoload.php'; $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); $form_name = urlencode($_POST['form_name']); // Tech Lounge if (isset($_POST['form_id'])&& $_POST['form_id'] == 'udyam_enquiry') { if($_POST['product'] == "Udyam Registration"){ $form_link = ''; }elseif ($_POST['product'] == "Udyam Re-Registration") { $form_link = 're-registration.php'; } elseif ($_POST['product'] == "Udyam Certificate Update") { $form_link = 'update-udyam-certificate.php'; } elseif ($_POST['product'] == "Cancel Udyam Registration") { $form_link = 'cancel_registration.php'; }else { $form_link = ''; } $form_link= "https://".$crm_website."/".$form_link ; $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, docs, form_created_on ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["product"]."', '".$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://crm2.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&website='.$crm_website.'&amount=ENQUIRY&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.urlencode($_POST["product"]).''); 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=MSME&website='.$crm_website.'&amount=ENQUIRY&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.urlencode($_POST["product"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'udyogaadhaaronline.com'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@udyogaadhaaronline.com'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@udyogaadhaaronline.com", "UDYOGAADHAARONLINE"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; $mail->Body = ' <html> <head> <title></title> </head> <body> <div style="width:100%;margin:0;padding:0;float:left; font-family:sans-serif;letter-spacing: 0.5px;background:#d4d4d4;"> <div style="width:80%;margin:auto;background:#fff;"> <div style="width:100%;float:left;background:#fff;"> <div style="width:100%;float:left;margin:auto;background-image:linear-gradient(#ff6e19,#ff8239);text-align: center;border-bottom: 10px solid #ff6b15;border-bottom-left-radius: 40%;border-bottom-right-radius: 40%;padding:20px 0px ;"><span style="display:block;color: #fff; font-size:20px;font-weight:700;font-family:sans-serif;">MSME / UDYAM REGISTRATION SERVICES</span></div> </div> <div style="width:100%;float:left;margin:auto;background:#fff;padding:0px 0px 0px;text-align: justify;"> <div style="width:80%;margin:auto;background:#fff;color:white"> <p style="text-align:left;color:#343a40; font-size:17px;font-weight:lighter;padding:10px 0px 0px;font-family:sans-serif;"><b>Dear '.$_POST["applicant_name"].',</b><br /> <br /> <p style="text-align:left;color:#343a40; font-size:16px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;text-align: justify;">Greetings for the Day !!</p> <p style="text-align:left;color:#343a40; font-size:16px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;text-align: justify;">This mail is in reference to your enquiry submitted on '.$crm_website.'.</p> <p style="text-align:left;color:#343a40; font-size:16px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;text-align: justify;">Please <a href="https://udyogaadhaaronline.com/udyam-registration-faqs.php" style="background: #ff7a2c;color: white;text-decoration: none;padding: 5px;"> click here</a> to read the FAQs, in order to clear your doubts, if any. </p> <p style="text-align:left;color:#343a40; font-size:16px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;text-align: justify;">After your queries are answered, pls <a href="https://rzp.io/l/6873Y3F" style="background: #ff7a2c;color: white;text-decoration: none;padding: 5px;">click here</a> to Submit an application for registering your business under MSME / Udyam.</p> <div style="width:80%; background:#fff;float:left;margin:auto;text-align: justify;"> <p style="text-align:left;color:#343a40;font-size:16px;padding:0px 0px 8px;font-family:sans-serif;font-weight: bold;">Regards</p> <p style="text-align:left;color:#343a40;font-size:16px;padding:0px 0px 8px;font-family:sans-serif;font-weight: bold;">Team MSME / Udyam</p> <hr> <p style="text-align:left;color:#343a40; font-size:14px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;text-align: justify;"><b>Note : After the payment is done, Customer Service Agents will call you to collect details and process your application. (During Office Hours 10.00 am - 5.30 pm)</b></p> </div> </div> <div style="width:100%; background:#21680f;float:left;margin:auto;padding: 0px 0px;"> <div style="width:80%;margin:auto;text-align: justify;margin:40px;"> <p style="text-align:left;color:#fff;font-size:14px;padding:0px 0px 0px;font-family:sans-serif;"></p> </div> </div> </div> </div> </div> </body> </html> '; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@udyogaadhaaronline.com"); $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 form, Please Check Your Email And Whatsapp.')</script>"; echo "<script>setTimeout(\"history.back();\",300);</script>"; }
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка