File manager - Edit - /home/custbahd/scorisinternationaljunior.com/admin/submit/index.php
Back
<?php session_start(); include_once('../db/connection.php'); if(isset($_POST['submit'])){ if($_POST['access'] != 'scoris256'){ $subject = $_POST['subject']; $name = $_POST['name']; $access = $_POST['access']; $sql = "INSERT INTO attempts (subject, name, access) VALUES ('$subject', '$name', '$access')"; if($conn->query($sql)); $_SESSION['error'] = "Incorrect access code, get code from admin!"; //return the inputted fields $_SESSION['access'] = $_POST['access']; } else { $name = $_POST['name']; $title = $_POST['title']; $message = $_POST['message']; $sql = "INSERT INTO messages (name, title, message) VALUES ('$name', '$title', '$message')"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Message emailed succesfully.'; } /////////////// //use for MySQLi Procedural // if(mysqli_query($conn, $sql)){ // $_SESSION['success'] = 'Member added successfully'; // } ////////////// else{ $_SESSION['error'] = 'Something went wrong while emailing the message!'; } } } header('location: ../'); ?> <?php if(isset($_POST['submit'])){ if($_POST['access'] != 'scoris256'){ } else { $name = $_POST['name']; $sql = "INSERT INTO sender (name) VALUES ('$name')"; //use for MySQLi OOP if($conn->query($sql)); } } ?> <?php $conn= mysqli_connect("localhost", "custbahd_customassistname", "Rwatangabo1son", "custbahd_scoris"); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; require_once __DIR__ . '/vendor/phpmailer/src/Exception.php'; require_once __DIR__ . '/vendor/phpmailer/src/PHPMailer.php'; require_once __DIR__ . '/vendor/phpmailer/src/SMTP.php'; $mail = new PHPMailer(true); $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = 'premium146.web-hosting.com'; $mail->SMTPAuth = true; $mail->Username = "info@scorisinternationaljunior.com"; $mail->Password = "Scorisadmin256"; $mail->SMTPSecure = "ssl"; $mail->Port = 465; if(isset($_POST['submit'])){ if($_POST['access'] != 'scoris256'){ //return the inputted fields $_SESSION['access'] = $_POST['access']; } else { $sql = "select * from newsletters"; // Query for the making the connection. $res = mysqli_query($conn, $sql); if(mysqli_num_rows($res) > 0) { while($x = mysqli_fetch_assoc($res)) { $mail->addBcc($x['email']); } $name = $_POST['name']; $subject = $_POST['subject']; $title = $_POST['title']; $message = $_POST['message']; $mail->From = "info@scorisinternationaljunior.com"; $mail->FromName = "Scoris International Junior School"; $mail->isHTML(true); $mail->Subject = "$title"; $mail->Body = "<div align='center'> <table width='100%' cellpadding='0' cellspacing='0' border='0'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <img align='center' border='0' src='https://scorisinternationaljunior.com/images/logo/footer-logo.png' alt='Scoris' title='Scoris ©'/> </td> </tr> </table> <br> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-bottom: 1px solid #ececec;'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <h2 style='color: #2b3c6b;font-size: 16px;margin-bottom: 30px;'>Scoris International Junior School</h2> </td> </tr> </table> <br> <br> <br> <table style='margin-top:-40px;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:4px 10px 10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><span style='font-family: Cabin, sans-serif; font-size: 14px; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>$message</span></span></p> <p style='font-size: 14px; line-height: 170%;'><span style='font-family: Cabin, sans-serif; font-size: 14px; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>For any inquiries, contact us below</span></span></p> </div> </td> </tr> </tbody> </table> <br> <br> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;border-bottom: 1px solid #ececec;'><tr><td style='' align='center'><v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' href='' style='height:45px; v-text-anchor:middle; width:212px;' arcsize='9%' stroke='f' fillcolor='#34495e'><w:anchorlock/> <center style='color:#e3e0f0;'> <a href='https://scorisinternationaljunior.com/contact' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #2b3c6b; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 80px;'> <span style='display:block;padding:13px 55px;line-height:120%;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>CONTACT US</span></span></span> </a> </center> </table> <br> <br> <br> <table style='' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:44px 55px;' align='left'> <div class='lead' style='color: #ffffff; line-height: 230%; text-align: center; word-wrap: break-word;'> <img src='../../../images/img/1/principal.jpg' alt='Sarah Lule' title='Sarah Lule - Principal' style='width: 150px; height: 150px; object-fit: cover; object-position: top;'> <p style='font-size: 14px; line-height: 230%;'><em><span style='font-family: Cabin, sans-serif; font-size: 18px; line-height: 41.4px;font-style: normal;'>Mrs. Sarah Lule</span></em></p> <p style='font-size: 14px; line-height: 230%;'><em><span style='font-family: Cabin, sans-serif; font-size: 12px; line-height: 41.4px;font-style: normal;'>Principal</span></em></p> <p style='font-size: 14px; line-height: 230%;'><strong><span style='font-family: Cabin, sans-serif; font-size: 18px; line-height: 41.4px;'>★ ★ ★ ★ ★</span></strong></p> <p style='font-size: 14px; line-height: 230%;'><em><span style='font-family: Cabin, sans-serif; font-size: 12px; line-height: 41.4px;'>'We are an extra-ordinary school that offers outstanding care, guidance and support from a highly committed pastoral network'</span></em></p> </div> </td> </tr> </tbody> </table> <br> <br> <table border='0' cellspacing='0' cellpadding='0' width='100%' height='32' style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 0px'> <tbody> <tr style='vertical-align: top' align='center'> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://facebook.com/ScorisJuniors' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/fb1.png' style='width:35px;' alt='Facebook'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://twitter.com/ScorisJuniors' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/t2.png' style='width:35px;' alt='twitter'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://instagram.com/scorisjuniors' target='_blank' style='color: #2b3c6b;font-size: 14px;'> <img src='https://scorisinternationaljunior.com/images/icons/social/insta1.png' style='width:35px;' alt='Instagram'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://wa.me/256700110828' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/w2.png' style='width:35px;' alt='Whatsapp'> </a> </td> </tr> </tbody></table> <table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='color: #2b3c6b; line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><a href='https://scorisinternationaljunior.com' style='text-decoration: none; color: #2b3c6b;'>https://scorisinternationaljunior.com</a></p> <p style='font-size: 14px; line-height: 170%;'> <a href='mailto:info@scorisinternationaljunior.com' style='text-decoration: none; color: #2b3c6b;'>info@scorisinternationaljunior.com</a></p> <p style='font-size: 14px; line-height: 170%;'><a href='https://maps.app.goo.gl/Qc6a1c9aheXEc7Dq8' style='text-decoration: none; color: #2b3c6b;'> Makindye Division, Kansanga Kiwafu Road</a></p> </div> </td> </tr> </tbody> </table> <table style='' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;font-size: 12px;color: gray;'> <p style='font-weight: bold;'> Scoris International Junior School © <script>document.write(new Date().getFullYear());</script> Copyright</p> <p> Powered by <a href='https://customassistinc.com/' target='_blank' style='color: gray;'>Custom Assist Inc.</a></p> </div> </td> </tr> </tbody> </table> </div>"; try { $mail->send(); echo ""; } catch (Exception $e) { echo "Mailer Error: " . $mail->ErrorInfo; } } } } ?> <?php $mail = new PHPMailer(true); $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = 'premium146.web-hosting.com'; $mail->SMTPAuth = true; $mail->Username = "info@scorisinternationaljunior.com"; $mail->Password = "Scorisadmin256"; $mail->SMTPSecure = "ssl"; $mail->Port = 465; if(isset($_POST['submit'])){ if($_POST['access'] != 'scoris256'){ //return the inputted fields $_SESSION['access'] = $_POST['access']; $mail->From = "info@scorisinternationaljunior.com"; $mail->FromName = "Scoris International Junior School"; $mail->addAddress("info@scorisinternationaljunior.com", "Scoris International Junior School"); $mail->isHTML(true); $mail->Subject = "Caution! Message Send Attempt"; $mail->Body = file_get_contents("../search/attempt/index.html"); try { $mail->send(); echo ""; } catch (Exception $e) { echo "Mailer Error: " . $mail->ErrorInfo; } } else { $mail->From = "info@scorisinternationaljunior.com"; $mail->FromName = "Scoris International Junior School"; $mail->addAddress("info@scorisinternationaljunior.com", "Scoris International Junior School"); $mail->isHTML(true); $mail->Subject = "Scoris Email Manager"; $mail->Body = "<div align='center'> <table width='100%' cellpadding='0' cellspacing='0' border='0'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <img align='center' border='0' src='https://scorisinternationaljunior.com/images/logo/footer-logo.png' alt='Scoris' title='Scoris ©'/> </td> </tr> </table> <br> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-bottom: 1px solid #ececec;'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <h2 style='color: #2b3c6b;font-size: 16px;margin-bottom: 30px;'>Scoris International Junior School</h2> </td> </tr> </table> <br> <br> <br> <table style='margin-top:-40px;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:4px 10px 10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><span style='font-family: Cabin, sans-serif; font-size: 14px; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>$name has sent a message to emails using the Scoris Email Messenger.</span></span></p> <p style='font-size: 14px; line-height: 170%;'><span style='font-family: Cabin, sans-serif; font-size: 14px; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>For more details, click below</span></span></p> </div> </td> </tr> </tbody> </table> <br> <br> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;border-bottom: 1px solid #ececec;'><tr><td style='' align='center'><v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' href='' style='height:45px; v-text-anchor:middle; width:212px;' arcsize='9%' stroke='f' fillcolor='#34495e'><w:anchorlock/> <center style='color:#e3e0f0;'> <a href='https://scorisinternationaljunior.com/admin/newsletters/messenger' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #2b3c6b; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 80px;'> <span style='display:block;padding:13px 55px;line-height:120%;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>SEE DETAILS</span></span></span> </a> </center> </table> <br> <br> <br> <table border='0' cellspacing='0' cellpadding='0' width='100%' height='32' style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 0px'> <tbody> <tr style='vertical-align: top' align='center'> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://facebook.com/ScorisJuniors' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/fb1.png' style='width:35px;' alt='Facebook'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://twitter.com/ScorisJuniors' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/t2.png' style='width:35px;' alt='twitter'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://instagram.com/scorisjuniors' target='_blank' style='color: #2b3c6b;font-size: 14px;'> <img src='https://scorisinternationaljunior.com/images/icons/social/insta1.png' style='width:35px;' alt='Instagram'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://wa.me/256700110828' target='_blank'> <img src='https://scorisinternationaljunior.com/images/icons/social/w2.png' style='width:35px;' alt='Whatsapp'> </a> </td> </tr> </tbody></table> <table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='color: #2b3c6b; line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><a href='https://scorisinternationaljunior.com' style='text-decoration: none; color: #2b3c6b;'>https://scorisinternationaljunior.com</a></p> <p style='font-size: 14px; line-height: 170%;'> <a href='mailto:info@scorisinternationaljunior.com' style='text-decoration: none; color: #2b3c6b;'>info@scorisinternationaljunior.com</a></p> <p style='font-size: 14px; line-height: 170%;'><a href='https://maps.app.goo.gl/Qc6a1c9aheXEc7Dq8' style='text-decoration: none; color: #2b3c6b;'> Makindye Division, Kansanga Kiwafu Road</a></p> </div> </td> </tr> </tbody> </table> <table style='' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;font-size: 12px;color: gray;'> <p style='font-weight: bold;'> Scoris International Junior School © <script>document.write(new Date().getFullYear());</script> Copyright</p> <p> Powered by <a href='https://customassistinc.com/' target='_blank' style='color: gray;'>Custom Assist Inc.</a></p> </div> </td> </tr> </tbody> </table> </div>"; try { $mail->send(); echo ""; } catch (Exception $e) { echo "Mailer Error: " . $mail->ErrorInfo; } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2.1 |
proxy
|
phpinfo
|
Settings