query("insert into ".GetDoTemptb("enewsbqtemp",$gid)."(tempname,temptext,modid,showdate,listvar,subnews,rownum,classid,docode) values('$tempname','".eaddslashes2($temptext)."',$modid,'".eaddslashes($showdate)."','".eaddslashes2($listvar)."',$subnews,$rownum,$classid,'$docode')"); $lastid=$empire->lastid(); //备份模板 AddEBakTemp('bqtemp',$gid,$lastid,$tempname,$temptext,$subnews,0,$listvar,$rownum,$modid,$showdate,0,$classid,$docode,$userid,$username); if($sql) { //操作日志 insert_dolog("tempid=".$lastid."
tempname=".$tempname."&gid=$gid"); printerror("AddBqTempSuccess","AddBqtemp.php?enews=AddBqtemp&gid=$gid".hReturnEcmsHashStrHref2(0)); } else {printerror("DbError","history.go(-1)");} } //------------------------修改标签模板 function EditBqtemp($tempid,$tempname,$modid,$subnews,$rownum,$showdate,$temptext,$listvar,$add,$userid,$username){ global $empire,$dbtbpre; $tempid=(int)$tempid; if(!$tempname||!$temptext||!$modid||!$listvar||!$tempid) {printerror("EmptyTempname","history.go(-1)");} //操作权限 CheckLevel($userid,$username,$classid,"template"); $classid=(int)$add['classid']; $tempname=hRepPostStr($tempname,1); $temptext=RepPhpAspJspcode($temptext); $listvar=RepPhpAspJspcode($listvar); if($add['autorownum']) { $rownum=substr_count($temptext,'