WebShell: t.me/oghbnz
<?php include 'includes/header.php';
?>
<div class="header-background-box half">
<div class="header-background" data-image-src="assets/images/innerbg.jpg">
<div class="webkit-and-moz-overlay-background">
<div class="container">
<div class="center-section">
<h2 class="section-title-border whiteTitleBorder">Contact Us</h2>
</div>
</div>
</div>
</div>
</div>
<div class="site-map">
<div class="container">
<a href="index.php">Home</a>
<a>Contact Us</a>
</div>
</div>
<section class="contact-section ">
<div class="container">
<div class="row">
<div class="col-md-5 col-sm-5 contact-info-right ct-background-color edit-displayTable" data-bgcolor="#f4f4f4">
<div class="">
<h3>Get in Touch</h3>
<?php if($_GET['msg']=='success'){?>
<h4 style="color: green; text-align: left;" >Your message was sent successfully!</h4>
<?php } ?>
<?php if($_GET['msg']=='failed'){?>
<h4 style="color: red; text-align: left;" >Something went wrong, try refreshing and submitting the form again</h4>
<?php } ?>
<form class="contact-form form-margin" id="contact_form" action="" method="POST">
<div class="col-md-12">
<div class="form-group"> <!-- Name field !-->
<input type="text" class="form-control" name="name" placeholder="Your Name *" >
</div>
</div>
<div class="col-md-12">
<div class="form-group"> <!-- Email field !-->
<input type="email" class="form-control" name="email" placeholder="Your Email *">
</div>
</div>
<div class="col-md-12">
<div class="form-group"> <!-- Phone field !-->
<input type="number" class="form-control" name="phone" placeholder="Your Phone">
</div>
</div>
<div class="col-md-12">
<div class="form-group"> <!-- Message field !-->
<textarea cols="6" rows="5" class="form-control" name="message" placeholder="Your Message"></textarea>
</div>
</div>
<div class="col-md-4">
<img src="captcha_code_file.php?rand=" width="120" height="40" class="capcha" id='captchaimg' />
</div>
<div class="col-md-2">
<a href='javascript: refreshCaptcha();'><img style="background:#000000;" src="refresh.png" width="5" height="5" /></a>
</div>
<div class="col-md-6">
<input type="text" name="captcha" />
</div>
<br>
<div class="col-md-12">
<!-- Submit button !-->
<div class="center-position">
<input id="submit" type="submit" name="submit" class="btn btn-primary btn-sm center-button edit-marginTop10" value="Send Message">
</div>
</div>
</form>
</div>
</div>
<div class="col-md-7 col-sm-7">
<h3>Location</h3>
<iframe src="<?php echo $social_links3['map']; ?>" width="100%" height="400" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="row ct-background-color" data-bgcolor="#ffffff" data-bordertop="1px solid #e2e2e2">
<div class="container edit-paddingBoth40">
<div class="col-md-4 col-sm-6">
<div class="iconBox">
<div class="iconBox-icon center-block edit-marginBottom30"><i class="fa fa-map-marker"></i></div>
<div class="iconBox-description">
<span class="iconBox-title edit-marginBottom10">Address</span>
<span class="iconBox-text">
<?php echo $contact_details2['address']; ?>
</span>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="iconBox">
<div class="iconBox-icon center-block edit-marginBottom30"><i class="fa fa-phone"></i></div>
<div class="iconBox-description">
<span class="iconBox-title edit-marginBottom10">Call Us</span>
<span class="iconBox-text">
<?php echo $contact_details2['phone_number']; ?>,
<br>
<?php echo $contact_details2['off_number']; ?>
</span>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="iconBox">
<div class="iconBox-icon center-block edit-marginBottom30"><i class="fa fa-envelope"></i></div>
<div class="iconBox-description">
<span class="iconBox-title edit-marginBottom10">Email Us</span>
<span class="iconBox-text">
<a><?php echo $contact_details2['con_email']; ?></a>
<br>
<a><?php echo $contact_details2['off_email']; ?></a>
</span>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include 'includes/footer.php'; ?>
<?php
if(isset($_POST['submit']))
{
if(empty($_SESSION['6_letters_code'] ) ||
strcasecmp($_SESSION['6_letters_code'], $_POST['captcha']) != 0)
{
echo "<script>alert('Invalid Security Code')</script>";
}else{
$name=$_POST['name'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$message_1=$_POST['message'];
$message="Name : $name <br> Phone Number : $phone <br> Email-Id : $email <br> Message : $message_1";
$contact_details1=$conn->query("SELECT * FROM contact_details WHERE id=1");
$contact_details=$contact_details1->fetch(PDO::FETCH_ASSOC);
$site_logo2=$conn->query("SELECT * FROM site_logo WHERE id=1");
$site_logo=$site_logo2->fetch(PDO::FETCH_ASSOC);
$site=$site_logo['site_name'];
require_once "Mail/class.phpmailer.php";
$email = new PHPMailer();
$email->From = $contact_details['from_email'];
$email->FromName = $site;
$email->Subject = "Client Enquiry Mail";
$email->isHTML(true);
$email->Body = $message;
$email->AddAddress( $contact_details['con_email'] );
// $file_to_attach = 'image/resumes/'.$oname;
// $email->AddAttachment( $file_to_attach , $oname );
$sucess= $email->Send();
if($sucess){ ?>
<script type="text/javascript">
window.location.href ="contactus.php?msg=success";
</script>
<?php }else{ ?>
<script type="text/javascript">
window.location.href ="contactus.php?msg=failed";
</script>
<?php } } } ?>
<script type='text/javascript'>
function refreshCaptcha()
{
var img = document.images['captchaimg'];
img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
}
</script>
<script src="admin/js/jquery-1.9.1.min.js"></script>
<script src="admin/js/jquery.validate.min.js"></script>
<script type="text/javascript">
$(function()
{
$("#contact_form").validate(
{
// Rules for form validation
rules:
{
name:
{
required: true
},
email:
{
required: true,
email: true
},
phone:
{
required: true,
digits: true,
minlength : 9,
maxlength : 14
},
subject:
{
required: true
},
message:
{
required: true
}
},
// Messages for form validation
messages:
{
name:
{
required: 'Please enter a name'
},
email:
{
required: 'Please enter a Email-Id',
email: 'Please enter a valid Email-Id'
},
phone:
{
required: 'Please enter a phone number',
digits: 'Please enter a valid phone number',
minlength : 'Invalid number',
maxlength : 'invalid numbeer'
},
subject:
{
required: 'Plese enter the subject'
},
message:
{
required: 'Plese enter the message'
}
},
// Do not change code below
errorPlacement: function(error, element)
{
error.appendTo(element.parent());
}
});
});
</script>