ตารางห้องประชุม (Requests)
จัดการรายการขอใช้งานและสร้างลิงก์ Google Meet
| วัน-เวลาที่ขอ | ชื่อเรื่อง | วัน-เวลาที่จอง | ผู้ขอ | Link/QR Code | จัดการ | |
|---|---|---|---|---|---|---|
| " . format_thai_date($row['created_at'], true) . " | "; echo "" . htmlspecialchars($row['topic']) . " | "; $time_str_booking = date('H:i', strtotime($row['start_time'])) . " - " . date('H:i', strtotime($row['end_time'])); echo "" . format_thai_date($row['meet_date']) . " " . $time_str_booking . " | "; echo "" . htmlspecialchars($row['created_by']) . " | "; echo "";
if (!empty($row['meet_link'])) {
$link = htmlspecialchars($row['meet_link']);
// Generate full text for copying
$thai_months_full = [
1 => 'มกราคม', 2 => 'กุมภาพันธ์', 3 => 'มีนาคม', 4 => 'เมษายน', 5 => 'พฤษภาคม', 6 => 'มิถุนายน',
7 => 'กรกฎาคม', 8 => 'สิงหาคม', 9 => 'กันยายน', 10 => 'ตุลาคม', 11 => 'พฤศจิกายน', 12 => 'ธันวาคม'
];
$ts = strtotime($row['meet_date']);
$full_date = date('j', $ts) . ' ' . $thai_months_full[(int)date('n', $ts)] . ' ' . (date('Y', $ts) + 543);
$time_str = date('H:i', strtotime($row['start_time'])) . ' – ' . date('H:i', strtotime($row['end_time']));
$copy_text = "เรื่อง : " . $row['topic'] . "\nวันที่ : " . $full_date . "\nเวลา : " . $time_str . "\nลิงค์ประชุม : " . $row['meet_link'];
echo " ";
echo "";
echo "";
echo " ";
} else {
echo "ไม่มีลิงก์";
}
echo " | ";
echo ""; $is_owner = ($row['created_by'] === ($_SESSION['fullname'] ?? '')); $can_manage = (($_SESSION['role'] ?? '') === 'superadmin' || $is_owner); if ($can_manage) { echo ""; } else { echo "-"; } echo " | "; echo "|
| Error: " . $e->getMessage() . " | ||||||