<% DocID=trim(request("ID")) Body=trim(crequest("body")) Remark=trim(crequest("Remark")) confirmer=trim(crequest("confirmer")) collate=trim(crequest("collate")) FromID=session("LoginID") ConfirmerID=GetTableValue("tblUser","ID","Name",Confirmer) CollateID=GetTableValue("tblUser","ID","Name",Collate) if ConfirmerID <> "" then CurrentID=ConfirmerID elseif CollateID <>"" then CurrentID=CollateID end if if CurrentID="" then response.write "您没有输入核搞人或者校对人！" response.write "[返回]" oConn.close response.end end if IF DocID="" or FromID="" then response.write "失效，请重新登录！" oConn.close response.end end if FromName=GetTableValue("tblUser","Name","ID",FromID) set rs=server.createobject("adodb.recordset") sql="select * from tblDoc where ID="& DocID rs.open sql,oConn if not rs.eof then OriginalID=trim(rs("FromID")) end if rs.close set rs=nothing UpdateDoc (DocID) response.write "

## 您的批复已经正确提交，谢谢！

" response.write "" oConn.close response.end Sub UpdateDoc(ID) sql="Update tblDoc set Body2='"&body&"',remark2='"& Remark &"',CurrentID="& CurrentID &",ConfirmerID="&ConfirmerID&",CollateID="&CollateID&",Times='"&now()&"' where ID="& ID 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=trim(Rstmp(Field)) else GetTableValue="" end if Rstmp.close set RsTmp = Nothing else GetTableValue="" end if End Function %>