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


PHP Page::fpage方法代码示例

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


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

示例1: view_iqcWaitCheck

 public function view_iqcWaitCheck()
 {
     $IqcAct = new IqcAct();
     $where = "where sellerId=0 and detectStatus=1 and getUserId='{$_SESSION['userId']}' ";
     $total = $IqcAct->act_getNowWhNum($where);
     $num = 200;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     $where .= "order by id desc " . $page->limit;
     $iqcList = $IqcAct->act_getNowWhList('*', $where);
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('show_page', $show_page);
     $this->smarty->assign('iqcList', $iqcList);
     $this->smarty->assign('secnev', '1');
     //二级导航
     $this->smarty->assign('module', 'SKU等待检测');
     $this->smarty->assign('username', $_SESSION['userName']);
     $navarr = array("<a href='index.php?mod=iqc&act=iqcList'>iqc检测领取</a>", ">>", "等待检测");
     $this->smarty->assign('navarr', $navarr);
     $this->smarty->display('iqcWaitCheck.html');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:35,代码来源:iqc.view.php

示例2: getTemplateList

 private function getTemplateList()
 {
     extract($this->generateInfo());
     $pagesize = 100;
     $msgtpl_obj = new AmazonMessageTemplateModel();
     $all = $msgtpl_obj->getAllMessageNumber(' and ownerid in (0, ' . $_SESSION['globaluserid'] . ')');
     $page_obj = new Page($all, $pagesize);
     $usercache = new UserCacheModel();
     $templatelist = $msgtpl_obj->getAllTemplateList(' and ownerid in (0,' . $_SESSION['globaluserid'] . ') ' . $page_obj->limit);
     foreach ($templatelist as &$tpval) {
         $info = empty($tpval['ownerid']) ? $tpval['username'] = '公用' : $usercache->getUserInfoBySysId($tpval['ownerid'], 0);
         if (is_array($info)) {
             $tpval['username'] = $info['userName'];
         }
     }
     if ($all > $pagesize) {
         //分页
         $pagestr = $page_obj->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $pagestr = $page_obj->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('pagestr', $pagestr);
     $this->smarty->assign('addurl', $editUrl);
     $this->smarty->assign('toplevel', 2);
     $this->smarty->assign('sec_menue', $sec_menueid);
     $this->smarty->assign('tpllist', $templatelist);
     $this->smarty->assign('toptitle', 'message模板列表');
     $this->smarty->display('msgtemplatelistAmazon.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:29,代码来源:amazonMessageTemplate.view.php

示例3: Page

 function act_getSkuConversionList()
 {
     $sku = $_GET['sku'] ? post_check(trim($_GET['sku'])) : '';
     //sku
     $tName = 'pc_sku_conversion';
     $select = '*';
     $where = "WHERE is_delete=0 ";
     if (!empty($sku)) {
         $where .= "AND (old_sku like'{$sku}%' or new_sku like'{$sku}%') ";
     }
     $total = OmAvailableModel::getTNameCount($tName, $where);
     $num = 100;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     $where .= "order by auditStatus asc,id desc " . $page->limit;
     $skuConversionList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     return array('skuConversionList' => $skuConversionList, 'show_page' => $show_page);
 }
开发者ID:ohjack,项目名称:newErp,代码行数:33,代码来源:skuConversion.action.php

示例4: actIndex

 /**
  * TrackEmailStatAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $condition = '';
     $trackEmailStat = new TrackEmailStatModel();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $timeNode = isset($_GET['timeNode']) ? post_check(trim($_GET['timeNode'])) : '';
     $condition .= "1";
     if ($type && $key) {
         if (!in_array($type, array('trackNumber', 'platAccount'))) {
             redirect_to("index.php?mod=trackEmailStat&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     if (!empty($timeNode)) {
         if (!in_array($timeNode, array('addTime', 'lastTime'))) {
             redirect_to("index.php?mod=trackEmailStat&act=index");
         }
         $startTime = isset($_GET['startTime']) ? strtotime(trim($_GET['startTime']) . " 00:00:00") : strtotime(date("Y-m-d", time()) . " 00:00:00");
         $endTime = isset($_GET['endTime']) ? strtotime(trim($_GET['endTime']) . " 23:59:59") : strtotime(date("Y-m-d", time()) . " 23:59:59");
         if ($startTime && $endTime) {
             $condition .= ' AND ' . $timeNode . " BETWEEN '" . $startTime . "' AND " . "'" . $endTime . "'";
         }
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     $total = $trackEmailStat->modListCount($condition);
     $res = $trackEmailStat->modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['key'] = $key;
     $data['type'] = $type;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     $data['timeNode'] = $timeNode;
     $data['startTime'] = $startTime ? date('Y-m-d', $startTime) : '';
     $data['endTime'] = $endTime ? date('Y-m-d', $endTime) : '';
     self::$errCode = trackEmailStatModel::$errCode;
     self::$errMsg = trackEmailStatModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:66,代码来源:trackEmailStat.action.php

示例5: view_systemManageList

 public function view_systemManageList()
 {
     //基础代码准备
     $SystemManage = new systemManageAct();
     //搜索操作
     $condition = array();
     $keyWords = "";
     if (isset($_POST) && !empty($_POST)) {
         $keyWords = trim($_POST['keyWords']);
         //填写系统名称
         if (!empty($keyWords)) {
             $condition[] = "systemName = '{$keyWords}'";
             $this->where = "WHERE " . implode(" and ", $condition) . " ORDER BY addTime DESC ";
         } else {
             $this->where = " ORDER BY addTime DESC ";
         }
     } else {
         //默认
         $this->where = " ORDER BY addTime DESC ";
     }
     //分页
     $total = $SystemManage->act_getPageNum();
     $num = 100;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     $this->where .= $page->limit;
     $systemListArr = $SystemManage->act_systemManageList($this->where);
     //分页
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('show_page', $show_page);
     //面包屑
     $navlist = array(array('url' => 'index.php?mod=nameSystem&act=nameSystemList', 'title' => '系统名称中心'), array('url' => 'index.php?mod=systemManage&act=systemManageList', 'title' => '系统名称管理'));
     $this->smarty->assign('navlist', $navlist);
     //二级导航
     $this->smarty->assign('toplevel', 0);
     //一级导航
     $this->smarty->assign('systemListArr', $systemListArr);
     //显示数组
     //搜索选项值保留
     $this->smarty->assign('keyWords', $keyWords);
     $this->smarty->display("systemManageList.htm");
 }
开发者ID:ohjack,项目名称:newErp,代码行数:56,代码来源:systemManage.view.php

示例6: view_assignList

 /**
  * whGoodsAssignView::view_assignList()
  * 调拨单列表
  * @return void
  */
 public function view_assignList()
 {
     global $memc_obj;
     $pagesize = 100;
     //页面大小
     //print_r($this->assign_status);exit;
     $whereSql = $this->buildWhereSql();
     //拼接sql条件
     //$whereSql   =   ' and a.status = 100';
     //echo $whereSql;exit;
     //$assign_obj =   new WhGoodsAssignModel();
     $rownumber = WhGoodsAssignModel::getRowAllNumber($whereSql);
     //获得所有的行数
     if ($rownumber > 0) {
         $pager = new Page($rownumber, $pagesize);
         $lists = WhGoodsAssignModel::getAssignList($whereSql, 'a.id', $pager->limit, 'a.id', 'desc');
         //print_r($lists);   exit;
         foreach ($lists as $key => $val) {
             //处理调拨单
             $outStore = WarehouseManagementModel::warehouseManagementModelList(" where id = {$val['outStoreId']}");
             //print_r($outStore);exit;
             $lists[$key]['outStoreId'] = $outStore[0]['whName'];
             $inStore = WarehouseManagementModel::warehouseManagementModelList(" where id = {$val['inStoreId']}");
             //print_r($outStore);exit;
             $lists[$key]['inStoreId'] = $inStore[0]['whName'];
             $skusinfo = WhGoodsAssignModel::getsAssignListDetail($val['id']);
             $lists[$key]['skuinfo'] = $skusinfo;
             $lists[$key]['createUid'] = $val['createUid'] ? getUserNameById($val['createUid']) : '无';
             $lists[$key]['statusTime'] = date('Y-m-d H:i:s', $val['statusTime']);
             $lists[$key]['createTime'] = date('Y-m-d H:i:s', $val['createTime']);
             $lists[$key]['status'] = $this->assign_status[$val['status']];
         }
         if ($rownumber > $pagesize) {
             //分页
             $pagestr = $pager->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pagestr = $pager->fpage(array(0, 2, 3));
         }
         $this->smarty->assign('pagestr', $pagestr);
     }
     $storeLists = WarehouseManagementModel::warehouseManagementModelList($where);
     //获取可用仓库列表
     self::bulidNav('调拨单浏览', '调拨单列表', 51);
     //print_r($storeLists);exit;
     //print_r($lists);exit;
     $this->smarty->assign('lists', $lists);
     //调拨单列表
     $this->smarty->assign('assign_status', $this->assign_status);
     //调拨单状态
     $this->smarty->assign('storeLists', $storeLists);
     $this->smarty->display('assignList.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:57,代码来源:whGoodsAssign.view.php

示例7: view_index

 public function view_index()
 {
     $condition = '';
     $partitionManage = new PartitionManageAct();
     $this->smarty->assign('title', '分区管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $chid = isset($_GET['chid']) ? intval($_GET['chid']) : 0;
     //渠道ID
     $condition .= "1";
     $condition .= " AND channelId = {$chid}";
     if ($type && $key) {
         if (!in_array($type, array('partitionCode', 'partitionName'))) {
             redirect_to("index.php?mod=partitionManage&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $partitionManage->actList($condition, $curpage, $pagenum);
     $total = $partitionManage->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     $carrierId = PartitionManageModel::getCarrierId($chid);
     //替换页面内容变量
     $this->smarty->assign('chid', $chid);
     //渠道ID
     $this->smarty->assign('carrierId', $carrierId);
     //运输方式ID
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //查询选项
     $this->smarty->assign('lists', $res);
     //循环赋值
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('partitionManage.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:52,代码来源:partitionManage.view.php

示例8: view_index

 public function view_index()
 {
     $trackWarnNode = new TrackWarnNodeAct();
     $this->smarty->assign('title', '运输方式节点预警管理');
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $carrierId = isset($_GET['carrierId']) ? intval($_GET['carrierId']) : 0;
     $condition = "1";
     if ($type && $key) {
         if (!in_array($type, array('nodeName', 'trackName'))) {
             redirect_to("index.php?mod=trackWarnNode&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     if (!empty($carrierId)) {
         $condition .= " AND carrierId = '{$carrierId}'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $res = $trackWarnNode->actList($condition, $curpage, $pagenum);
     $total = $trackWarnNode->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //替换页面内容变量
     $this->smarty->assign('key', $key);
     //关键词
     $this->smarty->assign('type', $type);
     //条件选项
     $this->smarty->assign('lists', $res);
     //数据集
     $this->smarty->assign('carrierId', $carrierId);
     //运输方式ID
     $carrierList = TransOpenApiModel::getCarrier(2);
     $this->smarty->assign('carrierList', $carrierList);
     //运输方式列表
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->display('trackWarnNode.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:52,代码来源:trackWarnNode.view.php

示例9: act_getPage

 /**
  * 获取供应商分页列表的函数
  * @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);
 }
开发者ID:ohjack,项目名称:newErp,代码行数:21,代码来源:partner.action.php

示例10: actIndex

 /**
  * CarrierProNodeAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $carrierProNode = new CarrierProNodeModel();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $carrierId = isset($_GET['carrierId']) ? intval($_GET['carrierId']) : 0;
     $condition = "1";
     if ($type && $key) {
         if (!in_array($type, array('nodeTitle', 'nodeKey'))) {
             redirect_to("index.php?mod=carrierProNode&act=index");
         }
         $condition .= ' AND ' . $type . " LIKE '%" . $key . "%'";
     }
     if (!empty($carrierId)) {
         $condition .= " AND carrierId = '{$carrierId}'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     //每页显示的个数
     $total = $carrierProNode->modListCount($condition);
     $res = $carrierProNode->modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['key'] = $key;
     $data['type'] = $type;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     $data['carriers'] = TransOpenApiModel::getCarrier(2);
     $data['carrierId'] = $carrierId;
     self::$errCode = CarrierProNodeModel::$errCode;
     self::$errMsg = CarrierProNodeModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:58,代码来源:carrierProNode.action.php

示例11: actIndex

 /**
  * WebAdAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $condition = '';
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $typeId = isset($_GET['typeId']) ? abs(intval($_GET['typeId'])) : 0;
     $condition .= "1";
     if ($type && $key) {
         if (!in_array($type, array('topic'))) {
             redirect_to("index.php?mod=webAd&act=index");
         }
         $condition .= ' AND ' . $type . " LIKE '%" . $key . "%'";
     }
     if (!empty($typeId)) {
         $condition .= " AND typeId = '{$typeId}'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     $total = WebAdModel::modListCount($condition);
     $res = WebAdModel::modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['key'] = $key;
     $data['type'] = $type;
     $data['typeId'] = $typeId;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     self::$errCode = WebAdModel::$errCode;
     self::$errMsg = WebAdModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         exit;
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:56,代码来源:webAd.action.php

示例12: actIndex

 /**
  * CountriesUsazoneAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $condition = '1';
     $countriesUsazone = new CountriesUsazoneModel();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     if ($type && $key) {
         if (!in_array($type, array('zone', 'zip_code'))) {
             redirect_to("index.php?mod=countriesUsazone&act=index");
         }
         if ($type == 'zone') {
             $condition .= ' AND ' . $type . " = '" . $key . "'";
         }
         if ($type == 'zip_code') {
             $condition .= ' AND ' . $type . " like '%" . $key . "%'";
         }
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     $total = $countriesUsazone->modListCount($condition);
     $res = $countriesUsazone->modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['key'] = $key;
     $data['type'] = $type;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     self::$errCode = CountriesUsazoneModel::$errCode;
     self::$errMsg = CountriesUsazoneModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:56,代码来源:countriesUsazone.action.php

示例13: view_getAccountList

 public function view_getAccountList()
 {
     $type = isset($_GET['type']) ? $_GET['type'] : '';
     $status = isset($_GET['status']) ? $_GET['status'] : '';
     $omAvailableAct = new OmAvailableAct();
     $where = 'WHERE is_delete=0 ';
     if ($type == 'search') {
         $accountId = isset($_GET['accountId']) ? $_GET['accountId'] : '';
         $platformId = isset($_GET['platformId']) ? $_GET['platformId'] : '';
         if (intval($accountId) != 0) {
             $where .= "AND id='{$accountId}' ";
         }
         if (intval($platformId) != 0) {
             $where .= "AND platformId='{$platformId}' ";
         }
     }
     $omAccountList = $omAvailableAct->act_getTNameList('om_account', '*', $where);
     $total = $omAvailableAct->act_getTNameCount('om_account', $where);
     $num = 100;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     $where .= "ORDER BY id " . $page->limit;
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     $navlist = array(array('url' => 'index.php?mod=omPlatform&act=getOmPlatformList', 'title' => '系统设置'), array('url' => '', 'title' => '平台账号'));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', '账号管理');
     $this->smarty->assign('toplevel', 3);
     $this->smarty->assign('secondlevel', '32');
     $this->smarty->assign('show_page', $show_page);
     $this->smarty->assign('status', $status);
     $this->smarty->assign('omAccountList', $omAccountList);
     //循环列表
     $this->smarty->display("omAccountList.htm");
 }
开发者ID:ohjack,项目名称:newErp,代码行数:48,代码来源:omAccount.view.php

示例14: view_waitWeighingList

 public function view_waitWeighingList()
 {
     $pagesize = 100;
     //页面大小
     $statusar = array(PKS_WWEIGHING, PKS_WWEIGHING_EX, PKS_INLANDWWEIGHING);
     $statusstr = implode(',', $statusar);
     $packing_obj = new PackingOrderModel();
     $count = $packing_obj->getRecordsNumByStatus($statusar);
     //获得当前状态为待包装的发货单总数量
     $pager = new Page($count, $pagesize);
     //分页对象
     $billlist = $packing_obj->getBillList(' and orderStatus in (' . $statusstr . ') order by po.id ' . $pager->limit);
     $this->smarty->assign('billlist', $billlist);
     $ShipingTypeList = CommonModel::getShipingTypeListKeyId();
     $count = count($billlist);
     for ($i = 0; $i < $count; $i++) {
         $billlist[$i]['shipingname'] = isset($ShipingTypeList[$billlist[$i]['transportId']]) ? $ShipingTypeList[$billlist[$i]['transportId']] : '';
     }
     $acc_id_arr = array();
     foreach ($billlist as $key => $valbil) {
         if (!in_array($valbil['accountId'], $acc_id_arr)) {
             array_push($acc_id_arr, $valbil['accountId']);
         }
     }
     $salesaccountinfo = CommonModel::getAccountInfo($acc_id_arr);
     $this->smarty->assign('salesaccountinfo', $salesaccountinfo);
     if ($count > $pagesize) {
         //分页链接
         $pagestr = $pager->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $pagestr = $pager->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('pagestr', $pagestr);
     $navlist = array(array('url' => '', 'title' => '出库'), array('url' => '', 'title' => '待包装称重'));
     $this->smarty->assign('navlist', $navlist);
     $toptitle = '待包装称重';
     //顶部链接
     $this->smarty->assign('toptitle', $toptitle);
     $toplevel = 2;
     //顶层菜单
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = '26';
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('secnev', 3);
     //二级导航
     $this->smarty->display('waitweighinglist.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:48,代码来源:waitWeighing.view.php

示例15: actIndex

 /**
  * ChannelManageAct::actIndex()
  * 列出符合条件的数据并分页显示
  * @param string $condition 查询条件
  * @param integer $curpage 页码
  * @param integer $pagenum 每页个数
  * @return array 
  */
 public function actIndex()
 {
     $data = array();
     $condition = '';
     $channelManage = new ChannelManageModel();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     $key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
     $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
     //运输方式ID
     $condition .= "1";
     $condition .= " AND carrierId = {$id}";
     if ($type && $key) {
         if (!in_array($type, array('channelName', 'channelAlias'))) {
             redirect_to("index.php?mod=channelManage&act=index");
         }
         $condition .= ' AND ' . $type . " = '" . $key . "'";
     }
     //获取符合条件的数据并分页
     $pagenum = 20;
     $total = $channelManage->modListCount($condition);
     $res = $channelManage->modList($condition, $curpage, $pagenum);
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     if ($res) {
         if ($total > $pagenum) {
             $pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
         } else {
             $pageStr = $page->fpage(array(0, 1, 2, 3));
         }
     } else {
         $pageStr = '暂无数据';
     }
     //封装数据返回
     $data['id'] = $id;
     $data['key'] = $key;
     $data['type'] = $type;
     $data['lists'] = $res;
     $data['pages'] = $pageStr;
     self::$errCode = ChannelManageModel::$errCode;
     self::$errMsg = ChannelManageModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:56,代码来源:channelManage.action.php


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