fetch1("select tbname from {$dbtbpre}enewstable where ".$tbwhere); if(!$tbr['tbname']) { printerror('ErrorUrl',''); } $tbname=$tbr['tbname']; //字段 $sysf=',id,classid,onclick,newspath,keyboard,userid,username,istop,truetime,ismember,userfen,isgood,titlefont,isurl,filename,groupid,plnum,firsttitle,isqf,totaldown,havehtml,lastdotime,stb,ttid,'; $viewfr=$empire->fetch1("select f,fname from {$dbtbpre}enewsf where ".$tbwhere." and f='$viewf' and tbdataf=0 limit 1"); $changefr=$empire->fetch1("select f,fname from {$dbtbpre}enewsf where ".$tbwhere." and f='$changef' and tbdataf=0 limit 1"); if(!$viewfr[f]&&!strstr($sysf,','.$viewf.',')) { printerror('ErrorUrl',''); } if(!$changefr[f]&&!strstr($sysf,','.$changef.',')) { printerror('ErrorUrl',''); } if(strstr($sysf,','.$viewf.',')) { $viewfr[fname]=$viewf; } if(strstr($sysf,','.$changef.',')) { $changefr[fname]=$changef; } $form=RepPostVar($_GET['form']); if(empty($form)) { $form='add'; } $field=RepPostVar($_GET['field']); $add=''; //关键字 $keyboard=RepPostVar2($_GET['keyboard']); if(!empty($keyboard)) { $show=RepPostVar($_GET['show']); if($show==$viewf||$show==$changef) { $add=" where ".$show." like '%".$keyboard."%'"; } if($show==$changef) { $searchoptionselect=' selected'; } } $changeline=(int)$_GET['changeline']; if($changeline<1) { $changeline=2; } $search.="&viewf=$viewf&changef=$changef&form=$form&field=$field&show=$show&keyboard=$keyboard&changeline=$changeline"; if($viewf==$changef) { $searchoption=""; } else { $searchoption=""; } //分页 $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=50;//每页显示条数 $page_line=12;//每页显示链接数 $offset=$page*$line;//总偏移量 $query="select ".$viewf.",".$changef." from {$dbtbpre}ecms_".$tbname.$add; $totalquery="select count(*) as total from {$dbtbpre}ecms_".$tbname.$add; $num=$empire->gettotal($totalquery);//取得总条数 $query=$query." order by id desc limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); ?>
fetch($sql))
{
$i++;
if(($i-1)%$changeline==0||$i==1)
{
$class_text.=" ".stripSlashes($r[$viewf])." | ";
//分割
if($i%$changeline==0)
{
$class_text.="";
}
if($p==1)
{
$class_text.=" | |
=$returnpage?> |