From 7e2553646c27cae8baaca1cc5c13d980661b5d90 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 2 Apr 2024 18:13:02 -0400 Subject: finish profile directory (mostly) --- src/web/_controller/apps/people.php | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/web/_controller/apps/people.php (limited to 'src/web/_controller/apps/people.php') diff --git a/src/web/_controller/apps/people.php b/src/web/_controller/apps/people.php new file mode 100644 index 0000000..19910ac --- /dev/null +++ b/src/web/_controller/apps/people.php @@ -0,0 +1,41 @@ +people_model = $this->load->model('apps/people'); + $this->format_model = $this->load->model('format'); + } + + public function index(): void { + parent::index(); + $data = $this->people_model->get_data(); + $this->view('header', $data); + $this->view('apps/people/main', $data); + $this->view('footer', $data); + } + + /** + * @return array + */ + public function people(): array { + $data = $this->people_model->get_users(); + + $this->view('apps/people/people', $data); + + $max = 0; + foreach ($data['users'] as $user) { + $max = max($max, $user['id']); + } + + return $data; + } +} + +?> -- cgit v1.2.3-freya