帝国CMS批量修改审核文章未审核状态,批量自定义指定文件上线时间!
用法:
后台增加自定义页面 PHP CODE:
$infouptime=to_time('2016-06-1210:50:19');//上线时间$sql=$empire->query("select*from{$dbtbpre}ecms_".$class_r[2][tbname]."whereidBETWEEN1and100");while($r=$empire->fetch($sql)){$id=$r[id];$classid=$r[classid];$nihao=$empire->query("update{$dbtbpre}ecms_".$class_r[2][tbname]."_indexsetchecked=0whereid=$r[id]");MoveCheckInfoData($class_r[2][tbname],1,$r['stb'],"id=$r[id]");$pubid=ReturnInfoPubid($classid,$id);$copyids='';$num=$empire->gettotal("selectcount(*)astotalfrom{$dbtbpre}enewsinfovotewherepubid='$pubid'limit1");if($num)//修改{$empire->query("update{$dbtbpre}enewsinfovotesetcopyids='$copyids',infouptime='$infouptime'wherepubid='$pubid'limit1");}else//增加{$intime=$empire->query("insertinto{$dbtbpre}enewsinfovote(pubid,id,classid,infouptime,copyids)values('$pubid','$id','$classid','$infouptime','$copyids');");}AddClassInfos($classid,'','-1');}