hjkhhrtertererrrrrerrtertertertertertertert
bnmbnerterterterterterdfgdfgdfgdfgdfgdfgdfgdfgdfg
/
home4
/
digil8bw
/
thewhisperingpines.in
/
Upload FileeE
HOME
<?php ob_start(); include("configuration/function-include.php"); if (!empty($_POST['email'])) { if (empty($_POST["name"])) { $_SESSION['msg1'] = "Please Enter Name"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { if (!preg_match("/^[a-zA-Z ]*$/", $_POST["name"])) { $_SESSION['msg1'] = "Only Letters And Whitespace Allowed For Name"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } } if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) { $_SESSION['msg1'] = "Invalid Email format"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } if (empty($_POST["message"])) { $_SESSION['msg1'] = "Please Enter Message"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } if (empty($_POST["phone"])) { $_SESSION['msg1'] = "Please Enter Phone"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { if (!is_numeric($_POST["phone"])) { $_SESSION['msg1'] = "Only Numbers Allowed For Phone"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } if (!preg_match("/^[+]?[1-9][0-9]{9,14}$/", $_POST["phone"])) { $_SESSION['msg1'] = "Enter Only 10 Digit Number For Phone"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } } if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['phone'] && !empty($_POST['message']))) { $name = mysqli_real_escape_string($conn, test_input($_REQUEST['name'])); $email = mysqli_real_escape_string($conn, test_input($_REQUEST['email'])); $phone = mysqli_real_escape_string($conn, test_input($_REQUEST['phone'])); $message = mysqli_real_escape_string($conn, test_input($_REQUEST['message'])); $sql = "Insert into sh_service_enquiry set name='" . $name . "', emailid='" . $email . "', phone='" . $phone . "', message='" . $message . "'"; $query = mysqli_query($conn, $sql); if ($query) { /* $to = 'info@thewhisperingpines.in'; $from = 'noreply@thewhisperingpines.in'; $fromName = 'The Whispering Pines'; $subject = "Contact Us"; $htmlContent = '<html><body>'; $htmlContent .= '<h3>Dear Team,</h3> <p>Please find below details-</p>'; $htmlContent .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $htmlContent .= "<tr style='background: #eee;'><td><strong>Name:</strong> </td><td>" . $name . "</td></tr>"; $htmlContent .= "<tr style='background: #eee;'><td><strong>Email:</strong> </td><td>" . $email . "</td></tr>"; $htmlContent .= "<tr style='background: #eee;'><td><strong>Phone:</strong> </td><td>" . $phone . "</td></tr>"; $htmlContent .= "<tr style='background: #eee;'><td><strong>Message:</strong> </td><td>" . $message . "</td></tr>"; $htmlContent .= "</table>"; $htmlContent .= "</body></html>"; // Set content-type header for sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // Additional headers $headers .= 'From: ' . $fromName . '<' . $from . '>' . "\r\n"; // Send email if (mail($to, $subject, $htmlContent, $headers)) { $_SESSION['msg'] = "Your Form Submitted Successfully"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { $_SESSION['msg1'] = "Something error"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } */ $_SESSION['msg'] = "Your Form Submitted Successfully"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { $_SESSION['msg1'] = "Something error"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The Whispering Pines Bir | Services</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="images/icons/favicon.png"> <link rel="stylesheet" href="css/style.css"> <style> .grid-style .tab-content .event .top-content { margin-top: 10px; margin-bottom: 10px; } .grid-style .tab-content .event .top-content .title { padding-left: 0px; float: left; font-size: 30px; width: 100%; margin-top: 0px; } .event .thumbnail img { width: 100%; height: 250px; } .grid-style .tab-content .event .wd-book-room a.book-room { font-size: 14px; text-transform: uppercase; font-weight: 700; display: inline-block; color: var(--primary-color-1); } .popup-container { background: #fff; position: relative; padding: 50px; overflow: hidden; max-width: 400px; margin: auto; top: 0; cursor: default; } .search-room-popup .form-table>li { float: left; padding: 0 15px; width: 100%; margin-bottom: 15px; } .search-room-popup .form-table textarea { color: var(--body-font-color-1); padding: 20px; font-size: 16px; border: 1px solid #eee; display: inline-block; outline: 0; width: 100%; height: 100px; } </style> </head> <body class="events archive"> <?php include('include/header.php'); ?> <div id="main-content" class="main-content"> <div id="home-main-content" class="home-main-content home-1"> <div class="page-title-wrapper" data-stellar-background-ratio="0.5"> <div class="content container"> <h1 class="heading_primary">Services</h1> <ul class="breadcrumbs"> <li class="item"><a href="index.php">Home</a></li> <li class="item"><span class="separator"></span></li> <li class="item active">Services</li> </ul> </div> </div> </div> <div class="site-content container"> <div class="events-content"> <div class="sc-events grid-style"> <div class="tab-content" id="nav-tabContent"> <div class="tab-pane fade show active" id="happening" role="tabpanel"> <div class="row clearfix"> <?php $sql_service = "SELECT * FROM sh_service WHERE status = 1 "; $result_service = mysqli_query($conn, $sql_service); while ($row_service = mysqli_fetch_array($result_service)) { ?> <div class="event col-sm-4"> <div class="inner"> <div class="thumbnail"> <img src="upload/service/<?php echo $row_service['img']; ?>" alt="<?php echo $row_service['title']; ?>"> </div> <div class="content"> <div class="top-content clearfix"> <h3 class="title"><?php echo $row_service['title']; ?> </h3> </div> <div class="event-desc"> <?php echo $row_service['description']; ?> </div> <div class="read-more"> <a href="#" class="btn-read_more book-room"><i class="ion-arrow-right-c"></i>Enquire Now</a> </div> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> </div> </div> <?php include('include/footer.php'); ?> <div id="form-popup-room" class="form-popup-room"> <div class="popup-container"> <a href="#" class="close-popup"><i class="ion-android-close"></i></a> <form id="hotel-popup-results" action="" method="post" name="hb-search-single-room" class="hotel-popup-results"> <div class="room-head"> <h3 class="room-title">Book Service</h3> <p class="description">Please enter the information to complete the book service.</p> </div> <div class="search-room-popup"> <ul class="form-table clearfix"> <li class="form-field"> <input type="text" name="name" id="name" required class="name" placeholder="Your Name*"> </li> <li class="form-field"> <input type="email" name="email" id="email" required class="email" placeholder="Your Email*"> </li> <li class="form-field"> <input type="tel" name="phone" id="phone" required class="phone" placeholder="Your Phone*"> </li> <li class="form-field"> <textarea name="message" id="message" required cols="30" placeholder="Your Query" rows="5"></textarea> </li> <li class="form-field room-submit"> <button class="submit" type="submit">Book Now</button> </li> </ul> </div> </form> </div> </div> <script src="js/libs/jquery.min.js"></script> <script src="js/libs/stellar.min.js"></script> <script src="js/libs/jquery-ui.min.js"></script> <script src="js/libs/daterangepicker.min.js"></script> <script src="js/libs/daterangepicker.min-date.min.js"></script> <script src="js/libs/bootstrap.min.js"></script> <script src="js/libs/smoothscroll.min.js"></script> <script src="js/libs/owl.carousel.min.js"></script> <script src="js/libs/jquery.magnific-popup.min.js"></script> <script src="js/libs/theia-sticky-sidebar.min.js"></script> <script src="js/libs/counter-box.min.js"></script> <script src="js/libs/jquery.thim-content-slider.min.js"></script> <script src="js/theme-customs.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script> <?php if (!empty($_SESSION['msg'])) { echo ' <script type="text/javascript"> $(document).ready(function(){ swal("' . $_SESSION['msg'] . '", "", "success"); }); </script> '; unset($_SESSION['msg']); } if (!empty($_SESSION['msg1'])) { echo ' <script type="text/javascript"> $(document).ready(function(){ swal("Oops...", "' . $_SESSION['msg1'] . ' :(", "error"); }); </script> '; unset($_SESSION['msg1']); exit; } ?> <script> $(document).on('keypress', '.name', function(event) { var regex = new RegExp("^[a-zA-Z ]+$"); var key = String.fromCharCode(!event.charCode ? event.which : event.charCode); if (!regex.test(key)) { event.preventDefault(); return false; } }); $('.phone').on('input', function(event) { this.value = this.value.replace(/[^0-9]/g, ''); }); </script> </body> </html>