//显示专题头条开始
$db=new DB_sql;
$db->connect();
$tablename="ztlilin ";
$pageSize=6;
$goPage=$goPage;
$selcetFields="* ";
$sqlConditions="and status='Y'";
if (trim($sqlConditions)!="") {$sqlConditions=substr($sqlConditions,3);}
$sqlOrders=" group by id order by id desc";
$url="$PHP_SELF?$oriVARS"; //===
//返回第一条记录位置、总行数、当前页码和总页码
list($firstRow,$totleRows,$currentPage,$totalPages)=
divpage($tablename,$sqlConditions,$totleRows,$pageSize,$goPage);
//建立并执行查询语句
$strQuery="select $selcetFields from $tablename ";
if (trim($sqlConditions)!=""){$strQuery.="where $sqlConditions ";}
if (trim($sqlOrders)!=""){$strQuery.=" $sqlOrders";}
$strQuery .=" limit $firstRow, $pageSize ";
$db->query($strQuery);
while ($db->next_record()){
list($id,$zttitle,$img_name,$img_name1,$ztjj,$ztabstract,$status)=$db->Record;
?>
";}?>
|
[进入专题报道]
|
}?>
$pageSize){divpage_link($url,$currentPage,$totalPages);} //建立分页连接显示?>
|
|