require __DIR__ . '/config.php';
$id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
if (!$id) {
http_response_code(404);
exit('ไม่พบกระทู้');
}
$stmt = $pdo->prepare("
SELECT id, title, description, author, created_at
FROM posts
WHERE id = ?
LIMIT 1
");
$stmt->execute([$id]);
$post = $stmt->fetch();
if (!$post) {
http_response_code(404);
exit('ไม่พบกระทู้');
}
?>
content="width=device-width, initial-scale=1.0">
= e($post['title']) ?> | เว็บบอล
name="description"
content="= e(mb_strimwidth($post['description'], 0, 150, '...', 'UTF-8')) ?>"
>
rel="preconnect"
href="https://fonts.googleapis.com"
>
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin
>
href="https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
>
href="index.php"
class="back"
>
← กลับหน้าห้องสนทนา
= e($post['title']) ?>
ผู้สร้าง:
= e($post['author']) ?>
·
= e($post['created_at']) ?>
= e($post['description']) ?>
href="= e($lineUrl) ?>"
target="_blank"
rel="noopener noreferrer"
class="contact"
>
ติดต่อแอดมิน