Пример #1
0
 function index($offset = 0)
 {
     $params = $this->session->userdata('employee_search_data') ? $this->session->userdata('employee_search_data') : array('offset' => 0, 'order_col' => 'last_name', 'order_dir' => 'asc', 'search' => FALSE);
     if ($offset != $params['offset']) {
         redirect('employees/index/' . $params['offset']);
     }
     $this->check_action_permission('search');
     $config['base_url'] = site_url('employees/sorting');
     $config['per_page'] = $this->config->item('number_of_items_per_page') ? (int) $this->config->item('number_of_items_per_page') : 20;
     $data['controller_name'] = strtolower(get_class());
     $data['per_page'] = $config['per_page'];
     $data['search'] = $params['search'] ? $params['search'] : "";
     if ($data['search']) {
         $config['total_rows'] = $this->Employee->search_count_all($data['search']);
         $table_data = $this->Employee->search($data['search'], $data['per_page'], $params['offset'], $params['order_col'], $params['order_dir']);
     } else {
         $config['total_rows'] = $this->Employee->count_all();
         $table_data = $this->Employee->get_all($data['per_page'], $params['offset'], $params['order_col'], $params['order_dir']);
     }
     $data['total_rows'] = $config['total_rows'];
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['order_col'] = $params['order_col'];
     $data['order_dir'] = $params['order_dir'];
     $data['manage_table'] = get_people_manage_table($table_data, $this);
     $this->load->view('people/manage', $data);
 }
Пример #2
0
 function index()
 {
     $data['controller_name'] = strtolower($this->uri->segment(1));
     $data['form_width'] = $this->get_form_width();
     $data['manage_table'] = get_people_manage_table($this->Employee->get_all(), $this);
     $this->load->view('people/manage', $data);
 }
Пример #3
0
 function index($limit_from = 0)
 {
     $data['controller_name'] = $this->get_controller_name();
     $data['form_width'] = $this->get_form_width();
     $lines_per_page = $this->Appconfig->get('lines_per_page');
     $suppliers = $this->Employee->get_all($lines_per_page, $limit_from);
     $data['links'] = $this->_initialize_pagination($this->Employee, $lines_per_page, $limit_from);
     $data['manage_table'] = get_people_manage_table($suppliers, $this);
     $this->load->view('suppliers/manage', $data);
 }
Пример #4
0
 function index($limit_from = 0)
 {
     $data['controller_name'] = $this->get_controller_name();
     $data['form_width'] = $this->get_form_width();
     $lines_per_page = $this->Appconfig->get('lines_per_page');
     $customers = $this->Customer->get_all($lines_per_page, $limit_from);
     $data['links'] = $this->_initialize_pagination($this->Customer, $lines_per_page, $limit_from);
     $data['manage_table'] = get_people_manage_table($customers, $this);
     $data['am'] = 'customers';
     $this->load->view('people/manage', $data);
 }
 function index()
 {
     $config['base_url'] = site_url('?c=customers&m=index');
     $config['total_rows'] = $this->Customer->count_all();
     $config['per_page'] = '20';
     $this->pagination->initialize($config);
     $data['controller_name'] = strtolower(get_class());
     $data['form_width'] = $this->get_form_width();
     $data['manage_table'] = get_people_manage_table($this->Customer->get_all($config['per_page'], $this->input->get('per_page')), $this);
     $this->load->view('people/manage', $data);
 }
Пример #6
0
 function index()
 {
     $data['mailchimp'] = $this->config->item('mc_api_key') != null;
     $data['controller_name'] = strtolower(get_class());
     $config['base_url'] = site_url('?c=employees&m=index');
     $config['total_rows'] = $this->Employee->count_all();
     $config['per_page'] = '20';
     $this->pagination->initialize($config);
     $data['form_width'] = $this->get_form_width();
     $data['manage_table'] = get_people_manage_table($this->Employee->get_all($config['per_page'], $this->input->get('per_page')), $this);
     $this->load->view('people/manage', $data);
 }
Пример #7
0
 function index()
 {
     $config['base_url'] = site_url('/employees/index');
     $config['total_rows'] = $this->Employee->count_all();
     $config['per_page'] = '20';
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['controller_name'] = strtolower(get_class());
     $data['form_width'] = $this->get_form_width();
     $data['manage_table'] = get_people_manage_table($this->Employee->get_all($config['per_page'], $this->uri->segment($config['uri_segment'])), $this);
     $this->load->view('people/manage', $data);
 }