diff --git a/application/controllers/Bkocards.php b/application/controllers/Bkocards.php new file mode 100644 index 0000000..1d75f3c --- /dev/null +++ b/application/controllers/Bkocards.php @@ -0,0 +1,47 @@ +PrepPagination(10, 3, '/bkouser/jobs'); + + $mysql0 = "SELECT * FROM members_card_request ORDER BY id DESC"; + $q = $this->db->query($mysql0); + $config["total_rows"] = $q->num_rows(); + + $this->load->library('pagination'); + $this->pagination->initialize($config); + $data["pagination_links"] = $this->pagination->create_links(); + + $this->load->library('table'); + $this->table->set_template($this->template); + + $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0; + $page = is_numeric($page) ? $page : 0; + + //$mysql = "SELECT * FROM members_card_request"; + $mysql = "SELECT cr.member_uid ||'
'||m.firstname||' '||m.lastname||'
'|| m.email AS user, + cr.target_uid ||'
'||mt.firstname||' '||mt.lastname||'
'|| mt.email AS target_user, + cr.phone_number||'
'|| cr.address||'
'|| cr.state ||' '|| cr.postal_code AS address, + cr.card_issue_id, + cr.user_activated, + cr.card_activated, + cr.card_assigned, + cr.status + FROM members_card_request cr + LEFT JOIN members m ON m.id =cr.member_id + LEFT JOIN members mt ON mt.uid::text = cr.target_uid + ORDER BY cr.id DESC"; + + $data['page_title'] = "Card Request"; + $query = $this->db->query($mysql); + $this->table->function = 'smart_htmlspecialchars'; + $data['job_list_table'] = $this->table->generate($query); + + $this->secureBkoPage('issued_cards',$data); + } + +} \ No newline at end of file diff --git a/application/libraries/Bko_Controller.php b/application/libraries/Bko_Controller.php index 7ae2844..822e4ad 100644 --- a/application/libraries/Bko_Controller.php +++ b/application/libraries/Bko_Controller.php @@ -24,6 +24,33 @@ class Bko_Controller extends WRB_Controller { 'cell_alt_end' => '', 'table_close' => '' ); + + public function PrepPagination($perpage, $urlSegment, $pagePath) { +//echo base_url(); + $actual_link = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + $base_url = (base_url() != '') ? base_url().$pagePath : $actual_link; + $config = array(); + $config["base_url"] = $base_url; //base_url().$pagePath; + $config["per_page"] = $perpage; + $config["uri_segment"] = $urlSegment; + $config["num_links"] = 5; + $config['full_tag_open'] = ""; + $config['num_tag_open'] = '
  • '; + $config['num_tag_close'] = '
  • '; + $config['cur_tag_open'] = "
  • "; + $config['cur_tag_close'] = "
  • "; + $config['next_tag_open'] = "
  • "; + $config['next_tagl_close'] = "
  • "; + $config['prev_tag_open'] = "
  • "; + $config['prev_tagl_close'] = "
  • "; + $config['first_tag_open'] = "
  • "; + $config['first_tagl_close'] = "
  • "; + $config['last_tag_open'] = "
  • "; + $config['last_tagl_close'] = "
  • "; + + return $config; + } public $data = array(); function __construct() { diff --git a/application/views/bko/issued_cards.php b/application/views/bko/issued_cards.php new file mode 100644 index 0000000..e68f4c5 --- /dev/null +++ b/application/views/bko/issued_cards.php @@ -0,0 +1,71 @@ + +
    + + +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + diff --git a/application/views/bko/view_bko_header.php b/application/views/bko/view_bko_header.php index 1061e6f..8af279b 100644 --- a/application/views/bko/view_bko_header.php +++ b/application/views/bko/view_bko_header.php @@ -82,9 +82,10 @@
    ddddd
    - Job Acts - Find Member - Offers + Cards + Job Acts + Find Member + Offers Past Due Recent Signup Marketing @@ -93,8 +94,8 @@ Locate Transfers - Contacts - Log Out + Contacts + Log Out