|
|
$content = file("data/housedataNew");
$Int_Page_count =count($content);
$page=$_GET['page'];
if ($page=="" or !isset($page) or $page <1)
{
$page=1;
}
$One_Page_Line=15;
$Int_Page_Num=ceil($Int_Page_count/$One_Page_Line);
if ($page>$Int_Page_Num) $page=$Int_Page_Num;
$Begin_Line=($page-1)*$One_Page_Line;
for ($i=$Begin_Line,$j=0; $i< ($Begin_Line+$One_Page_Line);$i++,$j++)
{
if ($content[$i]==null or strlen(trim($content[$i]))==0)
break;
$pieces=explode("|",$content[$i]);
if ($j%3==0)
echo "";
echo "
 |
".$pieces[1];
if (trim($pieces[9])=="待定")
echo "";
else
echo "";
echo " ".$pieces[9]." ";
echo "
基价:".$pieces[10]."元/天 |
| ";
if ($j%3==2)
echo " ";
}
$previousPage=$page-1;
$nextPage=$page+1;
?>
首页 前页 后页 尾页 echo "第 $page 页 共 $Int_Page_Num 页" ?> |
| |
|