<%@ Language=VBScript %> <% If session("agentusername")="" Then ef=True ec="授权非法,有可能是超时造成的。" ElseIf trim(Request.Form ("title"))="" and Request("op")="" Then ef=True ec="标题没填!" ElseIf trim(Request.Form ("con"))="" and Request("op")="" Then ef=True ec="内容没填!" elseIf checkscript(Request.Form ("title")) Then ef=True ec="标题有非法字符!如<>script" elseIf checkscript(Request.Form ("con")) Then ef=True ec="内容有非法字符!如<>script" ElseIf Request("id")<>"" and not IsNumeric(Request("id")) Then ef=True ec="编号必须是数字" ElseIf Request.Form ("Submit")="修改" and request.Form ("id")="" Then ef=True ec="编号ID没填!" ElseIf Request("type1")<>"" and not IsNumeric(Request("type1")) Then ef=True ec="编号必须是数字" end if if not ef then Set conn=Server.CreateObject("ADODB.Connection") conn.Open Application("FreeHostDBlink") Set ds = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_online_aws where id='"&Request("id")&"' and agent1='"&session ("agentusername")&"'" ds.Open Sql,conn,1,3 if Request("Submit")="继续发表" and ds.Eof then ef=True ec="没找到要继续发表的ID!" end if end if if not ef Then Dim sendmailtoadmin sendmailtoadmin=false if Request("Submit")<>"继续发表" And Request("Submit")<>"again" then ds.AddNew ds("username")=session("agentusername") ds("title")=trim(trim(Request.Form ("title"))) ds("con")=trim(Request.Form ("con")) ds("status")="新问题" ds("agent1")=session("agentusername") ds("agent2")=session("agentusername")'这个设置会提交给管理员。 sendmailtoadmin=true else if Request("op")<>"close" then 'ds("username")=session("username") 'ds("title")=trim(trim(Request.Form ("title"))) ds("con")=ds("con")&vbcrlf&"-------"&session("agentusername")&" 回复("&now&")-------"&vbcrlf&(Request.Form ("con")) ds("status")="已回复" If ds("username")=session("agentusername") Then ds("status")="待回复" sendmailtoadmin=true End if else ds("status")="已结束" end if end if ds("posttime")=NOW ds("type1")=Request.Form ("type1") If sendmailtoadmin=True Then If Not IsNull(Application("admemail")) Then ret=SendJmail(ds("username"),Application("Mail_from"),Application("Mail_fromName"),Application("admemail"),"新问题:"&ds("title"),now&" 代理发布的新问题,代理名为:"&ds("username")&" 内容为:"&trim(Request.Form ("con")),Application("Mail_fromServer"),Application("Mail_fromPass"),Application("Mail_emailport"),Application("Mail_EnableSsl")) End if End if if Request("op2")="del" then ds.delete end if ds.Update ds.Close set ds=nothing conn.Close set conn=nothing If sendmailtoadmin=True Then Application("noticemesg")=Application("noticemesg")&" 代理提交了新的问题。" Response.Redirect "aws.asp" end if if ef then Response.Redirect "e.asp?e="&ec end if%>