32 lines
940 B
PHP
32 lines
940 B
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Coupons extends Users_Controller {
|
|
|
|
function __construct() {
|
|
parent::__construct();
|
|
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
|
|
redirect(home);
|
|
}
|
|
}
|
|
|
|
public function index(){
|
|
|
|
$data = $this->getSessionArray();
|
|
$this->load->model('coupon_model');
|
|
$activeCouponResult = $this->coupon_model->loadMemberActiveCoupons($_SESSION['member_id'] ,$fliters=[]);
|
|
$_SESSION['coupon'] = $activeCouponResult->num_rows();
|
|
$data['coupon_table_row'] = $activeCouponResult->result();
|
|
$data['page_title'] ="Coupons";
|
|
$this->renderSecurePage('users/view_coupon', $data);
|
|
}
|
|
|
|
public function redeem(){
|
|
|
|
$what = $this->input->get('what');
|
|
$value = $this->input->get('value');
|
|
echo "RD $what $value";
|
|
}
|
|
|
|
} |