OverLord Shell
<?php
session_start();
require_once("db/conn.php");
include("sql_ing.php");
//echo $_POST['captcha_code'];
//echo $_SESSION['captcha_code'];exit;
if (trim($_SESSION['captchaa'])!=trim($_POST['captcha'])){
echo "The captcha code does not match!";// Captcha verification is incorrect.
}else
{
//change by chandrakant
$contact_name = filter_var(addslashes($_POST['contact_name']), FILTER_SANITIZE_STRING);
$contact_phone = filter_var(addslashes($_POST['contact_phone']), FILTER_SANITIZE_NUMBER_INT);
$contact_email = filter_var(addslashes($_POST['contact_email']), FILTER_SANITIZE_STRING);
$contact_message = filter_var(addslashes($_POST['contact_message']), FILTER_SANITIZE_STRING);
//$contact_name=$_POST['contact_name'];
//$contact_phone=$_POST['contact_phone'];
//$contact_email=$_POST['contact_email'];
//$contact_message=$_POST['contact_message'];
//var_dump($_POST);exit;
if(!empty($contact_name) && !empty($contact_phone) && !empty($contact_email)){
//$addq="INSERT INTO mc_contact(contact_name,contact_phone,contact_email,contact_message,createdon) VALUES ('$contact_name','$contact_phone','$contact_email','$contact_message','".date('Y-m-d H:i:s')."')";
// $addr=$connection->query($addq);
$addq="INSERT INTO mc_contact(contact_name,contact_phone,contact_email,contact_message,createdon) VALUES ('".filter_var(addslashes($contact_name))."','".filter_var(addslashes($contact_phone))."','".filter_var(addslashes($contact_email))."','".filter_var(addslashes($contact_message))."','".date('Y-m-d H:i:s')."')";
$addr=$connection->query($addq);
if($addr){
$to = 'sagar@maccia.org.in,support@ultraliant.com';
$subject = 'New Contact Enquiry For Maccia';
$message="<table align=\"center\" style=\"border:0px solid #456;border-radius:3px; width:70%; cellpadding:0; cellspacing:0;\">
<tr style=\"\"><td style=\"text-align:center; padding:15px; font-weight:bold; font-size:20px;\"> Contact Enquiry Details</td></tr>
<tr>
<td>
<table cellpadding=\"6\" style=\"width:100%; cellpadding:0; cellspacing:0; border:1px solid #BEC0CC; border-radius:3px 3px 0px 0px; padding-bottom:15px;\">
<tbody>
<tr style=\"padding-bottom:10px;\">
<td style=\" border-color:#BEC0CC; width:20%; font-weight:bold;\">
Name:
</td>
<td>
".$contact_name."
</td>
</tr>
<tr>
<td style=\"width:10%; font-weight:bold;\">
Message:
</td>
<td style=\" width:100%;\">
<p>".$contact_message."</p>
</td>
</tr>
<tr>
<td style=\" width:20%; font-weight:bold;\">
Email:
</td>
<td style=\" width:30%;\">
".$contact_email."
</td>
</tr>
<tr>
<td style=\" width:20%; font-weight:bold;\">
Mobile:
</td>
<td style=\" width:30%;\">
".$contact_phone."
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan=\"2\" style=\" width:20%; font-weight:bold;\">
This is auto generated email, Please do not reply!
</td>
</tr>
</table>";
$emailxy="no-reply@maccia.org.in";
$headers = 'From: '.$emailxy. "\r\n". 'Reply-To:sagar@maccia.org.in' . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
//echo "successfully Sent...";
header("location:contact.php?msg=Thank you for contacting us");
}else{
echo "ERROR: Could not able to execute $addr.";
}
}else
{
echo "Required fields are not empty";
}
}
?>
xRyukZ - Copyright 2k19