public function view_task($offset = 0) { //current number of items to display on the page $items_per_page = 15; //gets the total number of tasks from the shipments table $number_of_tasks = Shipments::getTotalNumber(); $tasks = Shipments::get_tasks($offset, $items_per_page); //$task_id = $tasks->task_id; if ($number_of_tasks > $items_per_page) { $config['base_url'] = base_url() . "task_management/view_task/"; $config['total_rows'] = $number_of_tasks; $config['per_page'] = $items_per_page; $config['uri_segment'] = 3; $config['num_links'] = 5; $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); } $data['tasks'] = $tasks; $data['title'] = "Task Management::View All Tasks"; $data['module_view'] = "edit_task_view"; $data['scripts'] = array("jquery-ui.js", "tab.js"); $data['styles'] = array("jquery-ui.css", "tab.css"); $data['content_view'] = "task_view"; $data['quick_link'] = "edit_task"; //$data['link'] = "system_administration"; $this->load->view('template', $data); }