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) { var_dump($redirect); if($redirect == null) { if(isset($_SESSION['user']) && $_SESSION['user']['rank'] >= 9) { $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 = '