����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 52.14.219.203 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/malawisounds.com/ |
Upload File : |
<?php //Define name spaces use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; //Include required phpMailer files require 'PHPMailer/PHPMailer.php'; require 'PHPMailer/SMTP.php'; require 'PHPMailer/Exception.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="icon" type="x-icon" href="Icons/malawisounds.ico"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="./css/animate.css"> <link rel="stylesheet" type="text/css" href="./css/load.css"> <link rel="stylesheet" type="text/css" href="./css/w3.css"> <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="impact/stylesheet.css" /> <link rel="stylesheet" type="text/css" href="w3.css"> <script type="text/javascript" src="js/ajax.js"></script> <script src="./js/sweetalert.min.js"></script> <title>Malawiounds - Contact-Us</title> <style type="text/css"> button { background-color: #2891a6; border: none; color: #fff; margin-bottom: 0.5rem; border-radius: 20px; padding: 8px 15px; box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.2); outline: none; transition: all 0.4s ease-out; } button:hover { color: #fff; background-color: #3ebbd4; box-shadow: 0 0 5px 0.1px #343434; } </style> </head> <body> <div class="margin"> <?php include './header.php'; ?> <!--Search bar--> <input type="text" id="search" placeholder=" SEARCH-MUSIC, ARTISTS" onkeyup="findmatch(this.value)" class="glyphicon glyphicon-search"> <!--search results goes here--> <div id="results" class="w3-container w3-light-grey"></div> <!-- End of nav Bar --> <h3 class="w3-center" style="font-family:gothic-bold">EMAIL US</h3> <?php include './connect.php'; if (isset($_POST['submit'])) { $name = mysqli_real_escape_string($conn, htmlentities($_POST['name'])); $email = mysqli_real_escape_string($conn, htmlentities($_POST['email'])); $subject = mysqli_real_escape_string($conn, htmlentities($_POST['subject'])); $message = nl2br($_POST['message']); $_SESSION['name'] = $name; $_SESSION['email'] = $email; $_SESSION['subject'] = $subject; $_SESSION['message'] = $message; if (!empty($name) && !empty($email) && !empty($message)) { $pm = " <!DOCTYPE html> <html lang=\"en\"> <head> <meta charset=\"UTF-8\"> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> </head> <body> <div style=\"box-shadow:0 0 12px 1px rgba(0,0,0,0.5);border-radius:15px;\"> <div style=\"background-color:#2891a6;color:#fff;text-align:center;font-size:17px;padding:6px;font-weight:bold;font-family:arial;\"> <div class=\"text-center bg-dark text-white\">To:MALAWI SOUNDS</div> </div> <p>$message</p> <br><br> <center> <div class=\"padding:5px;text-align:center;background-color:#c9c8c8;\"> Malawisounds © " . date('Y') . " </div> </center> </div> </body> </html> "; //Create instance of phpMailer $mail = new PHPMailer(); //Enable verbose debug output // $mail->SMTPDebug = SMTP::DEBUG_SERVER; //set mailer to use smtp $mail->IsSMTP(); //define smtp host $mail->Host = "smtp.gmail.com"; //enable smtp authentification $mail->SMTPAuth = true; //set type of encryption (ssl/tls) //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //set port to connect smtp $mail->Port = 587; //465 for ssl //set gmail username $mail->Username = "beatonndaba@gmail.com"; //set gmail password $mail->Password = "tsxngatucbssjwbm"; //Set email format to HTML $mail->isHTML(true); //set email subject $mail->Subject = $subject; //set sender email $mail->setFrom("beatonndaba@gmail.com", strtoupper($name)); //reply to $mail->addReplyTo($email, $name); //Email body $mail->Body = $pm; //Add recipient // $mail->addAddress("malawisounds265@gmail.com"); //Add recipient // $mail->addAddress("augustinemukisi@gmail.com", "Augustine Mukisi"); if ($mail->Send()) { unset($_SESSION['message']); ?> <script type="text/javascript"> swal("SUCCESS", "Email was sent successfully", "success"); </script> <?php } else { ?> <script type="text/javascript"> swal("ERROR", "<?php echo 'Failed to send email. Mailer Error: {' . $mail->ErrorInfo . '}'; ?>", "error"); </script> <?php } } else { ?> <div class="danger">Please fill all required fields</div> <?php } } ?> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="POST" role="form"> <input type="text" name="name" maxlength="30" placeholder="Full Name" class="f-control" value="<?php echo isset($_SESSION['name']) ? $_SESSION['name'] : ''; ?>" required /> <input type="email" name="email" class="f-control" maxlength="40" placeholder="Email address" value="<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>" required /> <input type="text" name="subject" maxlength="70" class="f-control" placeholder="Subject" value="<?php echo isset($_SESSION['subject']) ? $_SESSION['subject'] : ''; ?>" required /> <textarea name="message" cols="30" rows="6" maxlength="1500" class="f-control" placeholder="Message" required><?php echo isset($_SESSION['message']) ? $_SESSION['message'] : ''; ?></textarea> <center><button type="submit" name="submit">Send Email</button></center> </form> <!--Footer--> <?php include './footer.php'; ?> </div> </body> </html> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/nav.js"></script> <script src="./js/wow.js"></script>