function init_pagination2($uri, $total_rows, $per_page = 10, $segment = 4){
$ci =& get_instance();
$config['per_page'] = $per_page;
$config['uri_segment'] = $segment;
$config['base_url'] = base_url().$uri;
$config['total_rows'] = $total_rows;
$config['use_page_numbers'] = TRUE;
$config['prev_link'] = '';
$config['next_link'] = '';
$config['last_link'] = '';
$config['first_link'] = '';
$config['full_tag_open'] = '<div class="btn-group" role="group" aria-label="First group">';
$config['full_tag_close'] = '</div>';
$config['first_tag_open'] = '<li class="btn btn-outline-secondary pagi_first">';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li class="btn btn-outline-secondary pagi_last">';
$config['last_tag_close'] = '</span></li>';
$config['prev_tag_open'] = '<li class="btn btn-outline-secondary pagi_prev">';
$config['prev_tag_close'] = '</li>';
$config['next_tag_open'] = '<li class="btn btn-outline-secondary pagi_next">';
$config['next_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li class="btn btn-outline-secondary active">';
$config['cur_tag_close'] = '</li>';
$config['num_tag_open'] = '<li class="btn btn-outline-secondary">';
$config['num_tag_close'] = '</li>';
$ci->pagination->initialize($config);
return $config;
}
No comments:
Post a Comment