ÿØÿà JPEG ÿþ;
Server IP : 68.65.120.201 / Your IP : 216.73.216.73 Web Server : LiteSpeed System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : taxhyuvu ( 2294) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/taxhyuvu/www/ |
Upload File : |
<?php include_once "admin/db.php"; session_start(); $Email = $_SESSION['forget_power']; $oop = "SELECT * FROM `signup` WHERE `Email_Address`= '$Email' "; $data = mysqli_query($con, $oop); $q = mysqli_fetch_assoc($data); $codei = $q['code']; if (isset($_POST['lolo'])) { $pass = $_POST['pass']; $confpa = $_POST['passw']; // Validation functions to check if the password and confirm password are valid function isValidPassword($password) { return preg_match("/^[a-zA-Z0-9\s.,#@\-]+$/", $password); } // Check if the password is valid if (!isValidPassword($pass)) { echo '<script>alert("Invalid Password!");</script>'; } elseif (!isValidPassword($confpa)) { echo '<script>alert("Invalid Confirm Password!");</script>'; } else { // Use prepared statements to prevent SQL injection $pkk = "UPDATE `signup` SET `Password`=?, `Confirm_Password`=? WHERE `Email_Address`=?"; $stmt = mysqli_prepare($con, $pkk); if ($stmt) { // Bind parameters mysqli_stmt_bind_param($stmt, "sss", $pass, $confpa, $Email); // Execute the statement if (mysqli_stmt_execute($stmt)) { echo '<script>alert("Update successful!");</script>'; header('location: login.php'); session_destroy(); } else { echo '<script>alert("Update failed!");</script>'; } // Close statement mysqli_stmt_close($stmt); } else { echo '<script>alert("Prepared statement error!");</script>'; } // Close connection mysqli_close($con); } } ?> <!DOCTYPE html> <html lang="en"> <head> <title>User Login</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--===============================================================================================--> <link rel="icon" type="image/png" href="icon.png"/> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/vendor/bootstrap/css/bootstrap.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/fonts/font-awesome-4.7.0/css/font-awesome.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/vendor/animate/animate.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/vendor/css-hamburgers/hamburgers.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/vendor/select2/select2.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="ulogin/css/util.css"> <link rel="stylesheet" type="text/css" href="ulogin/css/main.css"> <!--===============================================================================================--> <style> img { vertical-align: middle; border-style: none; width: 100%; margin-bottom: 10%; } .container-login100 { background: linear-gradient(-135deg, #a2a1a0, #1c959e) !important; } .wrap-login100 { width: 960px; background: #fff; padding: 80px 130px 80px 100px; } .p-t-136 { padding-top: 20px; } .login100-form-title { font-family: math; font-size: 35px; color: #0e7786; font-weight:900; line-height: 1.2; text-align: center; width: 330px; display: block; padding-bottom: 35px; padding-top: 10px; } .input100 { width: 330px; font-family: math !important; font-size: 18px !important; font-weight: 700 !important; background: #ebebeb !important; border-radius: 12px !important; border:1px solid #c0c9cb !important; } .container-login100-form-btn { width: 330px; } .symbol-input100 { font-size: 16px; color: #1c7785 !important; } .focus-input100 { box-shadow: 0px 0px 0px 0px; color: rgb(255 255 255 / 80%) !important; } .p-t-12 { padding-top: 25px; width: 330px; } .p-t-136 { padding-top: 10px; padding-left: 0px; width: 330px; } .login100-form-btn { font-family: math !important; font-size: 17px !important; color: white !important; background: #1c959e !important; font-weight: 900 !important; border-radius:10px; } .login100-form-btn:hover { background: #e9e9e9 !important; color: #257784 !important; border: 1px solid #1e929b !important; transition: 0.5s; } .input100 { padding: 0 0px 0 40px ; } .symbol-input100 { font-size: 16px; padding-left: 14px; } .txt1 { font-family: math; font-size: 17px; line-height: 1.5; color: #646262; font-weight: 700; } .txt2 { font-family: math; font-size: 17px; line-height: 1.5; color: #646262; font-weight: 700; } textarea:focus, input:focus { /* border-color: transparent !important; */ padding-left:40px !important; } .input100:focus + .focus-input100 + .symbol-input100 { padding-left: 14px; } #user{font-weight: 500; width: 100%; /* margin-left: 15px; */ border-radius: 5px; font-family: math; height: 5%; /* color: #107e86; */ background: whitesmoke;} a:hover { text-decoration: none; color: #05666d; font-weight: 700; } @media (max-width: 992px){ .login100-pic { width: 100%; display: none !important; } } @media (max-width: 768px){ .wrap-login100 {padding: 10% !important;} img{width:100% !important; margin-bottom: 4%;} .input100 { width: 100%; } .symbol-input100 { display: flex; margin-left: 0%; font-size: 15px !important; } .container-login100-form-btn { width: 100%; } .login100-form-title{width: 100%;} .p-t-12{width: 100%;} .p-t-136{width: 100%;} } </style> </head> <body style="background: linear-gradient(-135deg, #a2a1a0, #1c959e) !important;"> <center> <div class="limiter"> <div class="container-login100"> <div class="wrap-login100" > <div class="login100-pic js-tilt" data-tilt style="display: flex;text-align: center;align-items: center;justify-content: center;"> <img src="ulogin/images/img-01.png" alt="IMG" > </div> <form class="login100-form validate-form" method="post"> <a href="index"><div><img src="Logo.png" alt=""></div></a> <span class="login100-form-title"> Reset Password </span> <p style="color:red;"> Your Old Password is : <?php echo $q['Password'];?> </p> <div class="wrap-input100 validate-input" data-validate = "Valid email is required: ex@abc.xyz"> <input class="input100" type="password" name="pass" placeholder="Enter New Password"> <span class="focus-input100"></span> <span class="symbol-input100"> <i class="fa fa-lock" aria-hidden="true"></i> </span> </div> <div class="wrap-input100 validate-input" data-validate = "Password is required"> <input class="input100" type="password" name="passw" placeholder="Confirm Your Password"> <span class="focus-input100"></span> <span class="symbol-input100"> <i class="fa fa-lock" aria-hidden="true"></i> </span> </div> <!-- <div class="wrap-input100 validate-input" data-validate = "Password is required"> <input class="input100" type="hidden" name="usap" value="n"> <span class="focus-input100"></span> <span class="symbol-input100"> </span> </div> --> <!-- <select name="user" id="user" required> <option value="" disabled selected hidden>Select Account</option> <option value="a">Admin Account</option> <option value="e">Employee Account</option> </select> --> <div class="container-login100-form-btn"> <button class="login100-form-btn" type="submit" name="lolo"> Submit </button> </div> <!-- <div class="text-center p-t-12"> <span class="txt1"> Forgot </span> <a class="txt2" href="forget"> Email / Password? </a> </div> --> <div class="text-center p-t-136"> <a class="txt2" href="husignup"> Create your Account <i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i> </a> </div> </form> </div> </div> </div> </center> <!--===============================================================================================--> <script src="ulogin/vendor/jquery/jquery-3.2.1.min.js"></script> <!--===============================================================================================--> <script src="ulogin/vendor/bootstrap/js/popper.js"></script> <script src="ulogin/vendor/bootstrap/js/bootstrap.min.js"></script> <!--===============================================================================================--> <script src="ulogin/vendor/select2/select2.min.js"></script> <!--===============================================================================================--> <script src="ulogin/vendor/tilt/tilt.jquery.min.js"></script> <script > $('.js-tilt').tilt({ scale: 1.1 }) </script> <!--===============================================================================================--> <script src="ulogin/js/main.js"></script> </body> </html>