/** * Access to the functionnality to create an event. * Redirect to welcome page if not logged in. */ function creation() { if ($this->session->userdata('logged_in')) { $data['title'] = 'Créer évènement'; $data['nb_notifications'] = $this->user->count_unread_message($this->session->userdata('logged_in')['id']); $data['regions'] = get_region_scrollbox(); $this->load->helper(array('form')); $this->load->view('templates/header_logged_in', $data); $this->load->view('pages/create_event_view'); $this->load->view('templates/footer'); //if user is not logged in : redirection to welcome page } else { redirect('welcome', 'refresh'); } }
/** * Access to the functionnality to create a user (sign in). * Redirect to welcome page if not logged in. */ function creation() { //if user is logged in : redirection to home page if ($this->session->userdata('logged_in')) { redirect('home', 'refresh'); //else propose siging in form } else { $data['title'] = 'Inscription'; $data['regions'] = get_region_scrollbox(); $this->load->helper(array('form')); $this->load->view('templates/header_logged_out', $data); $this->load->view('pages/create_user_view'); $this->load->view('templates/footer'); } }