fetch1("select ztid from {$dbtbpre}enewszt where ztid='$ztid'"); if(!$ztr['ztid']) { printerror('EmptyZtInfoZid','history.go(-1)'); } $zids=eArrayReturnInids($zid); DelZtInfo("zid in (".$zids.") and ztid='$ztid'"); insert_dolog("ztid=$ztid");//操作日志 printerror('DelZtInfoSuccess',EcmsGetReturnUrl()); } //转移专题信息 function DoMoveZtInfo($add,$userid,$username){ global $empire,$dbtbpre; //CheckLevel($userid,$username,$classid,"zt"); $ztid=(int)$add['ztid']; $to_cid=(int)$add['to_cid']; $zid=$add['zid']; $count=count($zid); if(!$count||!$ztid) { printerror('EmptyZtInfoZid','history.go(-1)'); } if(!$to_cid) { printerror('EmptyMoveZtInfoCid','history.go(-1)'); } $ztr=$empire->fetch1("select ztid from {$dbtbpre}enewszt where ztid='$ztid'"); if(!$ztr['ztid']) { printerror('EmptyZtInfoZid','history.go(-1)'); } $zids=eArrayReturnInids($zid); $sql=$empire->query("update {$dbtbpre}enewsztinfo set cid='$to_cid' where zid in (".$zids.") and ztid='$ztid'"); if($sql) { insert_dolog("ztid=$ztid&to_cid=$to_cid");//操作日志 printerror('MoveZtInfoSuccess',EcmsGetReturnUrl()); } else {printerror("DbError","history.go(-1)");} } //推荐专题信息 function DoGoodZtInfo($add,$userid,$username){ global $empire,$dbtbpre; //CheckLevel($userid,$username,$classid,"zt"); $ztid=(int)$add['ztid']; $doing=(int)$add['doing']; $isgood=(int)$add['isgood']; $zid=$add['zid']; $count=count($zid); if(!$count||!$ztid) { printerror('EmptyZtInfoZid','history.go(-1)'); } $ztr=$empire->fetch1("select ztid from {$dbtbpre}enewszt where ztid='$ztid'"); if(!$ztr['ztid']) { printerror('EmptyZtInfoZid','history.go(-1)'); } $zids=eArrayReturnInids($zid); $sql=$empire->query("update {$dbtbpre}enewsztinfo set isgood='$isgood' where zid in (".$zids.") and ztid='$ztid'"); if($sql) { insert_dolog("ztid=$ztid&isgood=$isgood");//操作日志 printerror('GoodZtInfoSuccess',EcmsGetReturnUrl()); } else {printerror("DbError","history.go(-1)");} } //修改专题信息发布时间 function DoEditZtInfoTime($add,$userid,$username){ global $empire,$dbtbpre; //CheckLevel($userid,$username,$classid,"zt"); $ztid=(int)$add['ztid']; $zid=$add['dozid']; $count=count($zid); $newstime=$add['newstime']; if(!$count||!$ztid) { printerror('EmptyZtInfoZid','history.go(-1)'); } $ztr=$empire->fetch1("select ztid from {$dbtbpre}enewszt where ztid='$ztid'"); if(!$ztr['ztid']) { printerror('EmptyZtInfoZid','history.go(-1)'); } for($i=0;$i<$count;$i++) { $dozid=(int)$zid[$i]; $donewstime=$newstime[$i]?to_time($newstime[$i]):time(); $empire->query("update {$dbtbpre}enewsztinfo set newstime='$donewstime' where zid='$dozid' and ztid='$ztid'"); } insert_dolog("ztid=$ztid");//操作日志 printerror('EditZtInfoTimeSuccess',EcmsGetReturnUrl()); } $enews=$_POST['enews']; if(empty($enews)) {$enews=$_GET['enews'];} if($enews) { hCheckEcmsRHash(); } if($enews=="DoDelZtInfo")//删除专题信息 { DoDelZtInfo($_POST,$logininid,$loginin); } elseif($enews=="DoMoveZtInfo")//转移专题信息 { DoMoveZtInfo($_POST,$logininid,$loginin); } elseif($enews=="DoGoodZtInfo")//推荐专题信息 { DoGoodZtInfo($_POST,$logininid,$loginin); } elseif($enews=="DoEditZtInfoTime")//修改专题信息发布时间 { DoEditZtInfoTime($_POST,$logininid,$loginin); } else {} //专题 if(!$ztid) { printerror('ErrorUrl',''); } $ztr=$empire->fetch1("select ztid,ztname from {$dbtbpre}enewszt where ztid='$ztid'"); if(!$ztr['ztid']) { printerror('ErrorUrl',''); } $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=intval($public_r['hlistinfonum']);//每页显示 $page_line=12;//每页显示链接数 $offset=$page*$line;//总偏移量 $add=''; $search='&ztid='.$ztid.$ecms_hashur['ehref']; //专题子类 $cid=(int)$_GET['cid']; if($cid) { $add.=" and cid='$cid'"; $search.='&cid='.$cid; } //系统模型 $mid=(int)$_GET['mid']; if($mid) { $add.=" and mid='$mid'"; $search.='&mid='.$mid; } //栏目 $classid=(int)$_GET['classid']; if($classid) { $add.=' and '.($class_r[$classid][islast]?"classid='$classid'":"(".ReturnClass($class_r[$classid][sonclass]).")"); $search.='&classid='.$classid; } //推荐 $isgood=(int)$_GET['isgood']; if($isgood) { $add.=" and isgood>0"; $search.='&isgood='.$isgood; } //排序 $myorder=(int)$_GET['myorder']; $search.='&myorder='.$myorder; if($myorder==1) { $doorder='zid desc'; } elseif($myorder==2) { $doorder='zid asc'; } elseif($myorder==3) { $doorder='newstime desc'; } elseif($myorder==4) { $doorder='newstime asc'; } else { $doorder='zid desc'; } $totalquery="select count(*) as total from {$dbtbpre}enewsztinfo where ztid='$ztid'".$add; $num=$empire->gettotal($totalquery); $query="select zid,cid,id,classid,mid,isgood,newstime from {$dbtbpre}enewsztinfo where ztid='$ztid'".$add; $query=$query." order by ".$doorder." limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); //专题子类 $csql=$empire->query("select cid,cname from {$dbtbpre}enewszttype where ztid='$ztid'"); $ztcs=''; $moveztcs=''; while($cr=$empire->fetch($csql)) { $selected=''; if($cr['cid']==$cid) { $selected=' selected'; } $ztcs.=""; $moveztcs.=""; } ?> 管理专题信息
位置:专题: > 管理专题信息
  
> 推荐

fetch($sql)) { //专题子类 $cname='---'; if($zr['cid']) { $cr=$empire->fetch1("select cname from {$dbtbpre}enewszttype where cid='$zr[cid]'"); $cname="$cr[cname]"; } $tbname=$class_r[$zr[classid]]['tbname']; if(!$tbname) { continue; } $index_r=$empire->fetch1("select checked from {$dbtbpre}ecms_".$tbname."_index where id='$zr[id]'"); $infotb=ReturnInfoMainTbname($tbname,$index_r['checked']); $r=$empire->fetch1("select id,classid,isurl,isqf,havehtml,newstime,truetime,lastdotime,titlepic,title,titleurl from ".$infotb." where id='$zr[id]'"); $addecmscheck=''; if($index_r['checked']) { $addecmscheck='&ecmscheck=1'; } //状态 $st=''; if($zr['isgood'])//推荐 { $st.="[推".$zr['isgood']."]"; } $oldtitle=$r[title]; $r[title]=stripSlashes(sub($r[title],0,36,false)); //时间 $truetime=date("Y-m-d H:i:s",$r[truetime]); $lastdotime=date("Y-m-d H:i:s",$r[lastdotime]); //审核 if(empty($index_r['checked'])) { $checked=" title='未审核' style='background:#99C4E3'"; $titleurl="../ShowInfo.php?classid=$r[classid]&id=$r[id]".$addecmscheck.$ecms_hashur['ehref']; } else { $checked=""; $titleurl=sys_ReturnBqTitleLink($r); } //取得类别名 $do=$r[classid]; $dob=$class_r[$r[classid]][bclassid]; //标题图片 $showtitlepic=""; if($r[titlepic]) { $showtitlepic=""; } $myid=$r['id']; ?>
专题子类
ID
标题
发布时间
操作
>

栏目:'> > '>
" size="22">
[" target="_blank">修改]
说明:信息是按发布时间排序,如果要改顺序可以修改发布时间,发布时间设置空则改为当前时间。