예제 #1
0
 /**
  * 记录数.
  */
 public function count($filter = null)
 {
     if ($filter['node_id'] > 0) {
         $filter['node_id'] = app::get('content')->model('article_nodes')->get_childrens_id($filter['node_id']);
     }
     return parent::count($filter);
 }
예제 #2
0
 /**
  * 获得专辑列表
  * 
  * @param   array   $param          参数
  * @return  array
  */
 function getSpecialList($param = array())
 {
     $list = array();
     $filter = $param['filter'];
     $fields = $param['fields'] ? $param['fields'] : '*';
     $limit = intval($param['limit']);
     $limit = $limit > 0 ? $limit : 20;
     $page = intval($param['page']);
     $page = $page > 0 ? $page : 1;
     $offset = ($page - 1) * $limit;
     $orderby = $param['orderby'] ? $param['orderby'] : 'addtime DESC';
     $count = parent::count($filter);
     if ($count) {
         $info = parent::getList($fields, $filter, $offset, $limit, $orderby);
     }
     $platform = $param['platform'] ? $param['platform'] : 'wap';
     // 获得商品列表
     if ($info) {
         $list['total_results'] = $count;
         foreach ($info as $k => $v) {
             $param = array('special_id' => $v['special_id'], 'limit' => 4, 'platform' => $platform);
             $list['list'][] = $this->getSpecialInfo($param, 2);
         }
     }
     return $list;
 }
예제 #3
0
파일: comments.php 프로젝트: syjzwjj/quyeba
 function count($filter = array())
 {
     if ($this->type == 'msgtoadmin') {
         $this->type = 'msg';
         $this->falg = 'msgtoadmin';
         $filter['to_id'] = 1;
     }
     if ($this->type) {
         $filter['object_type'] = $this->type;
     }
     if ($filter['for_comment_id'] === 'all') {
         unset($filter['for_comment_id']);
     } else {
         $filter['for_comment_id'] = $filter['for_comment_id'] ? $filter['for_comment_id'] : 0;
     }
     return parent::count($filter);
 }
예제 #4
0
파일: tag.php 프로젝트: syjzwjj/quyeba
 function check_tag($item)
 {
     return parent::count(array('tag_name' => $item['tag_name'], 'tag_type' => $item['tag_type'], 'app_id' => $item['app_id']));
 }
예제 #5
0
파일: cat.php 프로젝트: noikiy/snk
 function get_subcat_count($cat_id)
 {
     $filter = array('parent_id' => $cat_id);
     return parent::count($filter);
 }
예제 #6
0
파일: objects.php 프로젝트: syjzwjj/quyeba
 public function count($filter = array())
 {
     if ($tmp['member_id'] == '-1') {
         $arr = $_SESSION['b2c_cart_objects'][$tmp['member_ident']];
         $arr = $this->filter_getlist($arr, $filter);
     } else {
         if ($this->use_kv()) {
             //使用kv
             $this->kv_instance()->fetch($this->kv_prefix, $arr);
             $arr = $this->filter_getlist($arr, $filter);
         } else {
             //使用database
             return parent::count($filter);
         }
     }
     return $arr ? count($arr) : 0;
 }
예제 #7
0
 public function pcount($filter = array())
 {
     return parent::count($filter);
 }
예제 #8
0
 function parent_count($filter = null)
 {
     return parent::count($filter);
 }