X7ROOT File Manager
Current Path:
/home/u126090504/domains/oca.org.in/public_html/admin
home
/
u126090504
/
domains
/
oca.org.in
/
public_html
/
admin
/
📁
..
📄
achievers.php
(13.81 KB)
📄
admissions.php
(5.67 KB)
📄
banners.php
(7.18 KB)
📄
change_password.php
(3.54 KB)
📄
contacts.php
(3.83 KB)
📄
dashboard.php
(9.73 KB)
📄
downloads.php
(4.91 KB)
📄
export_franchise.php
(930 B)
📄
faculty.php
(13.27 KB)
📄
forgot_password.php
(6.52 KB)
📄
franchise.php
(7.28 KB)
📄
gallery.php
(3.08 KB)
📄
governing-body-manage.php
(9.12 KB)
📄
grievance-update.php
(1003 B)
📄
grievance-view.php
(5.32 KB)
📄
grievances.php
(5.79 KB)
📁
includes
📄
index.php
(82 B)
📄
login.php
(6.59 KB)
📄
logout.php
(102 B)
📄
manage_albums.php
(2.28 KB)
📄
manage_media.php
(3.02 KB)
📄
manage_photos.php
(5.66 KB)
📄
manage_videos.php
(3.62 KB)
📄
new_password.php
(3.9 KB)
📄
notice.php
(16.36 KB)
📄
notices.php
(8.24 KB)
📄
payments.php
(15.23 KB)
📁
phpmailer
📄
popup.php
(10.68 KB)
📄
reset_password.php
(2.27 KB)
📄
secure_session.php
(1000 B)
📄
settings.php
(5.21 KB)
📄
submit-grievance.php
(4.97 KB)
📄
testimonials.php
(10.25 KB)
📄
update_status.php
(1.29 KB)
📄
upi_settings.php
(1.52 KB)
Editing: reset_password.php
<?php include 'secure_session.php'; require_once '../config.php'; $token = $_GET['token'] ?? ''; if (!$token) { die('Invalid token'); } // Find user by token and check expiry $stmt = $conn->prepare("SELECT id FROM register WHERE reset_token=? AND reset_expires > NOW() LIMIT 1"); $stmt->bind_param("s", $token); $stmt->execute(); $stmt->bind_result($uid); $valid = $stmt->fetch(); $stmt->close(); if (!$valid) { die('Token invalid or expired.'); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $p1 = $_POST['password'] ?? ''; $p2 = $_POST['confirm'] ?? ''; if (strlen($p1) < 8) { $err = "Password must be at least 8 characters."; } elseif ($p1 !== $p2) { $err = "Passwords do not match."; } else { $hash = password_hash($p1, PASSWORD_DEFAULT); // Update password and clear token $stmt = $conn->prepare("UPDATE register SET password=?, reset_token=NULL, reset_expires=NULL WHERE id=?"); $stmt->bind_param("si", $hash, $uid); $stmt->execute(); $stmt->close(); echo "<div style='font-family:Arial;padding:20px;'>Password reset successful. <a href='login.php'>Login</a></div>"; exit; } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Reset Password</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body class="bg-light"> <div class="container py-5"> <div class="col-md-5 mx-auto"> <div class="card shadow"> <div class="card-body"> <h3 class="text-center mb-3">Reset Password</h3> <?php if (!empty($err)) echo "<div class='alert alert-danger'>{$err}</div>"; ?> <form method="POST"> <div class="form-group"> <label>New Password</label> <input type="password" name="password" class="form-control" minlength="8" required> </div> <div class="form-group"> <label>Confirm Password</label> <input type="password" name="confirm" class="form-control" minlength="8" required> </div> <button type="submit" class="btn btn-success btn-block">Update Password</button> </form> </div> </div> </div> </div> </body> </html>
Upload File
Create Folder