| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/dermatologypaper.com/inc/ |
Upload File : |
<?php
if ($decryptedfocus === '[PLACE_SUBENQUIRY]') {
if (!isset($_POST['zipcode']) or $_POST['zipcode'] !== '' or strlen($_POST['zipcode']) > 0) {
die(json_encode(array('t' => 'You are not authorized user.', 's' => false)));
}
if (preg_match('/[\p{Cyrillic}]/u', $_POST['message'])) {
die(json_encode(array('t' => 'You are not authorized user.', 's' => false)));
}
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
$name = trim($mysqli->real_escape_string($name));
$email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
$email = trim($mysqli->real_escape_string($email));
$country = filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING);
$country = trim($mysqli->real_escape_string($country));
$phonecode = filter_input(INPUT_POST, 'phonecode', FILTER_SANITIZE_STRING);
$phonecode = trim($mysqli->real_escape_string($phonecode));
$phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);
$phone = trim($mysqli->real_escape_string($phone));
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
$message = trim($mysqli->real_escape_string($message));
$message = str_replace('\r\n', PHP_EOL, $message);
$recaptcha_response = filter_input(INPUT_POST, 'recaptcha_response', FILTER_SANITIZE_STRING);
$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=6LclQ34pAAAAADzFCyVT8hShyiekFPEeHBQg5ckw&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
$created_at= date('Y-m-d H:i:s');
if (empty($name)) {
die(json_encode(array('t' => 'Please enter your name.', 's' => false)));
} elseif (empty($email)) {
die(json_encode(array('t' => 'Please enter your email address.', 's' => false)));
} elseif (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
die(json_encode(array('t' => 'Please enter a valid email address.', 's' => false)));
} elseif(empty($country) or empty($phonecode)) {
die(json_encode(array('t' => 'Please select your country.', 's' => false)));
} elseif((empty($phone) && strlen($phone) == 0)) {
die(json_encode(array('t' => 'Please enter your phone number.', 's' => false)));
} elseif($phonecode == '+91' && strlen($phone) !== 10) {
die(json_encode(array('t' => 'Please enter 10 digits phone number.', 's' => false)));
} elseif (empty($message)) {
die(json_encode(array('t' => 'Please enter your message.', 's' => false)));
} else {
if ($recaptcha->success == true && $recaptcha->score >= 0.5 && $recaptcha->action == 'contact') {
if (file_exists('../../temp/BlockedWords.php')) {
require_once('../../temp/BlockedWords.php');
if ($blocked = BlockedWords::check($email, $message)) {
die(json_encode(array('t' => $blocked, 's' => false)));
}
} else {
die(json_encode(array('t' => 'Something went worng.', 's' => false)));
}
require_once('../../temp/Subscriptionenquiry.php');
$id = Subscriptionenquiry::submit($pagename, $name, $email, $country, $phonecode . '-' . $phone, $message);
$phoneWithCode = $phonecode . '-' . $phone;
$message = nl2br($message);
$wsubject = "Subscription Enquiry Received. UID: #{$id}";
$wmessage = <<<EOJ
<table brder="0" cellpadding="0" cellspacing="0" style=float:left;width:500px;background:#fff><tr><td align="left" style="background:#1b2e72;border-bottom:3px solid #f6cc00;padding:12px 15px;color:#98afdb;font-size:17px;text-transform:uppercase" valign="middle">{$name}<td align="right" style="background:#1b2e72;border-bottom:3px solid #f6cc00;padding:12px 15px;color:#98afdb;font-size:17px;text-transform:uppercase" valign="middle">ID: {$id}<tr><td align="left" style="background:#fff;border:1px solid #ddd;border-top:none;padding:12px 15px;color:#000;font-size:12px" valign="middle" colspan="2"><p style="float:left;width:100%;margin:0 0 5px">Hi {$websitename}<p style="float:left;width:100%;margin:0 0 10px">You have received a subscription enquiry from {$name}.<p style="float:left;width:100%;margin:0 0 10px"><b>DETAILS:</b><p style="float:left;width:100%;margin:0 0 10px"><b>PAGE:</b> {$pagename}<p style="float:left;width:100%;margin:0 0 10px"><b>NAME:</b> {$name}<p style="float:left;width:100%;margin:0 0 10px"><b>E-MAIL:</b> {$email}<p style="float:left;width:100%;margin:0 0 10px"><b>PHONE:</b> <a href="tel:{$phoneWithCode}">{$phoneWithCode}</a><p style="float:left;width:100%;margin:0 0 10px"><b>MESSAGE:</b> {$message}</table>
EOJ;
$csubject = "Subscription Enquiry Received. UID: #{$id}";
$cmessage = <<<EOJ
<table brder="0" cellpadding="0" cellspacing="0" style="float:left;width:500px;background:#fff"><tr><td align="left" valign="middle" style="background:#1b2e72;border-bottom:3px solid #f6cc00;padding:12px 15px;color:#98afdb;font-size:17px;text-transform:uppercase">{$name}</td><td align="right" valign="middle" style="background:#1b2e72;border-bottom:3px solid #f6cc00;padding:12px 15px;color:#98afdb;font-size:17px;text-transform:uppercase">ID: {$id}</td></tr><tr><td align="left" valign="middle" colspan="2" style="background:#fff;border:1px solid #ddd;border-top:none;padding:12px 15px;color:#000;font-size:12px"><p style="float:left;width:100%;margin:0 0 5px">Hello {$name}</p><p style="float:left;width:100%;margin:0 0 10px">Thank you for contacting the {$websitename}.</p><p style="float:left;width:100%;margin:0 0 25px">We have received your subscription enquiry and shall reply you within 24 hours. If you don't get any reply please email us at <b>akiniksubs@gmail.com</b>.</p><p style="float:left;width:100%;margin:0 0 3px">Kind Regards,</p><p style="float:left;width:100%;margin:0 0 3px">Akhil Gupta</p><p style="float:left;width:100%;margin:0 0 3px">Manager</p><p style="float:left;width:100%;margin:0 0 3px">{$websitename}</p><p style="float:left;width:100%;margin:0 0 3px">Phone: +91-8178042476</p><p style="float:left;width:100%;margin:0 0 30px">Web: {$baseurl}</p><p style="float:left;width:100%;margin:0"><img src="{$imageurl}tree.png" alt="Tree" style="float:left"><b style="float:left;margin:13px 0 0 10px;color:#093">Please consider the environment before you print this email.</b></p></td></tr></table>
EOJ;
$sm->send('akiniksubs@gmail.com', '', '', $wsubject, $wmessage, $fromname, $fromemail, $name, $email);
$sm->send($email, '', '', $csubject, $cmessage, $fromname, $fromemail, 'AkiNik Publications', 'akiniksubs@gmail.com');
require_once('../../temp/Whatsapp.php');
Whatsapp::send($phonecode . $phone, 'HX5613ae7f0e35afcd6048a63043c91e3f', 'MGe969ff43ea654548ccaf8273c835aaf1');
die(json_encode(array('t' => 'Your enquiry has been submitted!', 's' => true)));
} else {
die(json_encode(array('t' => 'Robot verification failed.', 's' => false)));
}
}
} else {
die(json_encode(array('t' => 'Access Denied!', 's' => false)));
}
?>