summaryrefslogtreecommitdiff
path: root/src/web/_controller/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/_controller/apps')
-rw-r--r--src/web/_controller/apps/profile.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/web/_controller/apps/profile.php b/src/web/_controller/apps/profile.php
new file mode 100644
index 0000000..aaed348
--- /dev/null
+++ b/src/web/_controller/apps/profile.php
@@ -0,0 +1,35 @@
+<?php /* Copyright (c) 2024 Freya Murphy */
+class Profile_controller extends Controller {
+
+ // the home model
+ private $profile_model;
+
+ // the format model
+ protected $format_model;
+
+ // the post model
+ protected $post_controller;
+
+ function __construct($load) {
+ parent::__construct($load);
+ $this->profile_model = $this->load->model('apps/profile');
+ $this->format_model = $this->load->model('format');
+ $this->post_controller = $this->load->controller('_util/post');
+ }
+
+ public function index(): void {
+ parent::index();
+ $data = $this->profile_model->get_data();
+
+ if (!$data) {
+ $this->error(404);
+ }
+
+ $this->view('header', $data);
+ $this->view('apps/profile/main', $data);
+ $this->view('footer', $data);
+ }
+
+}
+
+?>