<!--#include file="system/Conn.asp"--><%

q=Left(HTMLEnCode(Request.Form("zxnr")),2000)
email=Left(TextEnCode(Request.Form("yx")),250)

If q="" Then
Conn.Close:Set Conn=Nothing
Response.Write "<script>alert('请输入您要咨询的内容');history.back()</script>"
Response.End
End If

cpid=Request.Form("cp")
If cpid="" Or Not IsNumeric(cpid) Then
Conn.Close:Set Conn=Nothing
Response.Write "<script>alert('灰法操作！');history.back()</script>"
End If

yzm=Request.Form("yzm")
If yzm="" Or yzm<>Session("tyzx") Then
Conn.Close:Set Conn=Nothing
Response.Write "<script>alert('验证码有误');history.back()</script>"
Response.End
End If





Conn.ExeCute("INSERT INTO qa(cpid,q,email,addip) VALUES ("& cpid &",'"& q &"','"& email &"','"& GetIp &"')")

Session("tyzx")=""

Response.Write "<script>alert('提交成功，需等待管理员审核后才可显示，感谢您的支持');location.href='p.asp?id="& cpid &"'</script>"


Conn.Close:Set Conn=Nothing
%>