📄 down.asp.bak
字号:
<%option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../common/commonpage.inc" -->
<!-- #include file="../include/message.inc" -->
<!-- #include file="../flowmgr/state.inc" -->
<%
'call CheckSecurity()
dim fid : fid = GetParam("fid")
if IsEmpty(fid) then
Response.Clear()
Server.Transfer("sign.asp")
Response.End
end if
dim sid,sid_all
'If it's the end step
dim crs : set crs=new CRecordset
dim strSQL
strSQL="select count(*) num from t_flow_step where flow_id=" & fid
dim rs : set rs = crs.open(dbLocal,strSQL)
sid_all=Rs("num")
rs.close()
strSQL="select cur_step from t_cur_step where flow_id=" & fid
set rs = crs.open(dbLocal,strSQL)
sid=Rs("cur_step")
rs.close()
If sid=sid_all Then
'It's the end
FlowStateChange fid,4
FlowNewTask fid,1
%>
<p align=center>********流程已完成*********
<%
' response.clear()
' Response.write("<script language=javascript>window.location.href=sign.asp</script>")
response.end
Else
' Update step to up step
strSQL="update t_cur_step set cur_step=cur_step+1"
strSQL=strSQL & " where flow_id=" & fid
dim sError : sError=ExecuteSQL(dbLocal,strSQL)
if (sError <>"")Then
response.write("<script language=javascript>alert(""出错啦"")</script>")
response.end
End If
'output
strSQL="select cur_step from t_cur_step where flow_id=" & fid
set rs = crs.open(dbLocal,strSQL)
%>
<br>
<p align=center>********成功转入下一步*************
<table cellspacing=0 cellpadding=0 width=400px border=0 align=center>
<tr height=80px><td align=center>当前的步骤序号为<b>第<%=Rs("cur_step")%>步</b></td></tr>
</table>
<%
FlowNewTask fid,0
End If
crs.Close()
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<script language="VBScript">
Sub btnSubmit_OnClick()
if document.all.flowform.opinion.value = "" then
msgbox "请填写审批意见!"
exit sub
end if
document.all.flowform.submit()
End Sub
</script>
</head>
<br>
<br>
</body>
</html>
<%
'===========================================================
' Useful Functions
'-----------------------------------------------------------
Sub FlowNewTask(flowId, arg)
Dim op
Dim flowName
Dim authorId
dim crs,rs
set crs=New CRecordset
strSQL="select flow_name,flow_author_id from t_flow where flow_id=" & flowId
set rs=crs.open(dbLocal,strSQL)
flowName=Rs("flow_name")
authorId=Rs("flow_author_id")
If arg=0 Then
'next step
rs.close()
strSQL="select step_op_person from t_flow_step a,t_cur_step b "
strSQL=strSQL & "where a.flow_id=b.flow_id and a.flow_id =" & flowId & " and a.step_no = b.cur_step"
set rs=crs.open(dbLocal,strSQL)
op=Rs("step_op_person")
' strSQL="proc_NewTask '请审批流程', '流程名:" & flowName & "', '" & authorId & "','','','" & op & "', 1,'',''"
call CommonSendMsg(MSG_APPROVE,"","请审批如下流程","流程名称:"& flowName,authorId,op)
' DBQuery(strSQL)
'r=oRs(0)
'if r<0 Then
' response.write("Error Happen, errorcode=" & r)
'End If
Else
'end
' strSQL= "proc_NewMessage 1,'如下流程审批结束','流程名:" & flowName & "','"& authorId & "','"& authorId &"',0 "
call CommonSendMsg(MSG_APPROVE,"","如下流程审批结束","流程名称:"& flowName,GetEmpSerial,authorId)
'response.write(strSQL)
'response.end
'DBQuery(strSQL)
'response.end
'r=oRs(0)
'if r<0 Then
' response.write("Error Happen, errorcode=" & r)
'End If
End If
crs.close()
End Sub
'==============================================================================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -