diff options
author | Freya Murphy <freya@freyacat.org> | 2024-04-03 11:25:57 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-04-03 11:25:57 -0400 |
commit | 740df2706934231a91c5e2d5061198ea962c357c (patch) | |
tree | b3de8027238850d43c6841f834a88e75ba90ce75 /src/web/_controller/apps | |
parent | finish profile directory (mostly) (diff) | |
download | xssbook2-740df2706934231a91c5e2d5061198ea962c357c.tar.gz xssbook2-740df2706934231a91c5e2d5061198ea962c357c.tar.bz2 xssbook2-740df2706934231a91c5e2d5061198ea962c357c.zip |
profile page
Diffstat (limited to 'src/web/_controller/apps')
-rw-r--r-- | src/web/_controller/apps/profile.php | 35 |
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); + } + +} + +?> |