From dd3a9027d5330f8d55b4a8dafa34971fb1bf4007 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 12 Feb 2024 13:00:15 +0900 Subject: [PATCH] =?UTF-8?q?DAO=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daos/thread.php | 9 +++++++++ import.php | 7 +++++++ www/index.php | 9 +++++---- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 import.php diff --git a/daos/thread.php b/daos/thread.php index ee291f0..bf4b0fa 100644 --- a/daos/thread.php +++ b/daos/thread.php @@ -51,6 +51,15 @@ Thread } + public static function + find ( + int $id) + : \Dto\Thread + { + ; + } + + public static function create_thread ( SQLite3 $db, diff --git a/import.php b/import.php new file mode 100644 index 0000000..7fcc6d4 --- /dev/null +++ b/import.php @@ -0,0 +1,7 @@ + title; $explain = $row -> explain; @@ -38,13 +39,13 @@ if (isset ($_GET['id'])) { if (($_GET['evaluate'] ?? '') === 'good') { - Dao\Response :: like ((int) $_GET['id']); + \Dao\Response :: like ((int) $_GET['id']); header ("Location: ./?thread=$thread&sort=$sort"); } if (($_GET['evaluate'] ?? '') === 'bad') { - Dao\Response :: dislike ((int) $_GET['id']); + \Dao\Response :: dislike ((int) $_GET['id']); header ("Location: ./?thread=$thread&sort=$sort"); } }