function edit($ticketstage_id) { if ($this->security_model->own_ticketstage($ticketstage_id) && $this->perm_user->tickettype->update) { $data['ticketstage'] = $this->ticketstage_model->select_single($ticketstage_id); $data['ticket_category_dropdown'] = dropdown_generic('ticket_category', $data['ticketstage']['ticket_category_id'], 'ticket_category_id'); $this->load->view('ticketstage/xhr_edit', $data); } else { $data['error'] = $this->lang->line('error_edit_ticketstage'); $this->load->view('xhr_error', $data); } }
function add() { if ($this->perm_user->user->create) { $this->load->model("company_model"); $data['company'] = $this->company_model->select_single($this->session->userdata('company_id')); $data['rand_pass'] = $this->rm_user->generate_pass(); $data['usergroup_dropdown'] = dropdown_generic('usergroup', 0, 'usergroup_id', 'company_id'); if ($data['company']['user_count'] <= $data['company']['service']['pref_max_user']) { $this->load->view('user/xhr_add', $data); } else { $this->load->view('user/xhr_add_upgrade_first', $data); } } else { $data['error'] = $this->lang->line('error_low_perm'); $this->load->view('xhr_error', $data); } }
function edit($segment_id) { if ($this->security_model->own_segment($segment_id) && $this->perm_user->segment->update) { $this->load->model('ticket_model'); $data['tickets'] = $this->ticket_model->select_relevant($this->session->userdata('company_id'), $this->session->userdata('id'), $this->session->userdata('usergroup_id')); $data['segment'] = $this->segment_model->select_single($segment_id); $data['project_dropdown'] = dropdown_generic('project', $data['segment']['project_id'], 'project_id'); $data['worktype_dropdown'] = dropdown_generic('worktype', $data['segment']['worktype_id'], 'worktype_id'); $temp = explode(':', $data['segment']['time_start']); $start_hour = $temp[0]; $start_minute = $temp[1]; $temp = explode(':', $data['segment']['time_end']); $end_hour = $temp[0]; $end_minute = $temp[1]; $data['time_start_dropdown'] = dropdown_time('time_start_hour', 'time_start_minute', $start_hour, $start_minute); $data['time_end_dropdown'] = dropdown_time('time_end_hour', 'time_end_minute', $end_hour, $end_minute); $this->load->view('segment/xhr_edit', $data); } else { $data['error'] = $this->lang->line('error_edit_segment'); $this->load->view('xhr_error', $data); } }
function edit($project_id) { if ($this->security_model->own_project($project_id) && $this->perm_user->project->update) { $data['project'] = $this->project_model->select_single($project_id); $data['client_dropdown'] = dropdown_generic('client', $data['project']['client_id'], 'client_id'); $this->load->view('project/xhr_edit', $data); } else { $data['error'] = $this->lang->line('error_update_project'); $this->load->view('xhr_error', $data); } }
function add() { if ($this->perm_user->ticket->create) { $data['project_dropdown'] = dropdown_generic('project', 0, 'project_id', 'company_id', 0, 'id', 'name', array('active' => 1)); $data['user_dropdown'] = dropdown_generic('user', 0, 'assigned_user_id', 'company_id', 0, 'id', 'name', array('active' => 1)); $data['usergroup_dropdown'] = dropdown_generic('usergroup', 0, 'assigned_usergroup_id'); $data['ticket_category_dropdown'] = dropdown_generic('ticket_category', 0, 'ticket_category_id'); $this->load->view('ticket/xhr_add', $data); } else { $data['error'] = $this->lang->line('error_low_perm'); $this->load->view('xhr_error', $data); } }
function edit($expense_id) { if ($this->security_model->own_expense($expense_id) && $this->perm_user->expense->update) { $data['expense'] = $this->expense_model->select_single($expense_id); $data['project_dropdown'] = dropdown_generic('project', $data['expense']['project_id'], 'project_id'); $data['expensetype_dropdown'] = dropdown_generic('expensetype', $data['expense']['expensetype_id'], 'expensetype_id'); $this->load->view('expense/xhr_edit', $data); } else { $data['error'] = $this->lang->line('error_edit_expense'); $this->load->view('xhr_error', $data); } }