%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'response.Write session("GetCode")
'response.Write("
")
'response.Write request("yz")
'response.End()
if Request("gb")="中文版" then
'验证验证码
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
'判断验证码
if not TestCaptcha("ASPCAPTCHA", Request.Form("captchacode")) then
response.Write ""
response.End()
end if
end if
%>
<%
sqlUsername = "admin"
sqlPassword = "www.wxweb.cn"
DB="../gl/data_@#$%DB/databs.mdb"
set conn=server.createobject("adodb.Connection")
connstr="provider=Microsoft.Jet.OLEDB.4.0; User ID = " & SqlUsername & "; Jet OleDB:Database Password = " & SqlPassword & "; Data Source=" & Server.MapPath(DB)
'如果服务器是老的ACCESS,请用下面的连接
'connstr= "driver={Microsoft Access Driver(*.mdb)};dbq=" & Server.MapPath(DB)
conn.Open connstr
%>
<%dim rs,sql
function invert(str)
invert=replace(replace(replace(str,"<","<"),">",">")," "," ")
invert=replace(replace(replace(replace(invert,"[img]","
"),"[red]",""),"[blue]","")
invert=replace(replace(replace(replace(invert,"[/img]",">"),"[/b]",""),"[/red]",""),"[/blue]","")
end function
set rs=server.createobject("adodb.recordset")
sql="select * from Feedback"
rs.open sql,conn,1,3
rs.addnew
rs("userzhuti")=Request("zhuti")
rs("username")=Request("name")
rs("usermail")=Request("email")
rs("usertel")=Request("tel")
rs("oicq")=Request("oicq")
rs("userAddress")=Request("Edate")
rs("changci")=Request("changci")
rs("face")=Request("face")
rs("comments")=invert(request("comments"))
rs("gb")=Request("gb")
if request("fax")<>"" then
rs("Userfax")=request("fax")
else
rs("Userfax")="没有填写"
end if
rs("userip")=Request.ServerVariables("REMOTE_HOST")
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
if Request("gb")="中文版" then
response.Write ""
end if
if Request("gb")="英文版" then
response.Write ""
end if
response.end
%>