56 lines
4.0 KiB
PHP
56 lines
4.0 KiB
PHP
<?php
|
|
require_once 'header.php';
|
|
|
|
$total_meetings = $pdo ? $pdo->query("SELECT COUNT(*) FROM meeting_minutes")->fetchColumn() : 0;
|
|
$total_competitions = $pdo ? $pdo->query("SELECT COUNT(*) FROM competitions")->fetchColumn() : 0;
|
|
$total_logs = $pdo ? $pdo->query("SELECT COUNT(*) FROM activity_logs")->fetchColumn() : 0;
|
|
?>
|
|
|
|
<div class="mb-8">
|
|
<h1 class="text-3xl font-bold text-gray-900">ภาพรวมระบบ (Dashboard)</h1>
|
|
<p class="text-gray-600 mt-2">ยินดีต้อนรับเข้าสู่ระบบจัดการข้อมูล P4Q</p>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex items-center space-x-4">
|
|
<div class="p-3 bg-blue-100 text-blue-600 rounded-full">
|
|
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"></path></svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm text-gray-500 font-medium">บันทึกการประชุมทั้งหมด</p>
|
|
<p class="text-2xl font-bold text-gray-900"><?= number_format((float)$total_meetings) ?> รายการ</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex items-center space-x-4">
|
|
<div class="p-3 bg-green-100 text-green-600 rounded-full">
|
|
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"></path></svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm text-gray-500 font-medium">ผลงานประกวดทั้งหมด</p>
|
|
<p class="text-2xl font-bold text-gray-900"><?= number_format((float)$total_competitions) ?> รายการ</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex items-center space-x-4">
|
|
<div class="p-3 bg-purple-100 text-purple-600 rounded-full">
|
|
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm text-gray-500 font-medium">ประวัติการทำงาน</p>
|
|
<p class="text-2xl font-bold text-gray-900"><?= number_format((float)$total_logs) ?> รายการ</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
|
|
<h2 class="text-lg font-bold text-gray-800 mb-4">ข้อมูลเบื้องต้น</h2>
|
|
<ul class="list-disc pl-5 space-y-2 text-gray-600">
|
|
<li>เพื่อความปลอดภัย รหัสผ่านหลังบ้านจะถูกกำหนดไว้ในไฟล์ <code>config.php</code></li>
|
|
<li>ไฟล์ที่อัปโหลดจะถูกส่งไปยัง Google Drive ตาม Folder ID ที่ตั้งค่าไว้ในเมนู <a href="settings.php" class="text-blue-500 underline">ตั้งค่า Google Drive</a></li>
|
|
<li>หากมีการลบข้อมูล ไฟล์ใน Google Drive ก็จะถูกลบออกด้วย</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<?php require_once 'footer.php'; ?>
|