}
//adoconn hack start
$count = $conn->exec($tmpQuery) or die(print_r($conn->ErrorInfo()));
$this->tPage = ceil($count / $this->limit); // caculate the total page
//$this->tPage = $count;
}
/**
* 設置翻頁參數
* @param string $pvar 翻頁參數
*/
function SetPageVar($pvar = 'p') {
// set type turnpage parameter (E.G. http://www.aa.com/index.php?p=1)
$this->pVar = $pvar;
}
/**
* 返回總行數
* @return int
*/
function GetTotalRow() {
return $this->tRow;
}
/**
* 返回翻頁參數
* @return string
*/
function GetPageVar() {
return $this->pVar;
}
/**
* 返回當前頁數
* @return int
*/
function GetCurrentPage() {
if($_GET[$this->pVar])
return $_GET[$this->pVar];
else
return 1;
}
/**
* 返回總頁數
* @return int
*/
function GetTotalPage() {
return $this->tPage;
}
/**
* 返回每頁顯示條數
* @return int
*/
function GetLimit() {
return $this->limit;
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 实例 // if gas_ip else page function limit echo href |
注册
个人空间
