home
/
aioutajg
/
playpauseonline.com
/
admin
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
[DIR] ckeditor
N/A
[DIR] css
N/A
[DIR] uploads
N/A
config.php
1.02 KB
Rename
Delete
error_log
4.08 KB
Rename
Delete
index.php
2.41 KB
Rename
Delete
install.php
1.07 KB
Rename
Delete
login.php
1.99 KB
Rename
Delete
logout.php
812 bytes
Rename
Delete
post.php
13.47 KB
Rename
Delete
upload_image.php
1019 bytes
Rename
Delete
<?php session_start(); require 'config.php'; if (!isset($_SESSION['admin_logged_in'])) { header('Location: login.php'); exit; } // Handle post actions if (isset($_GET['action'])) { $id = $_GET['id'] ?? null; switch ($_GET['action']) { case 'delete': $stmt = $db->prepare("DELETE FROM posts WHERE id = ?"); $stmt->bind_param('i', $id); $stmt->execute(); header('Location: index.php'); exit; } } // Get all posts $result = $db->query("SELECT * FROM posts ORDER BY created_at DESC"); ?> <!DOCTYPE html> <html> <head> <title>Admin Dashboard</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="<?= SITE_URL ?>/admin/css/style.css" rel="stylesheet"> </head> <body> <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> <div class="container-fluid"> <a class="navbar-brand" href="#">Admin Panel</a> <div class="d-flex"> <a href="logout.php" class="btn btn-outline-light">Logout</a> </div> </div> </nav> <div class="container mt-4"> <div class="d-flex justify-content-between align-items-center mb-4"> <h1>Blog Posts</h1> <a href="post.php" class="btn btn-success">Add New Post</a> </div> <table class="table table-striped"> <thead> <tr> <th>Title</th> <th>Status</th> <th>Date</th> <th>Actions</th> </tr> </thead> <tbody> <?php while ($post = $result->fetch_assoc()): ?> <tr> <td><?= $post['title'] ?></td> <td><?= ucfirst($post['status']) ?></td> <td><?= date('M d, Y', strtotime($post['created_at'])) ?></td> <td> <a href="post.php?id=<?= $post['id'] ?>" class="btn btn-sm btn-primary">Edit</a> <a href="?action=delete&id=<?= $post['id'] ?>" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure?')">Delete</a> </td> </tr> <?php endwhile; ?> </tbody> </table> </div> </body> </html>
Save