query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid"); while($mr=$empire->fetch($msql)) { $select=""; if($mr[mid]==$modid) { $select=" selected"; } $modselect.=""; } $totalquery="select count(*) as total from {$dbtbpre}enewsclass".$add; $query="select * from {$dbtbpre}enewsclass".$add; $num=$empire->gettotal($totalquery);//取得总条数 //排序 $myorder=(int)$_GET['myorder']; if($myorder==1) { $doorder="myorder"; } else { $doorder="classid"; } $orderby=(int)$_GET['orderby']; if($orderby==1) { $doorderby=""; $ordername="降序"; $neworderby=0; } else { $doorderby=" desc"; $ordername="升序"; $neworderby=1; } $orderidlink="ID"; $ordertwolink="顺序"; $search.="&myorder=$myorder&orderby=$orderby"; $query=$query." order by ".$doorder.$doorderby." limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); ?>
位置: 管理栏目 |