33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Bkoadmin extends Admin_Controller {
|
|
|
|
public function index() {
|
|
|
|
$this->load->helper('url');
|
|
$data = array();
|
|
|
|
$this->load->library('table');
|
|
$this->table->set_template($this->template);
|
|
|
|
$mysql = "SELECT '<a href=\"#\" onclick=\"viewUser('||id||');\"><button type=\"button\" class=\"btn btn-warning\"><i class=\"fa fa-check-circle\"></i>View</button></a>' AS View"
|
|
. ",username,firstname, lastname,email,status,added FROM bko_users ORDER BY username LIMIT 15";
|
|
|
|
$data['users_list'] = "";
|
|
$query = $this->db->query($mysql);
|
|
$this->table->set_heading(array('data' => 'View', 'style' => 'width:50px'), 'Username', 'Firstname', 'Lastname', 'Email', 'Status', 'Added');
|
|
$data['users_list'] = $this->table->generate($query);
|
|
|
|
$data['page_title'] = "Back Offfice Users";
|
|
|
|
$this->renderBkoadminPage('view_users', $data);
|
|
}
|
|
|
|
public function viewUser(){
|
|
echo "Yes - we will maintain the user";
|
|
}
|
|
|
|
}
|