示例#1
0
 public function indexAction()
 {
     $num = $this->tags->getTotalTags($this->_sanReq);
     if ($num) {
         $page = new \Mall\Utils\Pagination($num, self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1);
         $list = $this->tags->showTagsList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $this->_sanReq);
         $this->view->setVars(array('tags' => $list, 'page' => $page->createLink()));
     } else {
         $this->view->setVars(array('tags' => [], 'page' => ''));
     }
 }
示例#2
0
 /**
  * [indexAction 云码列表]
  * @return [type] [description]
  */
 public function indexAction()
 {
     if ($this->validFlag) {
         $where = $this->_sanReq;
     } else {
         $where = '';
     }
     $total = $this->code->getTotalCode($where);
     $page = new \Mall\Utils\Pagination($total[0], 20, (int) $this->request->get('page'));
     $codelist = $this->code->showCodeList($page->firstRow, $page->listRows, $where);
     $this->view->setVars(array('codelist' => $codelist, 'page' => $page->createLink()));
 }
示例#3
0
 public function indexAction()
 {
     $num = $this->item->getTotalItem($this->_sanReq);
     if ($num) {
         $page = new \Mall\Utils\Pagination($num, self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1);
         $list = $this->item->showItemList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $this->_sanReq);
         $cate = (new \Mall\Mdu\CategoryModule())->getAllCate();
         $this->view->setVars(array('list' => $list, 'page' => $page->createLink(), 'cate' => $cate));
     } else {
         $this->view->setVars(array('list' => [], 'page' => ''));
     }
 }
 public function indexAction()
 {
     $where = array('u_id' => $this->uid);
     if ($arr = $this->filterAct($this->request->get('act'))) {
         $where = array_merge($where, $arr);
     }
     $total = $this->coupons->getTotalCouponsByUid($where);
     $page = new \Mall\Utils\Pagination($total[0], self::NUM_PER_PAGE, (int) $this->request->get('page'));
     $list = $this->coupons->getMyCoupons($page->firstRow, $page->listRows, $where);
     //$unUsed = $this->coupons->getTotalCouponsByUid(array('u_id' => $this->uid, 'cp_status' => 1, 'cp_used_time' => 0, 'cp_end_time >' => $_SERVER['REQUEST_TIME']))[0];
     //$used = $this->coupons->getTotalCouponsByUid(array('u_id' => $this->uid, 'cp_used_time >' => 0))[0];
     //$expire = $this->coupons->getTotalCouponsByUid(array('u_id' => $this->uid, 'cp_end_time <' => $_SERVER['REQUEST_TIME']))[0];
     $this->view->setVars(array('list' => $list, 'page' => $page->createDotLinks()));
 }