Example #1
0
 /**
  * 获取供应商分页列表的函数
  * @param     $where    查询条件
  * @param     $perNum   每页显示的记录条数
  * @param     $pa       默认为空 ""
  * @param     $lang     语言类型,中文或英文
  * @return    void      分页array
  */
 public static function act_getPage($where, $field, $perNum, $pa = "", $lang = 'CN')
 {
     $result = PartnerModel::getPartnerList($where, 'count(*)', $limit = '');
     $total = $result[0]['count(*)'];
     $page = new Page($total, $perNum, $pa, $lang);
     $list = PartnerModel::getPartnerList($where, $field, $page->limit);
     if ($total > $perNum) {
         $fpage = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $fpage = $page->fpage(array(0, 1, 2, 3));
     }
     return array($list, $fpage, $total);
 }