error_model = $this->load_model('error'); } public function index(): void { $this->code(404); } public function code($code): void { parent::index(); $code = intval($code); if ($code == 404 && rand(0, 100) > 95) $code = 451; if (!is_valid_status_code($code)) $code = 404; $msg = status_code_msg($code); $data = $this->error_model->get_data(); $data['title'] = $code; $data['msg'] = $msg; $this->view('header', $data); $this->view('error/main', $data); $this->view('footer', $data); } } ?>