do_query($strSQL); if($mysql->rownum==0){ page_redirect("未找到该类信息!请正确输入!",__dir_rel_web); exit; } $mod=$mysql->do_fetch_row(1); $smarty->assign("mod",$mod); $header_title[] = $mod['sortName']; $url_formate[] = $mod['id']; } else{ page_redirect($cfg_msg["err_request"],__dir_rel_web); exit; } $perpage=20; $p_no=empty($_GET["p"])?1:(int)$_GET["p"]; if(empty($p_no))$p_no=1; $limit=" limit ".($p_no-1)*$perpage.",".$perpage; $strSQL="select id,news_title,uptime from [#TAB]news where sortid='$pid' order by id desc {$limit}"; //echo $strSQL; $mysql->do_query($strSQL); $newsAry=array(); while($row=$mysql->do_fetch_row(1)){ //$row["cut_title"]=cnSubStr($row["news_title"],44,true)."…"; $newsAry[]=$row; } //$smarty->assign("newsAry",toErWeiAry($newsAry,4)); $smarty->assign("newsAry",$newsAry); $page=new Page($perpage,false); $page->css="newsPagelink"; $page->pageformat="%s"; $page->currentformat="%s"; $url_formate[] = '%s'; $page->is_rewrite = true; $page->url_formate = implode("-",$url_formate).".html"; $page->setPageSQL("select count(id) from [#TAB]news where sortid='$pid'"); $smarty->assign("page_html",$page->showPage($p_no,rebuild_query_string("p"),'p',true,true,2)); $smarty->assign("cfg_web_title",implode("_",array_reverse($header_title))); define("MY_PRO_SORT",true); include("./inc.php"); unset($_GET['pid']); smarty_end($smarty,$tpl,$cacheId); include("./include/footer.php"); ?>