<% DocID=trim(request("ID")) Body=rtrim(request("Suggest")) FromID=session("LoginID") IF DocID="" or FromID="" then response.write "失效，请重新登录！" oConn.close response.end end if FromName=GetTableValue("tblUser","Name","ID",FromID) AddSuggest() response.write "

## 您的催办处理已经正确提交，谢谢！

" response.write "" oConn.close response.end Sub AddSuggest() sql="INSERT INTO tblDocPress(FromID, DocID,FromName,Body) VALUES(" & FromID & _ ","& DocID & _ ",'" & FromName & _ "','"& body & _ "');" '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=trim(Rstmp(Field)) else GetTableValue="" end if Rstmp.close set RsTmp = Nothing else GetTableValue="" end if End Function %>