File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/hotelshrikaranivilas.com/contact.php
Back
<?php if(isset($_POST['formsubmit'])){ $url = 'https://www.google.com/recaptcha/api/siteverify'; $privatekey = '6LcZG8QUAAAAAMQJWZTYTMlzudd3VuOLSWOHuWQY'; $ch0 = curl_init(); curl_setopt($ch0, CURLOPT_URL, $url."?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']."&remoteip=".$_SERVER['REMOTE_ADDR']); curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch0, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch0, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch0, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', )); $gresponse = curl_exec($ch0); $data = json_decode($gresponse, true); if($data['success'] == 1){ $name = strip_tags(trim($_POST["name"])); $email = strip_tags(trim($_POST["email"])); $phone = strip_tags(trim($_POST["phone"])); $message = strip_tags(trim($_POST["message"])); $postfield = '{"subject":"Query from Website Hotel Shri Karni Vilas", "name":"'.$name.'", "email":"'.$email.'","phone":"'.$phone.'", "message":"'.$message.'", "mailto":"hotelshrikaranivilas@gmail.com", "mailcc":"pooja.s@asiatech.in", "mailbcc":"aditya@asiatech.in"}'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.asiatech.in/booking_engine/emailsendpoint.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfield); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json', )); $json =curl_exec($ch); $jsondecode = json_decode($json, true); if($jsondecode['error']!=''){ //header('Location: index1.php?captcha=other'); echo '<script type="text/javascript">window.location.href = "contact.php?captcha=other";</script>'; } else { //header('Location: index1.php?captcha=yes'); echo '<script type="text/javascript">window.location.href = "contact.php";</script>'; } } else { //header('Location: index1.php?captcha=no'); echo '<script type="text/javascript">window.location.href = "contact.php?captcha=no";</script>'; } } ?> <!DOCTYPE html> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Contact Us | Hotel Shri Karni Vilas</title> <meta name="description" content=""> <meta name="author" content=""> <meta name="keywords" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link rel="shortcut icon" type="image/x-icon" href="new/fav.png"> <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="assets/css/font.awesome.min.css"> <link rel="stylesheet" type="text/css" href="assets/css/magnific.popup.css"> <link rel="stylesheet" type="text/css" href="assets/css/owl.carousel.css"> <link rel="stylesheet" type="text/css" href="assets/css/owl.theme.default.css"> <link rel="stylesheet" type="text/css" href="assets/css/jquery-ui.css"> <link rel="stylesheet" type="text/css" href="assets/css/style.css"> <link rel="stylesheet" type="text/css" href="assets/css/responsive.css"> <script src='https://www.google.com/recaptcha/api.js'></script> <link href='http://fonts.googleapis.com/css?family=Lobster+Two' rel='stylesheet' type='text/css'> <link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,400italic,700,700italic,900,900italic&subset=latin,latin-ext" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900&subset=latin,latin-ext" rel="stylesheet" type="text/css"> <style> .widget-google-map { position: relative; height: 401px; } .mainbg{background-image: url(new/backnew.jpg) ; </style> </head> <body> <div class="site-loading"> <img src="new/loading.gif" alt="Loading"> </div> <div class="site-backtop" title="Back to top"> <i class="fa fa-angle-up"></i> </div> <?php include 'include/header.php'; ?> <div class="site-main"> <div class="section mainbg"> <div class="wrapper-inner"> <div class="row"> <div class="col-lg-6"> <div class="widget-contact-info"> <ul> <li> <h5>Hotel Shri Karani Vilas </h5> <ul> <li>Address: Near Ambika Restaurant, Sinchai Colony, Pratap Nagar, Chittorgarh, Rajasthan - 312001.</li> <li>Phone: 9829513999</li> <li>Mail Us: <a href="mailto: hotelshrikaranivilas@gmail.com"> hotelshrikaranivilas@gmail.com</a></li> </ul> </li> </ul> </div> </div> <div class="col-lg-6"> <div class="widget-contact-form"> <h5>Contact Form</h5> <p>We are eager to hear from you; please fill in your contact information and one of our staff members will contact you shortly.</p> <div class="data-form"> <form action="" method="post"> <?php if($_GET['captcha'] == 'yes'){ echo '<div style="margin: 15px;" class="alert alert-success">Message Send</div>'; } else if($_GET['captcha'] == 'no'){ echo '<div style="margin: 15px;" class="alert alert-danger">Captcha Failed. Please try again!</div>'; } else if($_GET['captcha'] == 'other'){ echo '<div style="margin: 15px;" class="alert alert-danger">Oops! Something went wrong and we couldn\'t send your message.</div>'; } ?> <div class="row"> <div class="col-md-12"> <input type="text" id="form-name" name="name" placeholder="YOUR NAME"> </div> <!--<div class="col-md-6"> <input type="text" id="form-surname" name="form-surname" placeholder="YOUR SURNAME"> </div>--> <div class="col-md-6"> <input type="text" id="form-email" name="email" placeholder="YOUR EMAIL ADDRESS"> </div> <div class="col-md-6"> <input type="text" id="form-phone" name="phone" placeholder="YOUR PHONE"> </div> <div class="col-md-12"> <textarea cols="6" rows="8" id="form-message" name="message" placeholder="YOUR MESSAGE"></textarea> </div> <!--<div class="col-md-4"> <p class="note">* Please fill in all of the required fields</p> </div>--> <div class="col-md-12"> <div class="g-recaptcha" data-sitekey="6LcZG8QUAAAAADTBRblwBr8IeswEZEY-V3YKx0gJ"></div> </div> <div class="col-md-6 align-right"> <input type="submit" name="formsubmit" value="SEND FORM" class="btn"> </div> </div> </form> </div> </div> </div> </div> </div> </div> <div class="section"> <div class="wrapper-full"> <div class="widget-google-map"> <div class="map-title"> <i class="fa fa-map-marker"></i> <h5>MAP</h5> </div> <div> <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3619.567527135315!2d74.61901551498534!3d24.878616150656722!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3967cf7013c0a077%3A0xd8a850e1554a165e!2sHotel%20Shri%20Karani%20Vilas!5e0!3m2!1sen!2sin!4v1572415992440!5m2!1sen!2sin" width="100%" height="400" frameborder="0" style="border:0;" allowfullscreen=""></iframe> </div> </div> </div> </div> </div> <?php include 'include/footer.php'; ?> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/jquery-ui.min.js"></script> <script src="assets/js/jquery.fitvids.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/magnific.popup.min.js"></script> <script src="assets/js/imagesloaded.pkgd.js"></script> <script src="assets/js/isotope.pkgd.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <script src="assets/js/booking.form.js"></script> <script src="assets/js/contact.form.js"></script> <script src="https://maps.google.com/maps/api/js?sensor=false&language=en"></script> <script src="assets/js/gmap3.min.js"></script> <script src="assets/js/custom.js"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings