⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 savesuggest.htm

📁 全方面的OA管理程序代码
💻 HTM
字号:
<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
DocID=trim(request("ID"))
StepID=trim(request("StepID"))
Body=replace(rtrim(request("Suggest")),"'","''")
Body2=replace(rtrim(request("body")),"'","''")
FromID=session("LoginID")
IF DocID="" or FromID="" then
	response.write "失效,请重新登录!"
	oConn.close
	response.end
end if
FromName=GetTableValue("tblUser","Name","ID",FromID)
StepName=GetTableValue("tblDocStep","Name","ID",StepID)
oldBody=GetTableValue("tblDoc","body2","ID",DocID)

set rs=server.createobject("adodb.recordset")
sql="select * from tblDoc where ID="& DocID
rs.open sql,oConn
if not rs.eof then
	Recieved=trim(rs("Recieved"))&""
	CurrentID=TRIM(rs("CurrentID"))
	CurrentStep=TRIM(rs("CurrentStep"))
	CheckIDs=trim(rs("CheckIDs"))&""
	CheckStepIDs=trim(rs("CheckStepIDs"))&""
	ThroughStep=trim(rs("ThroughStep"))
end if
rs.close
set rs=nothing

arrOldCheckIDs=split(CheckIDs,".")
CheckIDs=replace(CheckIDs,".",",")
arrCheckIDs=split(CheckIDs,",")
arrCheckStepIDs=split(CheckStepIDs,",")

if cint(ThroughStep)<=cint(ubound(arrCheckIDs)) then
	newCurrentID=arrCheckIDs(ThroughStep)
else
	newCurrentID=0
end if

temp=0
nn=0
for i=0 to ubound(arrOldCheckIDs)
	strtmp=arrOldCheckIDs(i)
	arrtmp=split(strtmp,",")
	bExit=false
	if not isempty(arrtmp) then
		for j=0 to ubound(arrtmp)
		nn=cint(nn)+1
		temp=i
		if trim(arrtmp(j))=trim(CurrentID) and (nn=cint(ThroughStep)+1 or nn=cint(ThroughStep)) then
			if cint(j)>=cint(ubound(arrtmp)) then
				temp=temp+1
			end if
			bExit=true
			exit for
		end if
		next
	end if
	if bExit then
	exit for
	end if
next

if cint(temp)<=cint(ubound(arrOldCheckIDs)) and cint(temp)<=cint(ubound(arrCheckStepIDs)) then
	newCurrentStep=arrCheckStepIDs(cint(temp))
else
	newCurrentStep=0
end if

AddSuggest()
oConn.execute "update tblDoc set body='"&oldBody&"',body2='"&body2&"',PreID="& CurrentID &",CurrentID="& newCurrentID &",PreStep="&CurrentStep&",CurrentStep="& newCurrentStep &",Times='"&now()&"' where ID="& DocID

response.write "<h2>您的处理已经正确提交,谢谢!</h2><BR>"
response.write "<a href=main.htm><img src='../images/return.gif' border=0></a>"
oConn.close
response.end

Sub AddSuggest()
	sql="INSERT INTO tblDocSuggest(FromID, DocID,FromName,Body,StepID,StepName) VALUES(" & FromID & _
		","& DocID & _
		",'" & FromName & _
		"','"& body & _
		"',"& StepID & _
		",'"& StepName & _
		"');"		
		'response.write sql
		oConn.execute (sql)

end sub
Function GetTableValue(TableName,Field,ValueField,Value)
	if TableName<>"" and Value<>"" then
		Set RsTmp = Server.Createobject("Adodb.recordset")
		strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"='"& Value &"'"
		Rstmp.open strSql,oConn,1,1
		If not Rstmp.eof then
			GetTableValue=Rstmp(Field)
		else
			GetTableValue=""
		end if
		Rstmp.close
		set RsTmp = Nothing
	else
		GetTableValue=""
	end if
End Function
%>
</body>
</html>
<!--#include file="../inc/conn_close.htm"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -