当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::showStyle方法代码示例

本文整理汇总了PHP中Page::showStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::showStyle方法的具体用法?PHP Page::showStyle怎么用?PHP Page::showStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Page的用法示例。


在下文中一共展示了Page::showStyle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * 列表
  *
  */
 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $apModel = D('AdPosition');
     $adModel = D('Ad');
     $localTimeObj = LocalTime::getInstance();
     $res = $adModel->getAll(array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $ads = array();
     foreach ($res['data'] as $rs) {
         $ad = $adModel->info($rs['ad_id']);
         $position = $apModel->info($ad['position_id']);
         $ad['ad_position'] = $position['position_name'];
         $ad['media_type'] = $this->_ad_media_type_conf[$ad['media_type']];
         $ad['start_time'] = $localTimeObj->local_date($this->_CFG['time_format'], $ad['start_time']);
         $ad['end_time'] = $localTimeObj->local_date($this->_CFG['time_format'], $ad['end_time']);
         $ads[] = $ad;
     }
     $this->assign('ads', $ads);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '广告管理 > 广告列表');
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:31,代码来源:AdvAction.class.php

示例2: index

 /**
  * 列表
  *
  */
 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $aModel = D('Article');
     $acModel = D('ArticleCategory');
     $localTimeObj = LocalTime::getInstance();
     $params = array();
     $res = $aModel->getAll($params, array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $articles = array();
     foreach ($res['data'] as $rs) {
         $category = $acModel->info($rs['cate_id']);
         $rs['cate_name'] = $category['cate_name'];
         $rs['addtime'] = $localTimeObj->local_date($this->_CFG['time_format'], $rs['addtime']);
         $articles[] = $rs;
     }
     $this->assign('articles', $articles);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '文章管理 > 文章列表');
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:29,代码来源:ArticleAction.class.php

示例3: records

 public function records()
 {
     $c_id = intval($_REQUEST['c_id']);
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $localTimeObj = LocalTime::getInstance();
     $ccModel = M('TaoCouponRecords');
     $res = array();
     $res['count'] = $ccModel->where("c_id='{$c_id}'")->count();
     $res['data'] = $ccModel->where("c_id='{$c_id}'")->order('id DESC')->limit(($page - 1) * $pageLimit . ',' . $pageLimit)->select();
     $records = array();
     foreach ($res['data'] as $rs) {
         $rs['fetch_time'] = $localTimeObj->local_date($this->_CFG['time_format'], $rs['fetch_time']);
         $records[] = $rs;
     }
     $this->assign('records', $records);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&c_id={$c_id}&page=[page]";
     foreach ($params as $key => $val) {
         $page_url .= "&{$key}={$val}";
     }
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '淘宝优惠券管理 > 领取记录');
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:26,代码来源:TaoCouponAction.class.php

示例4: index

 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $ccmModel = D('MallZhekou');
     $cccService = service('ZhekouCategory');
     $categorys = $cccService->getAll();
     $params = array('cate_id' => isset($_REQUEST['cate_id']) && $_REQUEST['cate_id'] ? intval($_REQUEST['cate_id']) : 0, 'kw' => isset($_REQUEST['kw']) && $_REQUEST['kw'] ? $_REQUEST['kw'] : '');
     $keys = array('id,cate_id,title,gourl,sort_order');
     $res = $ccmModel->getAll($keys, $params, array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $zhekous = array();
     foreach ($res['data'] as $rs) {
         $rs['category'] = $categorys[$rs['cate_id']]['name'];
         $zhekous[] = $rs;
     }
     $this->assign('zhekous', $zhekous);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     foreach ($params as $key => $val) {
         $page_url .= "&{$key}={$val}";
     }
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '折扣商品管理 > 折扣商品列表');
     $this->assign('categorys', $categorys);
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:28,代码来源:MallZhekouAction.class.php

示例5: index

 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $auModel = D('AdminUsers');
     $arModel = D('AdminRole');
     $aurModel = D('AdminUserRole');
     $localTimeObj = LocalTime::getInstance();
     $params = array();
     $res = $auModel->getAdmins($params, array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $users = array();
     foreach ($res['data'] as $rs) {
         $roles = $aurModel->getUserRole($rs['user_id']);
         $rs['roles'] = array();
         if (is_array($roles)) {
             foreach ($roles as $r) {
                 $rs['roles'][] = $arModel->info($r);
             }
         }
         $rs['last_login'] = $rs['last_login'] ? $localTimeObj->local_date($this->_CFG['time_format'], $rs['last_login']) : '从未登陆';
         $users[] = $rs;
     }
     $this->assign('users', $users);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     foreach ($params as $key => $val) {
         $page_url .= "&{$key}={$val}";
     }
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '管理员管理 > 管理员列表');
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:34,代码来源:AdminAction.class.php

示例6: index

 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $ccmModel = D('MallPromotion');
     $cccService = service('CouponCodeCategory');
     $params = array('cate_id' => isset($_REQUEST['cate_id']) && $_REQUEST['cate_id'] ? intval($_REQUEST['cate_id']) : 0, 'kw' => isset($_REQUEST['kw']) && $_REQUEST['kw'] ? $_REQUEST['kw'] : '');
     $keys = array('id,cate_id,title,gourl,sort_order');
     $res = $ccmModel->getAll($keys, $params, array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $promotions = array();
     foreach ($res['data'] as $rs) {
         $category = $cccService->info($rs['cate_id']);
         $rs['cates'] = $category['parents'];
         $promotions[] = $rs;
     }
     $this->assign('promotions', $promotions);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     foreach ($params as $key => $val) {
         $page_url .= "&{$key}={$val}";
     }
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '促销活动管理 > 活动列表');
     $categorys = array();
     $data = $cccService->getTree();
     foreach ($data as $rs) {
         $categorys[$rs['id']] = $rs;
         $categorys[$rs['id']]['prefix'] = str_repeat("    ", $rs['level']);
     }
     $this->assign('categorys', $categorys);
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:34,代码来源:MallPromotionAction.class.php

示例7: index

 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $localTimeObj = LocalTime::getInstance();
     $uModel = D('User');
     $params = array('nick' => isset($_REQUEST['nick']) && $_REQUEST['nick'] ? $_REQUEST['nick'] : '');
     $res = $uModel->getAll($params, array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $users = array();
     foreach ($res['data'] as $rs) {
         $rs['last_login'] = $localTimeObj->local_date($this->_CFG['time_format'], $rs['last_login']);
         $users[] = $rs;
     }
     $this->assign('users', $users);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     foreach ($params as $key => $val) {
         $page_url .= "&{$key}={$val}";
     }
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('_hash_', buildFormToken());
     $this->assign('ur_href', '会员管理 > 会员列表');
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:25,代码来源:MemberAction.class.php

示例8: index

 public function index()
 {
     $nick = isset($_REQUEST['nick']) && $_REQUEST['nick'] ? $_REQUEST['nick'] : '';
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $localTimeObj = LocalTime::getInstance();
     $status_conf = PaymentConf::status_conf();
     $where = "1=1";
     if ($nick) {
         $where .= " AND nick LIKE '%{$_REQUEST['nick']}%'";
     }
     $res = array('count' => 0, 'data' => array());
     $res['count'] = M('payment')->where($where)->count();
     $res['data'] = M('payment')->where($where)->order('id DESC')->limit(($page - 1) * $pageLimit . ",{$pageLimit}")->select();
     $records = array();
     foreach ($res['data'] as $rs) {
         $rs['addtime'] = $localTimeObj->local_date($this->_CFG['time_format'], $rs['addtime']);
         $rs['status_type'] = $status_conf[$rs['status']];
         $records[] = $rs;
     }
     $this->assign('records', $records);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]&nick={$nick}";
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('_hash_', buildFormToken());
     $this->assign('ur_href', '充值管理 > 充值记录');
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:29,代码来源:PaymentAction.class.php

示例9: index

 /**
  * 列表
  *
  */
 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $flModel = D('FriendLink');
     $res = $flModel->getAll(array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $links = array();
     foreach ($res['data'] as $link) {
         $link['position'] = $this->_link_position_conf[$link['position_id']];
         if ($link['link_type'] == 2) {
             if (is_file(DOC_ROOT_PATH . FixedUploadedFileUrl($link['link_code']))) {
                 $link['link_code'] = FixedUploadedFileUrl($link['link_code']);
             }
         }
         $links[] = $link;
     }
     $this->assign('links', $links);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '友情链接管理 > 链接列表');
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:29,代码来源:FriendLinkAction.class.php

示例10: index

 public function index()
 {
     $page = isset($_REQUEST['p']) && $_REQUEST['p'] >= 1 ? $_REQUEST['p'] : 1;
     $pageLimit = 15;
     $addtime = 0;
     $cid = isset($_REQUEST['cid']) ? intval($_REQUEST['cid']) : 0;
     $t_type = isset($_REQUEST['t_type']) ? intval($_REQUEST['t_type']) : 0;
     $localTimeObj = LocalTime::getInstance();
     //商家分类
     $cccService = service('ZhekouCategory');
     $categorys = $cccService->getAll();
     $params = array('cate_id' => $cid);
     switch ($t_type) {
         case 1:
             $addtime = $localTimeObj->local_strtotime(date('Y-m-d 00:00:00'));
             break;
         case 2:
             $addtime = $localTimeObj->local_strtotime(date('Y-m-d 00:00:00', strtotime('-3 day')));
             break;
         case 3:
             $addtime = $localTimeObj->local_strtotime(date('Y-m-d 00:00:00', strtotime('-7 day')));
             break;
         case 4:
             $addtime = $localTimeObj->local_strtotime(date('Y-m-d 00:00:00', strtotime('-30 day')));
             break;
     }
     $params['addtime'] = $addtime;
     $limit = array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit);
     $codeMallModel = D('MallZhekou');
     $keys = array();
     $res = $codeMallModel->front($keys, $params, $limit);
     $zhekous = $res['data'];
     $this->assign('zhekous', $zhekous);
     $page_url = reUrl(MODULE_NAME . "/" . ACTION_NAME . "?cid={$cid}&t_type={$t_type}&p=[page]");
     $page_url = str_replace('%5bpage%5d', '[page]', $page_url);
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('categorys', $categorys);
     $this->assign('cid', $cid);
     $this->assign('t_type', $t_type);
     $this->assign('page_title', '超值折扣 - ');
     $this->assign('page_keywords', $this->_CFG['site_keywords']);
     $this->assign('page_description', $this->_CFG['site_description']);
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:46,代码来源:ZhekouAction.class.php

示例11: index

 /**
  * 默认操作
  * 
  */
 public function index()
 {
     $page = isset($_REQUEST['p']) && $_REQUEST['p'] >= 1 ? intval($_REQUEST['p']) : 1;
     $pageLimit = 20;
     $localTimeObj = LocalTime::getInstance();
     $today = $localTimeObj->local_strtotime(date('Y-m-d 23:59:59'));
     $limit = array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit);
     $codeModel = D('CouponCode');
     $res = $codeModel->front(array(), $limit);
     $codes = array();
     foreach ($res['data'] as $rs) {
         if ($rs['expiry_type'] == 1) {
             $rs['expiry_timestamp'] = $rs['expiry'] + $this->_CFG['timezone'] * 3600;
             if ($rs['expiry'] - $today == 0) {
                 $rs['expiry'] = 1;
             } else {
                 $rs['expiry'] = $rs['expiry'] - $today > 0 ? ceil(($rs['expiry'] - $today) / (3600 * 24)) : 0;
             }
         }
         $codes[] = $rs;
     }
     $this->assign('codes', $codes);
     $page_url = reUrl("Index/index?p=[page]");
     $page_url = str_replace('%5bpage%5d', '[page]', $page_url);
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     //友情链接
     $friendlinks = array();
     $flService = service('FriendLinks');
     $res = $flService->getAll();
     if (is_array($res[101])) {
         foreach ($res[101] as $r) {
             $friendlinks[] = $res['all'][$r];
         }
     }
     $this->assign('friendlinks', $friendlinks);
     $this->assign('page_title', ' - ' . $this->_CFG['site_title']);
     $this->assign('page_keywords', $this->_CFG['site_keywords']);
     $this->assign('page_description', $this->_CFG['site_description']);
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:46,代码来源:IndexAction.class.php

示例12: index

 /**
  * 列表
  *
  */
 public function index()
 {
     $page = isset($_REQUEST['page']) && $_REQUEST['page'] >= 1 ? $_REQUEST['page'] : 1;
     $pageLimit = 15;
     $apModel = D('AdPosition');
     $res = $apModel->getAll(array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit));
     $positions = array();
     foreach ($res['data'] as $rs) {
         $position = $apModel->info($rs['position_id']);
         $positions[] = $position;
     }
     $this->assign('positions', $positions);
     $page_url = "?g=" . GROUP_NAME . "&m=" . MODULE_NAME . "&a=" . ACTION_NAME . "&page=[page]";
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('ur_href', '广告位管理 > 广告位列表');
     $this->assign('_hash_', buildFormToken());
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:24,代码来源:AdvPositionAction.class.php

示例13: index

 public function index()
 {
     $page = isset($_REQUEST['p']) && $_REQUEST['p'] >= 1 ? $_REQUEST['p'] : 1;
     $pageLimit = 30;
     $cid = isset($_REQUEST['cid']) ? intval($_REQUEST['cid']) : 0;
     $localTimeObj = LocalTime::getInstance();
     //商家分类
     $cccService = service('CouponCodeCategory');
     $cates = $cccService->getTree();
     //商家子分类
     $cate_ids = array();
     $cate_ids = is_array($cates[$cid]['childs']) ? $cates[$cid]['childs'] : array();
     $cate_ids[] = $cid;
     $cate_ids = implode(',', $cate_ids);
     $params = array('cate_id' => $cate_ids);
     $limit = array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit);
     $codeMallModel = D('MallPromotion');
     $keys = array();
     $res = $codeMallModel->front($keys, $params, $limit);
     $promotions = array();
     foreach ($res['data'] as $rs) {
         $rs['expiry_timestamp'] = $rs['expiry'] + $this->_CFG['timezone'] * 3600;
         $rs['expiry'] = $localTimeObj->local_date($this->_CFG['date_format'], $rs['expiry']);
         $promotions[] = $rs;
     }
     $this->assign('promotions', $promotions);
     $page_url = reUrl(MODULE_NAME . "/" . ACTION_NAME . "?cid={$cid}&p=[page]");
     $page_url = str_replace('%5bpage%5d', '[page]', $page_url);
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('cates', $cates);
     $this->assign('cid', $cid);
     $this->assign('page_title', '促销活动 - ');
     $this->assign('page_keywords', $this->_CFG['site_keywords']);
     $this->assign('page_description', $this->_CFG['site_description']);
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:38,代码来源:PromotionAction.class.php

示例14: lastestpulled

 /**
  * 最近被领取的优惠券
  *
  */
 public function lastestpulled()
 {
     $page = isset($_REQUEST['p']) && $_REQUEST['p'] >= 1 ? $_REQUEST['p'] : 1;
     $pageLimit = 20;
     $localTimeObj = LocalTime::getInstance();
     $today = $localTimeObj->local_strtotime(date('Y-m-d 23:59:59'));
     $limit = array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit);
     $cccModel = D('CouponCodeCodes');
     $res = $cccModel->fetch_lists($limit);
     $codes = array();
     foreach ($res['data'] as $rs) {
         if ($rs['expiry_type'] == 1) {
             $rs['expiry_timestamp'] = $rs['expiry'] + $this->_CFG['timezone'] * 3600;
             if ($rs['expiry'] - $today == 0) {
                 $rs['expiry'] = 1;
             } else {
                 $rs['expiry'] = $rs['expiry'] - $today > 0 ? ceil(($rs['expiry'] - $today) / (3600 * 24)) : 0;
             }
         }
         $codes[] = $rs;
     }
     $this->assign('codes', $codes);
     $page_url = reUrl(MODULE_NAME . "/" . ACTION_NAME . "?p=[page]");
     $page_url = str_replace('%5bpage%5d', '[page]', $page_url);
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $this->assign('page_title', '最近被领取的优惠券 - ');
     $this->assign('page_keywords', $this->_CFG['site_keywords']);
     $this->assign('page_description', $this->_CFG['site_description']);
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:36,代码来源:CodeAction.class.php

示例15: shops

 /**
  * 淘宝店大全
  * 
  */
 public function shops()
 {
     $page = isset($_REQUEST['p']) && $_REQUEST['p'] >= 1 ? $_REQUEST['p'] : 1;
     $pageLimit = 10;
     $cid = isset($_REQUEST['cid']) && $_REQUEST['cid'] ? intval($_REQUEST['cid']) : 0;
     $t_type = isset($_REQUEST['t_type']) ? intval($_REQUEST['t_type']) : 0;
     //分类
     $tscService = service('TaoShopCategory');
     $categorys = $tscService->getAll();
     $this->assign('categorys', $categorys);
     $this->assign('cid', $cid);
     $params = array('cid' => $categorys[$cid]['cid'], 't_type' => $t_type);
     $limit = array('begin' => ($page - 1) * $pageLimit, 'offset' => $pageLimit);
     $shopModel = D('TaoShop');
     $keys = array();
     $res = $shopModel->front($keys, $params, $limit);
     $this->assign('shops', $res['data']);
     $page_url = reUrl(MODULE_NAME . "/" . ACTION_NAME . "?cid={$cid}&p=[page]");
     $page_url = str_replace('%5bpage%5d', '[page]', $page_url);
     $p = new Page($page, $pageLimit, $res['count'], $page_url, 5, 5);
     $pagelink = $p->showStyle(3);
     $this->assign('pagelink', $pagelink);
     $nowtime = LocalTime::getInstance()->gmtime();
     $this->assign('nowtime', $nowtime);
     $this->assign('page_title', '淘宝优惠券 - ' . $this->_CFG['site_title'] . ' - ');
     $this->assign('page_keywords', $this->_CFG['site_keywords']);
     $this->assign('page_description', $this->_CFG['site_description']);
     $this->display();
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:33,代码来源:TaoAction.class.php


注:本文中的Page::showStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。