query("insert into {$dbtbpre}enewsworkflow(wfname,wftext,myorder,addtime,adduser,canedit) values('$add[wfname]','$add[wftext]','$add[myorder]','$addtime','$username','$add[canedit]');"); $wfid=$empire->lastid(); if($sql) { //操作日志 insert_dolog("wfid=".$wfid."
wfname=".$add[wfname]); printerror("AddWorkflowSuccess","AddWf.php?enews=AddWorkflow".hReturnEcmsHashStrHref2(0)); } else {printerror("DbError","history.go(-1)");} } //修改工作流 function EditWorkflow($add,$userid,$username){ global $empire,$dbtbpre; $wfid=(int)$add[wfid]; if(!$wfid||!$add[wfname]) { printerror('EmptyWorkflow','history.go(-1)'); } //验证权限 CheckLevel($userid,$username,$classid,"workflow"); $add[myorder]=(int)$add[myorder]; $add['wfname']=hRepPostStr($add['wfname'],1); $add['wftext']=hRepPostStr($add['wftext'],1); $add['canedit']=(int)$add['canedit']; $sql=$empire->query("update {$dbtbpre}enewsworkflow set wfname='$add[wfname]',wftext='$add[wftext]',myorder='$add[myorder]',canedit='$add[canedit]' where wfid='$wfid'"); if($sql) { //操作日志 insert_dolog("wfid=".$wfid."
wfname=".$add[wfname]); printerror("EditWorkflowSuccess","ListWf.php".hReturnEcmsHashStrHref2(1)); } else {printerror("DbError","history.go(-1)");} } //删除工作流 function DelWorkflow($add,$userid,$username){ global $empire,$dbtbpre; $wfid=(int)$add[wfid]; if(!$wfid) { printerror('NotDelWorkflowid','history.go(-1)'); } //验证权限 CheckLevel($userid,$username,$classid,"workflow"); $r=$empire->fetch1("select wfname from {$dbtbpre}enewsworkflow where wfid='$wfid'"); $sql=$empire->query("delete from {$dbtbpre}enewsworkflow where wfid='$wfid'"); $sql2=$empire->query("delete from {$dbtbpre}enewsworkflowitem where wfid='$wfid'"); if($sql&&$sql2) { //操作日志 insert_dolog("wfid=".$wfid."
wfname=".$r[wfname]); printerror("DelWorkflowSuccess","ListWf.php".hReturnEcmsHashStrHref2(1)); } else {printerror("DbError","history.go(-1)");} } $enews=$_POST['enews']; if(empty($enews)) {$enews=$_GET['enews'];} if($enews) { hCheckEcmsRHash(); } if($enews=="AddWorkflow")//增加工作流 { AddWorkflow($_POST,$logininid,$loginin); } elseif($enews=="EditWorkflow")//修改工作流 { EditWorkflow($_POST,$logininid,$loginin); } elseif($enews=="DelWorkflow")//删除工作流 { DelWorkflow($_GET,$logininid,$loginin); } $search=$ecms_hashur['ehref']; $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=25;//每页显示条数 $page_line=12;//每页显示链接数 $offset=$page*$line;//总偏移量 $query="select wfid,wfname,addtime,adduser from {$dbtbpre}enewsworkflow"; $totalquery="select count(*) as total from {$dbtbpre}enewsworkflow"; $num=$empire->gettotal($totalquery);//取得总条数 $query=$query." order by myorder,wfid desc limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); $url="管理工作流"; ?> 工作流
位置:

fetch($sql)) { ?>
ID
工作流名称
增加者
增加时间
流程节点
操作
管理节点
[修改] [删除]