Files
MyKeyser/admin/admin_header.php
T
Ty Clifford 25327e3302 - [index.php](/Users/tyemeclifford/Documents/GH/MyKeyser/index.php): events now appear before featured businesses, plus forum pretty-route fallback.
[events.php](/Users/tyemeclifford/Documents/GH/MyKeyser/events.php) and 
[admin/events.php](/Users/tyemeclifford/Documents/GH/MyKeyser/admin/events.php): 
event image uploads.
[menu.php](/Users/tyemeclifford/Documents/GH/MyKeyser/menu.php), 
[admin/menus.php](/Users/tyemeclifford/Documents/GH/MyKeyser/admin/menus.php), 
and 
[business.php](/Users/tyemeclifford/Documents/GH/MyKeyser/business.php): 
one configurable menu item image slot.
[account.php](/Users/tyemeclifford/Documents/GH/MyKeyser/account.php): 
circular avatar upload and crop controls.
[forum.php](/Users/tyemeclifford/Documents/GH/MyKeyser/forum.php), 
[admin/forum.php](/Users/tyemeclifford/Documents/GH/MyKeyser/admin/forum.php), 
[.htaccess](/Users/tyemeclifford/Documents/GH/MyKeyser/.htaccess), and 
[forum/index.php](/Users/tyemeclifford/Documents/GH/MyKeyser/forum/index.php): 
forum, categories, topic/reply uploads, permalinks, toggle/moderation.
[includes/db.php](/Users/tyemeclifford/Documents/GH/MyKeyser/includes/db.php) 
and 
[includes/functions.php](/Users/tyemeclifford/Documents/GH/MyKeyser/includes/functions.php): 
schema upgrades and shared upload/image helpers.
[assets/css/style.css](/Users/tyemeclifford/Documents/GH/MyKeyser/assets/css/style.css): 
neon styling for forum, images, avatars, attachments.
2026-06-19 10:49:48 -04:00

52 lines
2.8 KiB
PHP

<?php
// Admin header — included by all admin pages after setting $adminTitle
require_once dirname(__DIR__).'/includes/boot.php';
requireAdmin();
$pageTitle = ($adminTitle ?? 'Admin') . ' — Keyser WV Admin';
include dirname(__DIR__).'/includes/header.php';
// Pending owner edit count for badge
$_pendingEdits = (int)qval("SELECT COUNT(*) FROM business_edit_requests WHERE status='pending'");
$_pendingClaims = (int)qval("SELECT COUNT(*) FROM business_claim_requests WHERE status='pending'");
?>
<div class="admin-wrap">
<aside class="admin-side">
<div class="admin-side-title">ADMIN PANEL</div>
<a class="asl" href="/admin/">📊 Dashboard</a>
<div class="admin-side-title" style="margin-top:1rem">DIRECTORY</div>
<a class="asl" href="/admin/businesses.php">🏢 Businesses</a>
<a class="asl" href="/admin/categories.php">🏷️ Categories</a>
<a class="asl" href="/admin/menus.php">🍽️ Menus</a>
<a class="asl" href="/admin/reviews.php">⭐ Reviews</a>
<a class="asl" href="/admin/alerts.php">📢 Alerts</a>
<a class="asl" href="/admin/biz_edits.php" style="display:flex;align-items:center;justify-content:space-between">
<span>✏️ Owner Edits</span>
<?php if ($_pendingEdits): ?>
<span style="background:var(--gold);color:var(--bg0);font-family:'Oswald',sans-serif;font-size:.65rem;padding:.1rem .42rem;border-radius:10px;font-weight:600"><?=$_pendingEdits?></span>
<?php endif; ?>
</a>
<div class="admin-side-title" style="margin-top:1rem">COMMUNITY</div>
<a class="asl" href="/admin/forum.php">💬 Forum</a>
<a class="asl" href="/admin/events.php">📅 Events</a>
<a class="asl" href="/admin/attractions.php">🗺️ Attractions</a>
<a class="asl" href="/admin/reports.php">🚩 Reports</a>
<div class="admin-side-title" style="margin-top:1rem">USERS</div>
<a class="asl" href="/admin/users.php">👥 Users</a>
<a class="asl" href="/admin/owners.php" style="display:flex;align-items:center;justify-content:space-between">
<span>🔑 Assign Owners</span>
<?php if ($_pendingClaims): ?>
<span style="background:var(--gold);color:var(--bg0);font-family:'Oswald',sans-serif;font-size:.65rem;padding:.1rem .42rem;border-radius:10px;font-weight:600"><?=$_pendingClaims?></span>
<?php endif; ?>
</a>
<div class="admin-side-title" style="margin-top:1rem">SETTINGS</div>
<a class="asl" href="/admin/settings.php">⚙️ Site Settings</a>
<hr style="border-color:var(--bdr);margin:1rem 0">
<a class="asl" href="/index.php">🏠 View Site</a>
<a class="asl" href="/logout.php">🚪 Sign Out</a>
</aside>
<div class="admin-main">
<?php
function adminTitle(string $t, string $sub=''): void {
echo '<div class="admin-sec-title">'.e($t).'</div>';
if($sub) echo '<p style="color:var(--text-m);font-size:.88rem;margin-top:-.5rem;margin-bottom:1rem">'.e($sub).'</p>';
}