File manager - Edit - /home/webapp69.cm.in.th/u69319090030/030 shop/admin/header.php
Back
<?php require_once __DIR__ . '/../config/db.php'; require_once __DIR__ . '/../helpers/auth.php'; // Enforce login for administrators and super-admins $currentUser = require_login(['admin', 'super_admin']); function is_active($pageName) { $current_file = basename($_SERVER['PHP_SELF']); return $current_file === $pageName ? 'active' : ''; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CyberShop // Admin Sector</title> <link rel="stylesheet" href="../assets/css/style.css"> </head> <body> <nav class="navbar"> <a href="dashboard.php" class="navbar-brand" style="display: inline-flex; align-items: center; gap: 8px; text-decoration: none;"> <svg width="34" height="34" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" style="filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));"> <defs> <linearGradient id="cyber-gold" x1="0%" y1="100%" x2="100%" y2="0%"> <stop offset="0%" stop-color="#d4af37"/> <stop offset="50%" stop-color="#f39c12"/> <stop offset="100%" stop-color="#ffeaa7"/> </linearGradient> <linearGradient id="cyber-cyan" x1="0%" y1="0%" x2="100%" y2="100%"> <stop offset="0%" stop-color="#00f0ff"/> <stop offset="100%" stop-color="#0088ff"/> </linearGradient> </defs> <!-- Outer Gear teeth ring --> <path d="M50 8 L54 18 L64 14 L66 24 L76 23 L76 33 L85 35 L81 44 L89 50 L81 56 L85 65 L76 67 L76 77 L66 76 L64 86 L54 82 L50 92 L46 82 L36 86 L34 76 L24 77 L24 67 L15 65 L19 56 L11 50 L19 44 L15 35 L24 33 L24 23 L34 24 L36 14 L46 18 Z" fill="none" stroke="url(#cyber-cyan)" stroke-width="4" stroke-linejoin="round"/> <!-- Inner circle outline --> <circle cx="50" cy="50" r="22" stroke="#00f0ff" stroke-width="3" fill="#12161f"/> <!-- Core center dot --> <circle cx="50" cy="50" r="10" fill="#00f0ff" opacity="0.8"/> <circle cx="50" cy="50" r="5" fill="#ffffff"/> <!-- Diagonal Lightning Arrow --> <path d="M18 82 L32 68 L44 56 L36 53 L78 18 L62 38 L72 40 L28 86 Z" fill="url(#cyber-gold)" stroke="#b8860b" stroke-width="1"/> </svg> <span style="font-family: 'Orbitron', sans-serif; font-weight: 900; letter-spacing: 1px;"> <span style="color: #ffffff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);">CYBER</span> <span style="color: #ff0055; text-shadow: 0 0 10px rgba(255, 0, 85, 0.7); margin-left: 4px;">SHOP</span> <span style="color: #00f0ff; text-shadow: 0 0 10px rgba(0, 240, 255, 0.7); margin-left: 4px;">//</span> <span style="color: #ff2a8d; text-shadow: 0 0 10px rgba(255, 42, 141, 0.7); font-family: sans-serif; font-weight: bold; margin-left: 6px;">แผงควบคุม</span> </span> </a> <div class="navbar-menu"> <a href="../index.php" class="nav-link" target="_blank" style="color: var(--neon-green); text-shadow: 0 0 10px var(--glow-green);">ดูร้านค้าหน้าบ้าน ↗</a> <a href="dashboard.php" class="nav-link <?php echo is_active('dashboard.php'); ?>">แผงควบคุม</a> <a href="products.php" class="nav-link <?php echo is_active('products.php'); ?>">จัดการสินค้า</a> <a href="orders.php" class="nav-link <?php echo is_active('orders.php'); ?>">คำสั่งซื้อ</a> <?php if ($currentUser['role'] === 'super_admin'): ?> <a href="approvals.php" class="nav-link <?php echo is_active('approvals.php'); ?>" style="color: var(--neon-red); text-shadow: 0 0 10px var(--glow-red);">อนุมัติแอดมิน</a> <?php endif; ?> <div style="margin-left: 1.5rem; padding-left: 1.5rem; border-left: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem;"> <a href="profile.php" style="text-decoration: none; display: flex; align-items: center; gap: 10px;" title="คลิกเพื่อแก้ไขโปรไฟล์"> <?php if (!empty($currentUser['avatar']) && file_exists(__DIR__ . '/../' . $currentUser['avatar'])): ?> <img src="../<?php echo htmlspecialchars($currentUser['avatar']); ?>" style="width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--neon-red);"> <?php elseif (!empty($currentUser['avatar']) && strpos($currentUser['avatar'], 'http') === 0): ?> <img src="<?php echo htmlspecialchars($currentUser['avatar']); ?>" style="width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--neon-red);"> <?php endif; ?> <span style="font-size: 0.9rem; font-family: 'Orbitron', sans-serif;"> <span style="color: var(--text-gray);">ผู้ควบคุม:</span> <span class="brand-red" style="text-shadow: 0 0 5px var(--glow-red);"><?php echo htmlspecialchars($currentUser['username']); ?></span> <span class="badge" style="font-size: 0.7rem; margin-left: 5px; background: rgba(255, 0, 85, 0.1); border: 1px solid var(--neon-red); color: var(--neon-red);"> <?php echo strtoupper($currentUser['role']); ?> </span> </span> </a> <a href="profile.php" class="btn-cyber <?php echo is_active('profile.php'); ?>" style="padding: 0.4rem 0.9rem; font-size: 0.75rem; border-color: var(--neon-cyan); color: var(--neon-cyan);">⚙️ โปรไฟล์</a> <a href="logout.php" class="btn-cyber" style="padding: 0.4rem 0.9rem; font-size: 0.75rem; border-color: var(--text-gray);">ออกจากระบบ</a> </div> </div> </nav> <div class="container">
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings