<% function TestCaptcha(byval valSession, byval valCaptcha) dim tmpSession valSession = Trim(valSession) valCaptcha = Trim(valCaptcha) if (valSession = vbNullString) or (valCaptcha = vbNullString) then TestCaptcha = false else tmpSession = valSession valSession = Trim(Session(valSession)) Session(tmpSession) = vbNullString if valSession = vbNullString then TestCaptcha = false else valCaptcha = Replace(valCaptcha,"i","I") if StrComp(valSession,valCaptcha,1) = 0 then TestCaptcha = true else TestCaptcha = false end if end if end if end function Function chkMail(strEmail) '检查输入的Email是否正确 Dim objRegExp , blnValid Set objRegExp = New RegExp objRegExp.Pattern = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" chkMail= objRegExp.Test(strEmail) End Function 'if chkMail(aa)=true then response.write "Email格式正确" %> <% sub fferrors(message) Response.write " " Response.End end sub on error resume next dim WrForm(8),iyzcode,From_url,Serv_url,facelist_rs,IPAddress,rs if request("action") = "new" then if not TestCaptcha("ASPCAPTCHA2009", Request.Form("captchacode")) then fferrors("code error!") end if if chkMail(Request.Form("mail"))=false then message= "Email格式有误!" Response.write " " Response.End end if IPAddress=Request.ServerVariables("remote_addr") set rs=Server.CreateObject("ADODB.RecordSet") sql="select top 1 * from message" rs.open sql,conn,1,3 rs.Addnew rs("name")=Request.Form("name") rs("mail")=Request.Form("mail") rs("remark")=Request.Form("remark") rs("addtime")=now() rs.Update rs.close set rs=nothing if err.number = 0 then response.redirect("info.asp?info=1") response.end else response.redirect("info.asp?info=2") response.end end if end if %> 创意时代,联系方式
 

ce-age.com

 
 

联系我们

创意时代

电 话:
+86(0) 13918560569

传真:
+86(0) 21 62973758

邮 箱:
admin@ce-age.com

姓名:
*
邮箱:
*
内容:
*
验证码: *   看不清,换一个