Initial commit

This commit is contained in:
Porawit Dongwang
2026-09-16 23:20:08 +07:00
commit 0041668dbb
32577 changed files with 3687927 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
<?php
// admin/header.php
session_start();
require_once __DIR__ . '/../config.php';
require_once __DIR__ . '/../db.php';
// Check auth
$current_page = basename($_SERVER['PHP_SELF']);
if ($current_page !== 'login.php' && empty($_SESSION['admin_logged_in'])) {
header("Location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>P4Q Admin Panel</title>
<link rel="icon" type="image/png" href="../logo.png">
<link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<!-- DataTables -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<!-- Quill.js for Text Editor -->
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<!-- SweetAlert2 -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<style>
body { font-family: 'Sarabun', sans-serif; background-color: #f3f4f6; }
.glass { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3); }
</style>
</head>
<body class="text-gray-800">
<?php if ($current_page !== 'login.php'): ?>
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<aside class="w-64 bg-white shadow-md flex-shrink-0">
<div class="p-6 text-center">
<img src="../logo.png" alt="Logo" class="h-16 mx-auto mb-2" onerror="this.src='https://via.placeholder.com/64'">
<h1 class="text-xl font-bold text-green-700">P4Q Admin</h1>
</div>
<nav class="mt-6">
<a href="index.php" class="block px-6 py-3 hover:bg-gray-100 <?= $current_page == 'index.php' ? 'bg-gray-100 font-semibold' : '' ?>">ภาพรวมระบบ (Dashboard)</a>
<a href="meetings.php" class="block px-6 py-3 hover:bg-gray-100 <?= $current_page == 'meetings.php' ? 'bg-gray-100 font-semibold' : '' ?>">บันทึกการประชุม</a>
<a href="competitions.php" class="block px-6 py-3 hover:bg-gray-100 <?= $current_page == 'competitions.php' ? 'bg-gray-100 font-semibold' : '' ?>">ผลงานประกวด</a>
<a href="settings.php" class="block px-6 py-3 hover:bg-gray-100 <?= $current_page == 'settings.php' ? 'bg-gray-100 font-semibold' : '' ?>">ตั้งค่า Google Drive</a>
<a href="logs.php" class="block px-6 py-3 hover:bg-gray-100 <?= $current_page == 'logs.php' ? 'bg-gray-100 font-semibold' : '' ?>">ประวัติการทำงาน</a>
<a href="dummy.php" class="block px-6 py-3 hover:bg-gray-100 text-yellow-600 <?= $current_page == 'dummy.php' ? 'bg-gray-100 font-semibold' : '' ?>">จัดการข้อมูลตัวอย่าง</a>
<a href="logout.php" class="block px-6 py-3 hover:bg-gray-100 text-red-600">ออกจากระบบ</a>
</nav>
</aside>
<!-- Main Content -->
<div class="flex-1 overflow-y-auto p-8">
<div class="max-w-6xl mx-auto">
<?php endif; ?>