From eff90cea50a7d92931f3a5a7abc1af7f7ce71c21 Mon Sep 17 00:00:00 2001 From: Olusesan Ameye Date: Wed, 17 Feb 2021 13:52:04 -0500 Subject: [PATCH] fix --- adminwww/application/controllers/Bkoadmin.php | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 adminwww/application/controllers/Bkoadmin.php diff --git a/adminwww/application/controllers/Bkoadmin.php b/adminwww/application/controllers/Bkoadmin.php new file mode 100644 index 0000000..4a42d10 --- /dev/null +++ b/adminwww/application/controllers/Bkoadmin.php @@ -0,0 +1,103 @@ + "", + 'thead_open' => '', + 'thead_close' => '', + 'heading_row_start' => '', + 'heading_row_end' => '', + 'heading_cell_start' => '', + 'tbody_open' => '', + 'tbody_close' => '', + 'row_start' => '', + 'row_end' => '', + 'cell_start' => '', + 'row_alt_start' => '', + 'row_alt_end' => '', + 'cell_alt_start' => '', + 'table_close' => '
', + 'heading_cell_end' => '
', + 'cell_end' => '
', + 'cell_alt_end' => '
', + ); + + public function index() { + + $this->load->helper('url'); + $data = array(); + + $this->load->library('table'); + $this->table->set_template($this->template); + + $data['recent_members'] = ""; + $mysql = "SELECT id,username,firstname,lastname,added::date,loc,last_login,acc_link FROM members ORDER by id DESC LIMIT 15"; + $query = $this->db->query($mysql); + //$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px')); + $data['recent_members'] = $this->table->generate($query); + + + $mysql="SELECT '' AS View,name,username,email,added,last_login from practice ORDER BY id DESC LIMIT 7"; + $data['recent_practice'] = ""; + $query = $this->db->query($mysql); + //$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px')); + $data['recent_practice'] = $this->table->generate($query); + + $mysql="SELECT '' AS process, + '' AS semail, + status, + practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 7"; + $data['pending_practice'] = ""; + $query = $this->db->query($mysql); + //$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px')); + $data['pending_practice'] = $this->table->generate($query); + + + $this->renderAdminPage('view_dash', $data); + + } + + + public function pendingpractice(){ + + $data = array(); + $data["page_title"] = "Pending Practice"; + + $this->load->library('table'); + $this->table->set_template($this->template); + $mysql="SELECT '' AS process, + '' AS semail, + status, + practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 20"; + $data['pending_practice'] = ""; + $query = $this->db->query($mysql); + //$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px')); + $data['pending_practice'] = $this->table->generate($query); + $this->renderAdminPage('view_pendingpractice', $data); + } + + public function pendingusers(){ + $data = array(); + $data["page_title"] = "Pending Members"; + $this->load->library('table'); + $this->table->set_template($this->template); + $data['recent_members'] = ""; + $mysql = "SELECT id,username,firstname,lastname,added::date,loc,last_login,acc_link FROM members ORDER by id DESC LIMIT 15"; + $query = $this->db->query($mysql); + //$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px')); + $data['recent_members'] = $this->table->generate($query); + $this->renderAdminPage('view_pendingusers', $data); + + } + + + protected function renderAdminPage($page_name, $data) { + $this->load->view('template/secure_header', $data); + $this->load->view('admin/' . $page_name, $data); + $this->load->view('template/secure_footer', $data); + } + +}