| 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/www/inc/ |
Upload File : |
<?php
if ($decryptedfocus === '[GET_ENQUIRY]'):
if (! isset($_POST['zipcode']) or $_POST['zipcode'] !== '' or strlen($_POST['zipcode']) > 0):
die(output('You are not authorized user.'));
endif;
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
$name = $fn->remespace($fn->escape($name));
$name = stripslashes(stripcslashes($name));
$email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
$email = $fn->remaspace($fn->escape($email));
$phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);
$phone = $fn->remaspace($fn->sanitize($fn->escape($phone)));
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
$message = $fn->remespace($fn->escape($message));
$message = stripslashes(stripcslashes($message));
$skycolor = filter_input(INPUT_POST, 'skycolor', FILTER_SANITIZE_STRING);
if (empty($name)):
die(output('Please enter your full name.'));
elseif (empty($email)):
die(output('Please enter your email ID.'));
elseif ($fn->validateemail($email) === false):
die(output('Please enter a valid email ID.'));
elseif (empty($phone) && strlen($phone) == 0):
die(output('Please enter your phone number.'));
elseif (empty($message)):
die(output('Please enter your message.'));
elseif (empty($skycolor)):
die(output('Please select anti spam question.'));
elseif ($skycolor !== 'blue'):
die(output('You are not authorized user.'));
else:
$creation = date('Y-m-d H:i:s');
$stmt = $mysqli->prepare("INSERT INTO enquiry(name, email, phone, message, creation) VALUES(?, ?, ?, ?, ?)") or die(output('An error occurred. Please contact ' . $websitename . '.'));
$stmt->bind_param('sssss', $name, $email, $phone, $message, $creation);
$stmt->execute();
$lastid = $stmt->insert_id;
$stmt->close();
$message = nl2br(html_entity_decode($message));
$lastid = str_pad($lastid, 8, 0, STR_PAD_LEFT);
$date = date('d/m/Y');
$subject = 'Blog Enquiry Received. UID: #' . $lastid;
$wmessage = <<<EOJ
<table border="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: {$lastid}
</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">
Hi {$websitename}
</p>
<p style="float:left;width:100%;margin:0 0 10px">
You have received an enquiry from {$name} on {$date} for blog post.
</p>
<p style="float:left;width:100%;margin:0 0 10px">
<b>DETAILS:</b>
</p>
<p style="float:left;width:100%;margin:0 0 10px">
<b>NAME:</b> {$name}
</p>
<p style="float:left;width:100%;margin:0 0 10px">
<b>E-MAIL:</b> {$email}
</p>
<p style="float:left;width:100%;margin:0 0 10px">
<b>PHONE:</b> {$phone}
</p>
<p style="float:left;width:100%;margin:0 0 10px">
<b>MESSAGE:</b><br>{$message}
</p>
</td>
</tr>
</table>
EOJ;
$cmessage = <<<EOJ
<table border="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: {$lastid}
</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 message and shall reply you within 24 hours. If you don't get any reply please email us at <b>{$websiteemail}</b>.
</p>
<p style="float:left;width:100%;margin:0 0 3px;">
Kind Regards,<br>Akhil Gupta<br>Manager<br>{$websitename}<br>{$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:#009933;">
Please consider the environment before you print this email.
</b>
</p>
</td>
</tr>
</table>
EOJ;
$sm->SendMail('akiniksubs@gmail.com', '', '', $subject, $wmessage, $fromname, $fromemail, $name, $email);
$sm->SendMail($email, '', '', $subject, $cmessage, $fromname, $fromemail, $replyname, 'akiniksubs@gmail.com');
die(output(array('text' => 'Your enquiry has been submitted!', 'stat' => true)));
endif;
else:
die(output('Access Denied!'));
endif;