$str.="<font color=999999> 尾页 </font>";
$str.="共".$this->pages."页";
$str.="您正浏览第<font color=red>".$this->page."</font>页";
return $str;
}
function getnums(){
return $this->nums;
}
function getonepage(){//每页实际条数
return $this->onepage;
}
function geti(){
return $this->i;
}
function getpage(){
return $this->page;
}
function getmess($error){//定制消息
echo"<center>$error</center>";
exit;
}
}
$pg=new pages();
$pg->getconnect("lei","sa","star");
$pg->gettotal("select count(*) as total from xs"); //连学生表求总数
$pg->getlist("select xs_name from xs order by xs_id",8,$page);
if($pg->getnums()!=0){
for($i=0;$i<$pg->getnums();odbc_fetch_row($pg->dlist),$i++);//同上
}
$i=0;
while(odbc_fetch_row($pg->dlist)){
$name=odbc_result($pg->dlist,"xs_name");
echo $name."<br>";
if($i==$pg->getonepage()){//跳出循环
break;
}
$i++;
}
echo$pg->getfanye();
?>
$str.="共".$this->pages."页";
$str.="您正浏览第<font color=red>".$this->page."</font>页";
return $str;
}
function getnums(){
return $this->nums;
}
function getonepage(){//每页实际条数
return $this->onepage;
}
function geti(){
return $this->i;
}
function getpage(){
return $this->page;
}
function getmess($error){//定制消息
echo"<center>$error</center>";
exit;
}
}
$pg=new pages();
$pg->getconnect("lei","sa","star");
$pg->gettotal("select count(*) as total from xs"); //连学生表求总数
$pg->getlist("select xs_name from xs order by xs_id",8,$page);
if($pg->getnums()!=0){
for($i=0;$i<$pg->getnums();odbc_fetch_row($pg->dlist),$i++);//同上
}
$i=0;
while(odbc_fetch_row($pg->dlist)){
$name=odbc_result($pg->dlist,"xs_name");
echo $name."<br>";
if($i==$pg->getonepage()){//跳出循环
break;
}
$i++;
}
echo$pg->getfanye();
?>
| 对此文章发表了评论 |
