本文整理匯總了PHP中MY_Controller::set_pager_style方法的典型用法代碼示例。如果您正苦於以下問題:PHP MY_Controller::set_pager_style方法的具體用法?PHP MY_Controller::set_pager_style怎麽用?PHP MY_Controller::set_pager_style使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MY_Controller
的用法示例。
在下文中一共展示了MY_Controller::set_pager_style方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
function index($offset = 0)
{
//Content
$uri_segment = 3;
$offset = $this->uri->segment($uri_segment);
$query_id = $this->session->userdata('query_id');
$this->input->load_query($query_id);
$code_s = $this->input->get('code_s');
$name_s = $this->input->get('name_s');
$this->data['query'] = $this->questions_model->search($code_s, $name_s, $this->limit, $offset);
$page_config['base_url'] = site_url('questions/index/');
$page_config['total_rows'] = $this->questions_model->count_results($name_s);
$page_config['per_page'] = $this->limit;
$page_config['uri_segment'] = $uri_segment;
$page_config = parent::set_pager_style($page_config);
$this->pagination->initialize($page_config);
$this->data['pagination'] = $this->pagination->create_links();
$this->data['total_rows'] = $page_config['total_rows'];
$this->data['content'] = 'questions_list';
$this->load->view('templates/default', $this->data);
}