public function profile($id) { if ($this->input->post('update_caller')) { $this->helpline_model->update_caller($this->input->post()); $this->session->set_flashdata('helpline', 'The profile has been updated.'); redirect('helpline/profile/' . $id); } $data['reference_agencies'] = get_option_for_dropdown('reference_agencies'); $data['staff'] = get_user_array(); $data['caller'] = $this->helpline_model->get_caller($id); $data['ethnicity'] = $this->config->item('ethnicity'); $data['relationship'] = $this->config->item('relationship'); $data['gender'] = $this->config->item('gender'); $data['education'] = $this->config->item('education'); $this->load->view('helpline/profile', $data); }
public function edit($id) { $data = array(); $data = (array) $this->budget_model->load_budget($id); $data['users'] = $this->users_model->get_all_users_meta(); $data['locations'] = get_option_for_dropdown('locations'); $data['divisions'] = get_option_for_dropdown('divisions'); $data['depts'] = get_option_for_dropdown('depts'); $data['da_accounts'] = get_option('da_accounts'); $data['da_descriptions'] = get_option('da_descriptions'); $data['da_role_required'] = get_option('da_role_required'); $data['settings'] = $this->settings_model->loadAllSettings(); if ($this->input->post('update_budget')) { $this->budget_model->update_budget($this->input->post(), $this->uri->segment(3)); $this->session->set_flashdata('budget', 'The budget has been updated.'); redirect('budget/edit/' . $this->uri->segment(3)); } $this->load->view('budget/edit', $data); }
public function _engagement_program_edit($id) { if ($this->input->post('do_action')) { $this->engagement_program_model->update($this->input->post(), $id); redirect('lasrmetrics/engagement_program/edit/' . $id); } $data = array(); $data = (array) $this->engagement_program_model->fetch($id); $data['staff'] = get_user_array(); $data['locations'] = get_option_for_dropdown('office_locations'); $data['engagement_types'] = get_option_for_dropdown('engagement_types'); $data['counties'] = get_option_for_dropdown('counties'); $this->load->view('lasrmetrics/engagement_program/edit', $data); }
public function _edit($model, $view, $id) { $this->load->model($model); if ($this->input->post('do_action')) { $this->{$model}->update($this->input->post(), $id); redirect('lasrmetrics/' . $view . '/edit/' . $id); } $data = array(); $data = (array) $this->{$model}->fetch($id); $data['staff'] = get_user_array(); $data['locations'] = get_option_for_dropdown('office_locations'); $data['presenter_types'] = get_option_for_dropdown('presenter_types'); $data['program_types'] = get_option_for_dropdown('program_types'); $data['group_types'] = get_option_for_dropdown('group_types'); $data['event_types'] = get_option_for_dropdown('event_types'); $data['education_programs'] = get_option_for_dropdown('education_programs'); $data['target_audiences'] = get_option_for_dropdown('target_audiences'); $data['SPA'] = get_option_for_dropdown('SPA'); $data['grant_programs'] = get_option_for_dropdown('grant_programs'); $data['engagement_types'] = get_option_for_dropdown('engagement_types'); $data['counties'] = get_option_for_dropdown('counties'); $this->load->view('lasrmetrics/' . $view . '/edit', $data); }
function edit($id) { if ($this->input->post('save_reservation')) { $this->calendar_model->update_reservation($id, $this->input->post()); $this->session->set_flashdata('calendar', 'Your reservation has been updated.'); redirect('calendar/edit/' . $id); } $users = $this->users_model->get_all_users(); foreach ($users as $user) { $data['users'][$user->ID] = $user->user_name; } $data['event'] = $this->calendar_model->get_reservation($id); $data['resources'] = get_option_for_dropdown('calendar_resources'); $data['manage'] = array_merge(array($this->user->ID), $this->user->subs); if (!in_array($data['event']->created_by, $data['manage'])) { if (!in_array($data['event']->person_in_charge, $data['manage'])) { if (!can_this_user('calendar/edit/all')) { redirect('cheat'); } } } $this->load->view('calendar/edit', $data); }
public function view($id) { $data['travel_request'] = $this->travel_model->get_travel_request($id); $data['user'] = $this->users_model->get_user($data['travel_request']['details']->user_id); $data['accounts'] = array_merge(array('' => 'Select Account'), $this->labor_model->get_account_list('travel')); $data['users'] = $this->users_model->get_all_users_meta(); $data['manage'] = array_merge(array($this->user->ID), $this->user->subs); $data['locations'] = get_option_for_dropdown('office_locations'); if ($data['travel_request']['details']->user_id != $this->user->ID) { if ($data['travel_request']['details']->manager != $this->user->ID) { if (!can_this_user('travel/edit/all')) { redirect('cheat'); } } } $this->load->view('travel_requests/view', $data); }