-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposts-admin.php
More file actions
56 lines (53 loc) · 1.87 KB
/
posts-admin.php
File metadata and controls
56 lines (53 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
require_once 'includes/dbh.inc.php';
if (!isset($_SESSION["userid"]) || !in_array($_SESSION["role"], ["admin", "editor"])) {
header("location: login.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Post Management - Blog CMS</title>
<link rel="stylesheet" href="css/admin-style.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="admin-container">
<?php include 'admin-header.php'; ?>
<main class="admin-main">
<section class="dashboard-section">
<h2>Post Management</h2>
<div class="action-bar">
<button onclick="window.location.href='create-post.php'" class="btn btn-primary">Create New Post</button>
</div>
<div class="table-responsive">
<table id="postsTable">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Status</th>
<th>Created</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<!-- Populated via AJAX -->
</tbody>
</table>
</div>
<div class="pagination">
<button id="prevPage" class="btn">Previous</button>
<span id="pageInfo">Page 1</span>
<button id="nextPage" class="btn">Next</button>
</div>
</section>
</main>
</div>
<script src="js/post-management.js"></script>
</body>
</html>