From 853d253a7dc0c7de6438310cd94a7ece2da9397c Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 12 Dec 2025 10:34:56 +0500 Subject: feat: store posts in text format --- status/post.php | 84 --------------------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 status/post.php (limited to 'status/post.php') diff --git a/status/post.php b/status/post.php deleted file mode 100644 index 064d86f..0000000 --- a/status/post.php +++ /dev/null @@ -1,84 +0,0 @@ -prepare('INSERT INTO statuses(title, contents) VALUES (?, ?)') - ->execute([$title, $contents]); - - $id = $db->lastInsertId(); - - header("Location: /status/?id=$id"); - exit; -} - -if (isset($_GET['id']) && !empty(trim($_GET['id']))) { - $stmt = $db->prepare('SELECT * FROM statuses WHERE id = ?'); - $stmt->execute([$_GET['id']]); - - $status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; -} else { - $stmt = $db->query('SELECT id, title, posted_at FROM statuses ORDER BY posted_at DESC'); - $statuses = $stmt->fetchAll(PDO::FETCH_ASSOC); -} -?> - - - - - new status - ilt.su - - - - - - - - -
-

ilt.su - statuses

-

post a new status

-
- - - - - - - - - - - - - -
title:
contents:
-
-
- - - \ No newline at end of file -- cgit v1.2.3