From ba6edc6d6ba57c72d28f36e953006f1a1688a50e Mon Sep 17 00:00:00 2001 From: pbbfa23ckl Date: Mon, 16 Jun 2025 10:59:15 +0200 Subject: [PATCH] added userform --- Controller/UserController.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Controller/UserController.php diff --git a/Controller/UserController.php b/Controller/UserController.php new file mode 100644 index 0000000..3194e3b --- /dev/null +++ b/Controller/UserController.php @@ -0,0 +1,29 @@ +notesModel = new NotesModel(); + $this->view = $view; + } + + public function showNotes() + { + $sortBy = $_GET['sort_by'] ?? 'updated_at'; + $sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC'); + + $this->view->setVars([ + "notes" => $this->notesModel->selectNotesForUser(2, $sortBy, $sortOrder) //$_SESSION['user_id'] + ]); + } + +} \ No newline at end of file