/
home2
/
ajwaeing
/
public_html
/
Upload File
HOME
<?php require_once "dbConnection.php"; $db = new dbConnection(); if(isset($_POST["inputName"]) && !empty($_POST["inputName"])) { $sname = $_POST["inputName"]; $semail = $_POST["email"]; $subject = $_POST["inputSubject"]; $umessage = $_POST["inputMessage"]; $to = 'heatcom.isb@gmail.com'; $type = 'HTML'; // or HTML $charset = 'utf-8'; //Built Message $message = ""; $message .= "\n\nName:\t$sname"; $message .= "\n\nEmail:\t$semail"; $message .= "\n\nSubject:\t$subject"; $message .= "\n\nMessage:\t$umessage"; $mail = 'info@'.str_replace('www.', '', $_SERVER['SERVER_NAME']); $uniqid = md5(uniqid(time())); $headers = 'From: '.$mail."\n"; $headers .= 'Reply-to: '.$mail."\n"; $headers .= 'Return-Path: '.$mail."\n"; $headers .= 'Message-ID: <'.$uniqid.'@'.$_SERVER['SERVER_NAME'].">\n"; $headers .= 'MIME-Version: 1.0'."\n"; $headers .= 'Date: '.gmdate('D, d M Y H:i:s', time())."\n"; $headers .= 'X-Priority: 3'."\n"; $headers .= 'X-MSMail-Priority: Normal'."\n"; $headers .= 'Content-Type: multipart/mixed;boundary="----------'.$uniqid.'"'."\n\n"; $headers .= '------------'.$uniqid."\n"; $headers .= 'Content-type: text/'.$type.';charset='.$charset.''."\n"; $headers .= 'Content-transfer-encoding: 7bit'; //echo $message; exit; mail($to, $subject, $message); //Redirect to Thankyou page header("location:contact-us.php?msg=success"); exit; } $title = "Contact Us"; ?> <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?=$title?> :. Ajwa Engineering & Central Heating System</title> <meta name="keywords" content=""> <meta name="description" content=""> <?php require_once "includes.php"; ?> </head> <body> <div class="body-wrapper" id="page-top"> <?php require_once "header.php"; ?> <!-- Page Title --> <section class="page-title"> <div class="container"> <div class="row"> <div class="col-sm-12 col-md-12" id="title"> <div class="page-title-inner"> <h2>Contact Us</h2> </div> </div> </div> </div> </section> <!-- /Page Title --> <!-- Main Body --> <section id="main-body" class="main-body contact"> <div class="container"> <div class="row"> <div id="left" class="col-sm-3 col-md-3"> <div class="module "> <img title="Ask Us" alt="Contact us" src="images/template/banner1.jpg"> </div> </div> <div id="middle" class="col-sm-6 col-md-6"> <div> <form class="form-horizontal" method="post" action="contact-us.php"> <h3>Contact Us</h3> <?php if(isset($_GET["msg"])) { echo "<p class='bg-danger' style='padding:10px;'><strong>Thanks!</strong><br>We appreciate that you’ve taken the time to write us. We’ll get back to you very soon. Please come back and see us often.</p>"; } else echo "<p class='bg-danger' style='padding:10px;'>Send an email. All fields with an * are required.</p>"; ?> <hr> <div class="form-group"> <label for="inputName" class="control-label label-left col-xs-4">Name *</label> <div class="col-xs-8"> <input type="text" class="form-control" id="inputName" placeholder=" Your name" name="inputName" required> </div> </div> <div class="form-group"> <label for="email" class="control-label label-left col-xs-4">Email *</label> <div class="col-xs-8"> <input type="email" class="form-control" id="email" placeholder=" Email for contact" name="email" required> </div> </div> <div class="form-group"> <label for="inputSubject" class="control-label label-left col-xs-4">Subject *</label> <div class="col-xs-8"> <input type="text" class="form-control" id="inputSubject" required placeholder=" Enter the subject of your message here" name="inputSubject"> </div> </div> <div class="form-group"> <label for="inputMessage" class="control-label label-left col-xs-4">Message *</label> <div class="col-xs-8"> <textarea class="form-control" id="inputMessage" placeholder="Enter your message here" name="inputMessage" required></textarea> </div> </div> <div class="form-group"> <label for="sendToYourself" class="control-label label-left col-xs-4"></label> <div class="col-xs-8"> <div class="checkbox"> </div> </div> </div> <div class="form-group"> <div class="col-xs-offset-4 col-xs-8"> <button class="btn btn-primary validate" type="submit" aria-invalid="false">Send Email</button> </div> </div> </form> </div> </div> <div id="right" class="col-sm-3 col-md-3"> <div class="module title3"> <p> </p> <h5>Ajwa Engineering</h5> <p> Address:<br> <address> Office No. 14-A, Basement Rehmat Center, I-8 Markaz, Islamabad </address> </p> <p><br> Mobile: <strong style="color:#fff !important;">0340-917-4699</strong><br> Mobile: <strong style="color:#fff !important;">0315-524-2195</strong> </p> <p> </p> </div> </div> </div> </div> </section> <!-- /Main Body --> <?php require_once "footer.php"; ?> </div> <?php require_once "fincludes.php"; ?> </body> </html>