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: change_password.php
<?php include 'secure_session.php'; // 🔐 Always first (session security) include 'includes/auth.php'; // ✅ Your authentication check require_once '../config.php'; // ✅ DB connection include 'includes/header.php'; // ✅ Layout header $success = $error = ""; $msg = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $current = $_POST['current_password']; $new = $_POST['new_password']; $confirm = $_POST['confirm_password']; // Get admin data $stmt = $conn->prepare("SELECT password FROM register WHERE id=? LIMIT 1"); $stmt->bind_param("i", $_SESSION['admin_id']); $stmt->execute(); $stmt->bind_result($hashedPassword); $stmt->fetch(); $stmt->close(); if (!password_verify($current, $hashedPassword)) { $msg = "<div class='alert alert-danger'>❌ Current password is incorrect.</div>"; } elseif ($new !== $confirm) { $msg = "<div class='alert alert-warning'>⚠️ New passwords do not match.</div>"; } elseif (strlen($new) < 6) { $msg = "<div class='alert alert-warning'>⚠️ Password must be at least 6 characters.</div>"; } else { $newHash = password_hash($new, PASSWORD_BCRYPT); $stmt = $conn->prepare("UPDATE register SET password=? WHERE id=?"); $stmt->bind_param("si", $newHash, $_SESSION['admin_id']); $stmt->execute(); $msg = "<div class='alert alert-success'>✅ Password updated successfully!</div>"; } } ?> <style> body { background: #f5f7fa; font-family: 'Segoe UI', sans-serif; } .password-container { max-width: 500px; margin: 60px auto; } .card-custom { border-radius: 15px; box-shadow: 0 6px 15px rgba(0,0,0,0.1); } .btn-custom { background: red; color: #fff; border-radius: 8px; } .btn-custom:hover { background: #1a5ed9; } </style> </head> <body> <div class="container password-container"> <div class="card card-custom"> <div class="card-body"> <h3 class="text-center mb-4"><i class="fas fa-key"></i> Change Password</h3> <?php echo $msg; ?> <form method="POST"> <div class="form-group"> <label>Current Password</label> <input type="password" name="current_password" class="form-control" required> </div> <div class="form-group"> <label>New Password</label> <input type="password" name="new_password" class="form-control" required> </div> <div class="form-group"> <label>Confirm New Password</label> <input type="password" name="confirm_password" class="form-control" required> </div> <button type="submit" class="btn btn-custom btn-block">Update Password</button> </form> <p class="mt-3 text-center"> <a href="dashboard.php"><i class="fas fa-arrow-left"></i> Back to Dashboard</a> </p> </div> </div> </div> <?php include 'includes/footer.php'; ?>
Upload File
Create Folder