Example #1
0
 function contact_type()
 {
     $data['page_name'] = '<b>Training Contact Type</b>';
     $data['msg'] = '';
     $this->load->library('pagination');
     $contact = new Training_contact_type();
     $config['base_url'] = base_url() . 'training_manage/contact_type';
     $config['total_rows'] = $contact->get()->count();
     $config['per_page'] = '15';
     $config['full_tag_open'] = '<p>';
     $config['full_tag_close'] = '</p>';
     $this->pagination->initialize($config);
     // How many related records we want to limit ourselves to
     $limit = $config['per_page'];
     // Set the offset for our paging
     $offset = $this->uri->segment(3);
     $contact->order_by('contact_type');
     $data['rows'] = $contact->get($limit, $offset);
     $data['page'] = $this->uri->segment(3);
     $data['main_content'] = 'contact_type';
     return View::make('includes/template', $data);
 }
Example #2
0
 function training_contact_type_options($training_type = '')
 {
     $this->load->model('training_contact_type');
     $options = array();
     $t = new Training_contact_type();
     $types = $t->order_by('contact_type')->get();
     $options[0] = '---ALL---';
     foreach ($types as $type) {
         $options[$type->id] = $type->contact_type;
     }
     return $options;
 }