Beispiel #1
0
 /**
  * Access to the functionnality to manage an event.
  * Redirect to welcome page if not logged in.
  * Only the organizer can modifiy the event
  * params :
  *    id : id of the event to display in the managing forms
  */
 function management($id)
 {
     if ($this->session->userdata('logged_in')) {
         $info_event = $this->event->get_details($id);
         if ($info_event['event']->organizer == $this->session->userdata('logged_in')['id']) {
             $data['title'] = 'Modifier l\\évènement';
             $data['nb_notifications'] = $this->user->count_unread_message($this->session->userdata('logged_in')['id']);
             $info_event['regions'] = get_region_scrollbox_with_selected($info_event['event']->region);
             $this->load->helper(array('form'));
             $this->load->view('templates/header_logged_in', $data);
             $this->load->view('pages/manage_event_view', $info_event);
             $this->load->view('templates/footer');
         } else {
             redirect('home', 'refresh');
         }
         //if user is not logged in : redirection to welcome page
     } else {
         redirect('welcome', 'refresh');
     }
 }
Beispiel #2
0
 /**
  * return : a display scrollbox of the available regions
  */
 function get_region_scrollbox()
 {
     return get_region_scrollbox_with_selected("");
 }