Server IP : 51.89.169.208 / Your IP : 3.148.107.92 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/support/ |
Upload File : |
<?php include_once $_SERVER["DOCUMENT_ROOT"]."/header-footer/global_include.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <title>YellowLeaf - Support</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="/header-footer/global.css"> <link rel="stylesheet" href="contact.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> </head> <?php $path = $_SERVER['DOCUMENT_ROOT']; include_once $path.'/header-footer/header.php'; $business_nav = addslashes($_GET['info']); if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit'])){ $name=ucwords($_POST['name']); $email=addslashes($_POST['email']); $message=addslashes($_POST['message']); $subject=addslashes($_POST['subject']); $date=time(); $browser=$_SERVER['HTTP_USER_AGENT']; // creating ticket convo $r1 = $connect->query("INSERT INTO tickets SET email = '{$email}', name = '{$name}', subject = '{$subject}', message = '{$message}', staff = '0', date = '{$date}', browser='{$browser}', status='1'") or die(mysqli_error()); if ($r1) {$ticket_id = $connect->insert_id;}else{die('Couldn\'t create ticket conversation!');} /// sending email $to = "$name <$email>"; $subject_em = "Support ticket at YellowLeaf - Ticket Number $ticket_id"; $email_message = ' <div style="margin-bottom:5px;">Dear <b>'.$name.'</b></div> <div> You have recently contacted us at YellowLeaf on '.date("l jS F Y, g:ia", $date).'.<br><br> <b>Your ticket number is:</b> '.$ticket_id.'<br><br> <b>Your subject is:</b><br> '.$subject.'<br><br> <b>Your message is:</b><br> '.$message.'<br><br> <a href="/support/view_ticket.html?email='.$email.'">Click here to view your ticket.</a> </div>'; // message template which includes $message and $email_message include '../email_tmp/em_tmp.php'; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: YellowLeaf <support@yellowleaf.co.uk>' . "\r\n"; $send_report = mail($to, $subject_em, $message, $headers,"-f support@yellowleaf.co.uk"); $success=TRUE; } ?> <!-- start: Contact --> <section id="support-section"> <div class="container"> <div class="contact-wrapper"> <div class="contact-side"> <div class="contact-side-menu"> <div class="contact-side-menu-header">Info Menu</div> <a href="/about/" class="contact-side-menu-link">About Us</a> <a href="/support/" class="contact-side-menu-link active">Contact Us</a> <a href="/terms/" class="contact-side-menu-link">Terms & Conditions</a> <a href="/privacy/" class="contact-side-menu-link">Privacy Policy</a> <a href="/cookie_policy/" class="contact-side-menu-link">Cookie Policy</a> </div> </div> <div class="contact-main"> <div class="contact-main-title">Contact Us</div> <p class="contact-main-description">To contact YellowLeaf, please fill in the form below. After submitting, you will be given a private ticket where the progress of your support will be displayed. </p> <h6 class="contact-main-note">Please take note, due to the high demand of support, we are not able to answer all questions and problems in time. We will try our best at all times.</h6> <?php if(isset($send_report) && $send_report==1): ?> <h2 class="alert-success" style="border: 1px solid green; padding: 10px; margin: 20px 0px 20px 0px; font-weight: bold; font-size: larger;">Email send successful.</h2> <?php elseif(isset($send_report) && $send_report==0): ?> <h2 class="alert-error" style="border: 1px solid red; padding: 10px; margin: 20px 0px 20px 0px; font-weight: bold; font-size: larger;">Oops! something went wrong.</h2> <?php endif; ?> <form class="contact-main-form" name="RegForm" action="" method="POST" onsubmit="return CheckSupport();"> <div class="contact-form-group"> <label for="name">Your Name:</label> <input type="text" name="name" class="form-control" id="name"> </div> <div class="contact-form-group"> <label for="email">Your Email:</label> <input type="email" class="form-control" name="email" id="email"> </div> <div class="contact-form-group"> <label for="message">Your Message:</label> <textarea name="message" class="form-control" id="message" cols="30" rows="5"></textarea> </div> <button type="submit" name="submit" class="btn btn-yellow">Send</button> </p> </form> </div> </div> </div> </section> <!-- end: Contact --> <?php include_once $path.'/header-footer/footer.php'; ?> <script src="/js/js.js"></script> <script language="javascript"> < !- function CheckSupport() { var em = /@/; // name if (document.RegForm.name.value == "") { window.alert('Please enter your name'); document.RegForm.name.focus(); return false; } // email if (!em.test(document.RegForm.email.value)) { alert("Please enter a valid email address"); document.RegForm.email.focus(); return false; } // message if (document.RegForm.message.value == "") { window.alert('Please enter your message'); document.RegForm.message.focus(); return false; } } //--> </script>