From 5a2ba9c2e7605bb788bc406184547d22c6436867 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Dec 2024 11:13:27 -0500 Subject: v2.1.0, refactor w/ crimson --- src/web/_controller/settings.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/web/_controller/settings.php (limited to 'src/web/_controller/settings.php') diff --git a/src/web/_controller/settings.php b/src/web/_controller/settings.php new file mode 100644 index 0000000..e42389f --- /dev/null +++ b/src/web/_controller/settings.php @@ -0,0 +1,34 @@ +settings_model = $this->load_model('settings'); + $this->auth_model = $this->load_model('auth'); + $this->load_lang('auth', 'settings'); + } + + public function index(): void { + if (!$this->auth_model->session()) + $this->redirect('/auth/login'); + + parent::index(); + $data = $this->settings_model->get_data(); + + if (!$data) + $this->error(404); + + $this->view('header', $data); + $this->view('settings/main', $data); + $this->view('footer', $data); + } + +} + +?> -- cgit v1.2.3-freya