load->model('RedirectModel', '', TRUE); } public function index($redirect = null) { if ($redirect == null) { redirect(base_url()); } else { redirect("/r/p/" . $redirect); } } public function p($redirect = null) { if ($redirect != null) { $url = $this->RedirectModel->getUrl($redirect); redirect($url); } if (!$this->hasPermission('redirect.view')) { redirect(base_url()); } $returnMessage = ''; if (isset($_POST['redirectInput']) && !empty($_POST['redirectInput']) && isset($_POST['redirectUrl']) && !empty($_POST['redirectUrl'])) { $feedback = $this->redirect->insertRedirect($_POST['redirectUrl'], $_POST['redirectInput']); if ($feedback['feedback'] == 'success') { $returnMessage = '