本文整理匯總了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');
}
示例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');
}
示例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);
}
示例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;
}
示例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");
}
示例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');
}
示例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');
}
示例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');
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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");
}
示例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');
}
示例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;
}