blob: aaed34828952045e0c7b0ec645fa9bab85464eca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
}
}
?>
|