This commit is contained in:
2022-06-14 07:21:52 -04:00
parent 3b21cee578
commit f58c2a8c57
3 changed files with 31 additions and 73 deletions
+1 -32
View File
@@ -51,8 +51,6 @@ class Refer extends Users_Controller {
}
$this->load->library('pagination');
$config = array();
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
. "(CASE WHEN status=1 THEN 'Pending' WHEN status=5 THEN 'Completed' ElSE '' END) As status "
@@ -60,31 +58,9 @@ class Refer extends Users_Controller {
. "WHERE member_id =" . $_SESSION['member_id'];
$query = $this->db->query($mysql);
$config["total_rows"] = $query->num_rows();
$config["base_url"] = base_url() . "/refer/refpage";
$config["per_page"] = 5;
$config["uri_segment"] = 3;
$config["num_links"] = 5;
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = '<li class="page-item">';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='page-item active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = '<li class="page-item">';
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = '<li class="page-item">';
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = '<li class="page-item">';
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = '<li class="page-item">';
$config['last_tagl_close'] = "</li>";
$config =$this->paginationConfig(3,5,$query->num_rows(),"/refer/refpage",5);
$this->pagination->initialize($config);
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$page = is_numeric($page) ? $page : 0;
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
@@ -96,18 +72,11 @@ class Refer extends Users_Controller {
$this->load->library('table');
$this->table->set_template($this->template);
$data["links"] = $this->pagination->create_links();
$this->table->set_heading(array('data' => 'Added/Name', 'style' => 'width:170px'), 'Email', array('data' => 'Status', 'style' => 'width:80px'));
$data['refer_table'] = $this->table->generate($query);
$data['refer_table_result'] =$query->result();
$data['page_title'] ="Refer a Friend";
/*
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_refer', $data);
$this->load->view('users/view_footer_user', $data);
*/
$this->RenderUserPage('users/view_refer', $data);
}