daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Feb 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function meals()
  2.     {
  3.         if ($this->session->userdata('librarian_login') != 1)
  4.             redirect(base_url(), 'refresh');
  5.  
  6.         $page_data['page_name']  = 'meals';
  7.         $page_data['page_title'] = 'Cadápio Ativo';
  8.         $this->load->view('backend/index', $page_data);
  9.     }
  10.  
  11.     function print_meal($meal)
  12.     {
  13.       $page_data['system_name'] = $this->db->get_where('settings', array('type' => 'system_name'))->row()->description;
  14.       $page_data['meal_id'] = $meal;
  15.       $this->load->view('backend/librarian/print_meal', $page_data);
  16.     }
  17.    
  18.     function meals_view()
  19.     {
  20.         if ($this->session->userdata('librarian_login') != 1)
  21.             redirect(base_url(), 'refresh');
  22.  
  23.         $page_data['page_name']  = 'meals_view';
  24.         $page_data['page_title'] = 'Histórico dos Cardápios';
  25.         $this->load->view('backend/index', $page_data);
  26.     }
  27.  
  28.     function add_meal($publish) {
  29.       if ($this->session->userdata('librarian_login') != 1)
  30.         redirect('login', 'refresh');
  31.  
  32.       $data['start_at'] = $_POST['start_at'];
  33.       $data['end_at'] = $_POST['end_at'];
  34.       $data['morning_monday'] = $_POST['morning_monday'];
  35.       $data['morning_tuesday'] = $_POST['morning_tuesday'];
  36.       $data['morning_wednesday'] = $_POST['morning_wednesday'];
  37.       $data['morning_thursday'] = $_POST['morning_thursday'];
  38.       $data['morning_friday'] = $_POST['morning_friday'];
  39.       $data['lunch_monday'] = $_POST['lunch_monday'];
  40.       $data['lunch_tuesday'] = $_POST['lunch_tuesday'];
  41.       $data['lunch_wednesday'] = $_POST['lunch_wednesday'];
  42.       $data['lunch_thursday'] = $_POST['lunch_thursday'];
  43.       $data['lunch_friday'] = $_POST['lunch_friday'];
  44.       $data['afternoon_monday'] = $_POST['afternoon_monday'];
  45.       $data['afternoon_tuesday'] = $_POST['afternoon_tuesday'];
  46.       $data['afternoon_wednesday'] = $_POST['afternoon_wednesday'];
  47.       $data['afternoon_thursday'] = $_POST['afternoon_thursday'];
  48.       $data['afternoon_friday'] = $_POST['afternoon_friday'];
  49.       $data['dinner_monday'] = $_POST['dinner_monday'];
  50.       $data['dinner_tuesday'] = $_POST['dinner_tuesday'];  
  51.       $data['dinner_wednesday'] = $_POST['dinner_wednesday'];  
  52.       $data['dinner_thursday'] = $_POST['dinner_thursday'];
  53.       $data['dinner_friday'] = $_POST['dinner_friday'];
  54.       $data['publish'] = $_POST['publish'];
  55.       $data['observation'] = $_POST['observation'];
  56.  
  57.       $this->db->insert('meals', $data);
  58.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top