久久调教,免费看黄色影片,www五月,国产精品免费一区二区区,亚洲欧美日韩综合一区,亚洲欧美日韩精品在线,2021免费日韩视频网

龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開(kāi)發(fā),龍巖分銷(xiāo)系統(tǒng)

ecshop后臺(tái)分頁(yè)代碼

2016.05.15 | 1918閱讀 | 0條評(píng)論 | php

<?php

if($_REQUEST['act'] == 'list'){

//獲取信息列表

$order_list = order_list();

$smarty->assign('order_list',  $order_list['order_list']);

$smarty->assign('filter',       $order_list['filter']);

$smarty->assign('record_count', $order_list['record_count']);

$smarty->assign('page_count',   $order_list['page_count']);

//后臺(tái)頁(yè)面樣式

$smarty->assign('full_page',    1);

//跳轉(zhuǎn)頁(yè)面

assign_query_info();

$smarty->display('order_list.htm');

}

elseif ($_REQUEST['act'] == 'query'){//分頁(yè)代碼

//獲取信息列表

$order_list = order_list();

$smarty->assign('order_list',  $order_list['order_list']);

$smarty->assign('filter',       $order_list['filter']);

$smarty->assign('record_count', $order_list['record_count']);

$smarty->assign('page_count',   $order_list['page_count']);

//跳轉(zhuǎn)頁(yè)面

make_json_result ( $smarty->fetch ( 'order_list.htm' ), '', array ('filter' => $order_list ['filter'], 'page_count' => $order_list ['page_count'] ) );

}


//查詢(xún)數(shù)據(jù)方法

function order_list()

{

$sql = 'SELECT COUNT(*) FROM ' . $GLOBALS['ecs']->table('cuanji');

$filter['record_count'] = $GLOBALS['db']->getOne($sql);

$filter = page_and_size($filter);

/* 獲活動(dòng)數(shù)據(jù) */

$sql = 'SELECT * FROM ' . $GLOBALS['ecs']->table('cuanji').' LIMIT '. $filter['start'] .', ' . $filter['page_size'];

$filter['keywords'] = stripslashes($filter['keywords']);

set_filter($filter, $sql);

$row = $GLOBALS['db']->getAll($sql);

$arr = array('order_list' => $row, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count']);

return $arr;

}

?>

<!—————————————————html代碼———————————————->

<!–導(dǎo)入js–>

{insert_scripts files='../js/utils.js,listtable.js'}

<!–動(dòng)態(tài)賦值div 名字必須相同–>

<div  id='listDiv'>

<!–循環(huán)顯示相關(guān)信息–>

</div>

<!–分頁(yè)樣式–>

{include file='page.htm'}

<script>

//分頁(yè)js賦值

listTable.recordCount = {$record_count};

listTable.pageCount = {$page_count};

{foreach from=$filter item=item key=key}

listTable.filter.{$key} = '{$item}';

{/foreach}

</script>


贊 (

發(fā)表評(píng)論