BLACKSITE
:
216.73.217.4
:
104.37.75.190 / alpenpass.ca
:
Linux server3.pointsplan.com 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
:
/
home
/
apca
/
public_html
/
Upload File:
files >> /home/apca/public_html/contact-us.php
<?php session_start(); error_reporting(0); include('includes/config.php'); @session_start(); function generateCode($characters) { $possible = '23456789bcdfghjkmnpqrstvwxyz'; $code = ''; $i = 0; while ($i < $characters) { $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1); $i++; } return $code; } if(isset($_POST['send'])) { if($_REQUEST['captcha']!=$_SESSION['captcha']) { http_response_code(400); $message = "Oops! Invalid Captcha"; $alert_message="Oops! Invalid Captcha"; $type="error"; } function cleanEmail($email) { // Remove illegal characters from email $sanitizedEmail = filter_var($email, FILTER_SANITIZE_EMAIL); if (filter_var($sanitizedEmail, FILTER_VALIDATE_EMAIL)) { return $sanitizedEmail; } else { return false; // Invalid email } } $name=$_POST['fullname']; $email=cleanEmail($_POST['email']); if($email<>false){ $contactno=$_POST['contactno']; $message=$_POST['message']; $sql="INSERT INTO tblcontactusquery(name,EmailId,ContactNumber,Message) VALUES(:name,:email,:contactno,:message)"; $query = $dbh->prepare($sql); $query->bindParam(':name',$name,PDO::PARAM_STR); $query->bindParam(':email',$email,PDO::PARAM_STR); $query->bindParam(':contactno',$contactno,PDO::PARAM_STR); $query->bindParam(':message',$message,PDO::PARAM_STR); $query->execute(); $lastInsertId = $dbh->lastInsertId(); if($lastInsertId) { $msg=" Message Sent. We will contact you shortly"; $type="success"; } else { $error="Something went wrong. Please try again"; $type="error"; } // Retrieve form data $name = isset($_POST['fullname']) ? $_POST['fullname'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $contactno = isset($_POST['contactno']) ? $_POST['contactno'] : ''; $message = isset($_POST['message']) ? nl2br($_POST['message']) : ''; // Recipient Email $to = "Info@alpenpass.ca"; //$to="canadacoder@gmail.com"; // Email Subject $subject = "Message from the Alpenpass website"; // Email Headers $headers = "From: " . $email . "\r\n"; $headers .= "Reply-To: " . $email . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; // Email Message (HTML format) $body = " <html> <head> <title>Alpenpass Contact Inquiry</title> </head> <body> <p><strong>You have received the following inquiry from the Alpenpass Contact Us page:</strong></p> <table border='1' cellspacing='0' cellpadding='10'> <tr><td><strong>Name:</strong></td><td>{$name}</td></tr> <tr><td><strong>Email:</strong></td><td>{$email}</td></tr> <tr><td><strong>Contact No:</strong></td><td>{$contactno}</td></tr> <tr><td><strong>Message:</strong></td><td>{$message}</td></tr> </table> <br> <p>Best Regards,<br>Alpenpass Website</p> </body> </html> "; // Send the email $mailSuccess = mail($to, $subject, $body, $headers); // Check if the mail was sent successfully if ($mailSuccess) { $msg.= "Your message has been sent successfully!"; } else { $error.= "There was an issue sending your message. Please try again later."; } }else{ $error="Invalid Email"; } } $head.=" <style> .errorWrap { padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #dd3d36; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); } .succWrap{ padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #5cb85c; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); font-size: 18px; background-color: #CCFFCC; } </style>"; include('includes/head.php'); $mTitle="Contact Us | AlpenPass Motorcycle Adventures"; $mDescription="Get in touch with AlpenPass for motorcycle rentals, tours, or questions. We're here to help you ride BC in style."; include('includes/header.php');?> <!-- /Header --> <!--Page Header--> <section class="page-header contactus_page"> <div class="container"> <div class="page-header_wrap"> <div class="page-heading"> <h1>Contact Us</h1> </div> <ul class="coustom-breadcrumb"> <li><a href="#">Home</a></li> <li>Contact Us</li> </ul> </div> </div> <!-- Dark Overlay--> <div class="dark-overlay"></div> </section> <!-- /Page Header--> <!--Contact-us--> <section class="contact_us section-padding"> <div class="container"> <div class="row"> <div class="col-md-6"> <h3>Get in touch using the form below</h3> <div id="statusMessage"> <?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php } else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?> </div> <div class="contact_form gray-bg"> <form method="post"> <div class="form-group"> <label class="control-label">Full Name <span>*</span></label> <input type="text" name="fullname" class="form-control white_bg" id="fullname" required> </div> <div class="form-group"> <label class="control-label">Email Address <span>*</span></label> <input type="email" name="email" class="form-control white_bg" id="emailaddress" required> </div> <div class="form-group"> <label class="control-label">Phone Number <span>*</span></label> <input type="text" name="contactno" class="form-control white_bg" id="phonenumber" required > </div> <div class="form-group"> <label class="control-label">Message <span>*</span></label> <textarea class="form-control white_bg" name="message" rows="4" required></textarea> </div> <div class="form-group"> <img src="<?php $_SESSION['captcha'] = generateCode(6); echo 'scripts/captcha.php';?>" style="max-width:200px; display:inline; margin-right: 20px;" > <input type="text" placeholder="Enter the characters" name="captcha" class="form-control display-7" style="max-width: 200px; display:inline; margin-bottom: 10px;"> </div> <div class="form-group"> <button class="btn" type="submit" name="send" type="submit">Send Message <span class="angle_arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></button> </div> </form> </div> </div> <div class="col-md-6"> <h3>Contact Info</h3> <div class="contact_detail"> <?php $pagetype=$_GET['type']; $sql = "SELECT Address,EmailId,ContactNo from tblcontactusinfo"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { ?> <ul> <li> <div class="icon_wrap"><i class="fa fa-map-marker" aria-hidden="true"></i></div> <div class="contact_info_m"> <?php echo htmlentities($result->Address); ?></div> </li> <li> <div class="icon_wrap"><i class="fa fa-envelope" aria-hidden="true"></i></div> <div class="contact_info_m"><a href="<?php echo htmlentities($result->EmailId); ?>"> <?php echo htmlentities($result->EmailId); ?></a></div> </li> <li> <div class="icon_wrap"><i class="fa fa-phone" aria-hidden="true"></i></div> <div class="contact_info_m"><a href="mailto:<?php echo htmlentities($result->ContactNo); ?>"> <?php echo htmlentities($result->ContactNo); ?></a></div> </li> </ul> <?php }} ?> </div> <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2603.159757312033!2d-123.11882492263506!3d49.273369971391425!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x548673d789e33c5b%3A0xf0100e627612ef80!2s1033%20Marinaside%20Crescent%2C%20Vancouver%2C%20BC%20V6Z%203A3!5e0!3m2!1sen!2sca!4v1746783631688!5m2!1sen!2sca" width="650" height="490" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe> </div> </div> </div> </section> <!-- /Contact-us--> <!--Footer --> <?php include('includes/footer.php');?> <!-- /Footer--> <!--Back to top--> <div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div> <!--/Back to top--> <!--Login-Form --> <?php include('includes/login.php');?> <!--/Login-Form --> <!--Register-Form --> <?php include('includes/registration.php');?> <!--/Register-Form --> <!--Forgot-password-Form --> <?php include('includes/forgotpassword.php');?> <!--/Forgot-password-Form -->