|
Server : LiteSpeed System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : outerorb ( 1091) PHP Version : 8.1.34 Disable Function : mail Directory : /home2/outerorb/zapnixinc.com/ | |
|
Path: /home2/outerorb/zapnixinc.com/contact_form.php
Size: 3.44 KB
Permissions: 0644
<?php
include_once("include/main.inc.php");
$admin_res = getAdminDetails();
date_default_timezone_set('Asia/Kolkata');
$enq_date = date('Y-m-d H:i:s');
$referer = $_SERVER['HTTP_REFERER'];
$ip=$_SERVER['REMOTE_ADDR'];
if (isset($_POST['career_submit']))
{
$name = !empty($_POST['name'])?$_POST['name']:'';
$mobile = (!empty($_POST['mobile']))?$_POST['mobile']:'';
$code = (!empty($_POST['code']))?$_POST['code']:'';
$email = (!empty($_POST['email']))?$_POST['email']:'';
$message = (!empty($_POST['message']))?$_POST['message']:'';
$location = (!empty($_POST['location']))?$_POST['location']:'';
$sql_ens="insert into tbl_enquiry set en_name='$name',enquiry_for='$code',en_country='$location', en_mobile='$mobile',en_email='$email',en_comment='$message',en_url='$referer',en_ip='$ip', en_date='$enq_date'";
$qry=mysqli_query($GLOBALS['dbconn'],$sql_ens);
$subject = utf8_encode(COMPANY. ' - '.'Contact Lead from '.site_url);
$htmlContent = '<table border="0" width="100%">
<tbody>
<tr>
<td colspan="2">
<strong>Dear Admin</strong></td>
</tr>
<tr>
<td colspan="2">
Enquiry Received with following info :</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td width="26%">
<strong>Post URL : </strong></td>
<td>
<span style="margin-top: 15px;">' . $referer . '</span></td>
</tr>
<tr>
<td width="26%">
<strong>Name : </strong></td>
<td>
<span style="margin-top: 15px;">' . $name . '</span></td>
</tr>
<tr>
<td width="26%">
<strong>Email : </strong></td>
<td>
<span style="margin-top: 15px;">' . $email . '</span></td>
</tr>
<tr>
<td width="26%">
<strong>Contact No : </strong></td>
<td>
<span style="margin-top: 15px;">'.'+'.$code . '-' . $mobile . '</span></td>
</tr>
<tr>
<td>
<strong>Message : </strong></td>
<td>
<span style="margin-top: 15px;">' . $message . '</span></td>
</tr>
<tr>
<td>
<strong>Location : </strong></td>
<td>
<span style="margin-top: 15px;">' . $location . '</span></td>
</tr>
</tbody>
</table>';
$to = $admin_res['email'];
$to2 = $admin_res['cc'];
$to3 = 'vishnu.kumaroot@gmail.com';
if($to!='')
{
$mailStatus = smtp_mailer($to,$email,$name,$subject,$htmlContent);
}
if($to2!='')
{
$mailStatus = smtp_mailer($to2,$email,$name,$subject,$htmlContent);
}
$mailStatus = smtp_mailer($to3,$email,$name,$subject,$htmlContent);
if($qry == "1" && $mailStatus == "Sent")
{
$resp = [
'message_response' => 'Thank you for your enquiry. Our team will contact you soon.',
'status' => true
];
echo json_encode($resp);
exit;
}
else{
$resp = [
'message_response' => 'Something Went Wrong!',
'status' => false
];
echo json_encode($resp);
exit;
}
}
?>