<?php
//if(!$pageID)$pageID=1;
include('Pager.php');
$params['itemData'] = range(1, 180);
$pager =& new Pager($params);
$data = $pager->getPageData();
$links = $pager->getLinks("<<上頁","下頁>>");
list($from, $to) = $pager->getOffsetByPageId();
?>
<html>
<body>
<table border="0" width="100%">
<tr>
<td colspan="3" align="center">
顯示 [<?=$from?> - <?=$to?>] 條記錄,共<?=$pager->_totalItems?>條記錄 <br />
<?=$links['pages']?>
</td>
</tr>
<tr>
<td><nobr><?=$links['back']?></nobr></td>
<td align="center" width="100%"> </td>
<td align="right"><nobr><?=$links['next']?></nobr></td>
</tr>
<tr>
<td colspan="3">
<pre><?print_r($data)?></pre>
</td>
</tr>
</table>
</body>
</html>