query("SELECT * FROM meet_requests ORDER BY id DESC"); while ($row = $stmt->fetch()) { echo ""; echo ""; echo ""; $time_str_booking = date('H:i', strtotime($row['start_time'])) . " - " . date('H:i', strtotime($row['end_time'])); echo ""; echo ""; echo ""; echo ""; echo ""; } } catch (PDOException $e) { echo ""; } ?>
วัน-เวลาที่ขอ ชื่อเรื่อง วัน-เวลาที่จอง ผู้ขอ Link/QR Code จัดการ
" . format_thai_date($row['created_at'], true) . "" . htmlspecialchars($row['topic']) . " " . format_thai_date($row['meet_date']) . " " . $time_str_booking . " " . htmlspecialchars($row['created_by']) . ""; 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 "
"; $is_owner = ($row['created_by'] === ($_SESSION['fullname'] ?? '')); $can_manage = (($_SESSION['role'] ?? '') === 'superadmin' || $is_owner); if ($can_manage) { echo "
"; echo ""; echo ""; echo "
"; } else { echo "-"; } echo "
Error: " . $e->getMessage() . "