
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
include 'admin/includes/settings/constant.php';
//include '../includes/settings/db.php';
require_once 'admin/includes/settings/PDODB.php';
include 'admin/includes/modules/functions.php';
$function = new FUNCTIONS();
if(!empty($_POST)){
//print_r($_POST); exit;
$name = !empty($_POST['name'])?trim($_POST['name']):"";
$email = !empty($_POST['email'])?trim($_POST['email']):"";
$phone = !empty($_POST['phone'])?trim($_POST['phone']):"";
$message = !empty($_POST['message'])?trim($_POST['message']):"";
//$file = $_FILES ['file'];
$error_msg = "";
//$newfilename = uniqid('img-',false);
//$foldername = "uploads/";
//$imggg = $function->uploadFile($newfilename, $foldername, 'file');
//print_r($_POST); exit;
/*$pdodb = PDODB::getInstance();
$sql = "INSERT INTO enquiry SET name='".$name."',email='".$email."',ipaddress='".$ipaddress."',message='".$message."',file='".$imggg[2]."'";
$result = $pdodb->query($sql);
PDODB::closeInstance();
if($result) {
$error_msg = "Message Sent Successfully";
}*/
/*$link = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbusername, $dbpassword);
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$statement = $link->prepare("INSERT INTO enquiry(file, name, email, message, ipaddress)
VALUES(:file, :name, :email, :message, :ipaddress)");
//print_r($statement); exit;
$statement->execute(array(
"file" => $file,
"name" => $name,
"email" => $email,
"message" => $message,
"ipaddress" =>$ipaddress
));
if($statement)
$error_msg = "Message Sent Successfully";*/
//mail to admin for contacting users
function sendmail($name,$from,$to,$sendmessage){
$to = $to;//'indusinfotek.umashankar@gmail.com';
$subject = 'RWA Enquiry';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From:' .$from. "\r\n" .
'Reply-To: ' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$message = $sendmessage;
mail($to, $subject, $message, $headers);
}
if(!empty($message)){
$to="rwasector40noida@gmail.com";
$contactmail='<table cellpadding="0" cellspacing="0" style="width:600px; margin:0px auto; color:#7b7b7c; vertical-align:middle; font-family:Arial, Helvetica, sans-serif; font-size:16px;">
<tr>
<td style="text-align:center;"><a href="#"><img src="" /></a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="color:#333;"><strong>Hi, Admin</strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>You have been received a query.</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" style="width:600px; margin:0px auto; color:#7b7b7c; vertical-align:top; font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:22px;">
<tr>
<td> </td>
</tr>
<tr>
<td style="color:#333;" colspan="3"><strong>Contact Details</strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td width="200px;">Name</td>
<td width="20px;">:</td>
<td width="380px;">'.$name.'</td>
</tr>
<tr>
<td width="200px;">Email Address</td>
<td width="20px;">:</td>
<td width="380px;">'.$email.'</td>
</tr>
<tr>
<td width="200px;">Phone No.</td>
<td width="20px;">:</td>
<td width="380px;">'.$phone.'</td>
</tr>
<tr>
<td width="200px;">Message</td>
<td width="20px;">:</td>
<td width="380px;"><p>'.$message.'</p></td>
</tr>
</table>';
//print_r($contactmail); exit;
sendmail($name,$email,$to,$contactmail);
//var_dump(sendmail($name,$email,$to,$contactmail));
}
// end mail send
$error_msg = "Message Sent Successfully";
?>
<!-- <script type="text/javascript">
$error_msg = "Message Sent Successfully";
alert("Sucessfully Submited");
</script> -->
<?php
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>RWA Sectore 40 Noida | Contact</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/noida40.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="css/bootstrap-dropdownhover.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<style type="text/css">
#map_container{
position: relative;
}
#map{
height: 30;
overflow: hidden;
padding-bottom: 22.25%;
/*padding-top: 30px;*/
position: relative;
}
</style>
</head>
<body>
<?php include_once 'header.php'; ?>
<!-- banner -->
<header>
<img src="images/contactus.jpg" class="img-responsive">
</header>
<!--end banner -->
<!-- Page Content -->
<div class="container-fluid padding-0">
<div class="container mt-5">
<!-- <h2 class="text-center">Contact Us</h2> -->
<h2 class="text-center mt-5 pb-5"><span>CONTACT</span> US</h2>
<div class="row justify-content-center">
<!-- Contact us form -->
<div class="col-12 col-md-8 col-lg-6 pb-5">
<!--Form with header-->
<form action="" method="post" id="Contact">
<div class="card border-primary rounded-0">
<div class="card-header p-0">
<div class="bg-info text-white text-center py-2">
<h3><i class="fa fa-envelope"></i> Contact Form</h3>
<p class="m-0">RWA Sector 40</p>
</div>
</div>
<div class="card-body p-3">
<!--Body-->
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-user text-info"></i></div>
</div>
<input type="text" class="form-control" id="name" name="name" placeholder="Your Name" required>
</div>
</div>
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-phone text-info"></i></div>
</div>
<input type="text" class="form-control" id="phone" name="phone" placeholder="Your Phone No" required>
</div>
</div>
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-envelope text-info"></i></div>
</div>
<input type="email" class="form-control" id="email" name="email" placeholder="example@gmail.com" required>
</div>
</div>
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-comment text-info"></i></div>
</div>
<textarea class="form-control" name="message" id="message" placeholder="Enter Your message" required></textarea>
</div>
</div>
<div class="text-center">
<input type="submit" value="SEND" class="btn btn-info btn-block rounded-0 py-2">
</div>
<p style="color:red; text-align: center;"><?=(!empty($error_msg))?$error_msg:'';?></p>
</div>
</div>
</form>
<!--Form with header-->
</div>
<!--end Contact us form -->
<!-- map -->
<div class="col-12 col-md-8 col-lg-6 pb-5">
<div>
<h5><strong> RWA Sector 40</strong></h5>
<p><strong>Address :</strong>
Community Centre, Sector 40 Noida, Uttar Pradesh - 201303
<br>
<strong>Email :</strong> <a class="text-dark" href="mailto:rwasector40noida@gmail.com">rwasector40noida@gmail.com</a>
<br>
<strong>Contact No. :</strong>
<a class="text-dark" href="tel:+91 9312436626">+91 9312436626</a>
</p>
</div>
<div id="map">
<iframe class="shadow" width="450" height="293" src="https://maps.google.com/maps?q=sector%2040%2C%20noida&t=&z=15&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
</div>
</div>
<!--end map -->
</div>
</div>
</div>
<!-- end Page Content -->
<!-- Footer -->
<?php include_once'footer.php';?>
<!-- End Footer -->
<?php include_once'login.php';?>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="js/bootstrap-4-hover-navbar.js"></script>
<!--login window-->
<script src="js/jquery.form-validator.min.js"></script>
<script type="text/javascript">
$("#Contact").validate({
rules: {
name: {
required: true
},
email: {
required: true,
email: true
},
phone: {
required: true,
minlength: 10,
maxlength: 10,
digits: true
},
message: {
required: true
}
},
messages: {
name: {
required: "Please enter your name"
},
email: {
required: "Please enter your email",
email: "Please enter valid email"
},
phone: {
required: "Please enter mobile No",
minlength: "Mobile No Must Contain at least 10 digit",
maxlength: "Mobile No Must Not Exceed 10 digit"
},
message: {
required: "Please enter your email"
}
},
submitHandler: function(form) {
form.submit();
}
});
</script>
</body>
</html>


PK 99