<!--#include file="conn.asp"-->
<%
s_name=request.form("name")
s_add=request.form("add")
s_tel=request.form("tel")
s_ren=request.form("ren")
s_mail=request.form("mail")
s_message=request.form("message")
s_title=request.form("title")
s_class=request.form("class")
s_message=replace(s_message," "," ")
s_message=replace(s_message,chr(13)&chr(10),"<br>")
set rs=server.createobject("adodb.recordset")
'on error resume next
if trim(s_ren)="" or trim(s_tel)="" or trim(s_message)="" or trim(s_title)="" or trim(s_class)="" then
response.write ("<script>alert('反馈标题,反馈类型,联系人,电话,反馈意见必需要填写!');window.location.href='liuyan.asp'</script>")
response.end
else
sqlr="insert into message(usertitle,userren,usertel,usermessage,userclass,"
sqll="values('"&s_title&"','"&s_ren&"','"&s_tel&"','"&s_message&"','"&s_class&"'"
if s_name<>"" then
sqlr=sqlr & ",username"
sqll=sqll & ",'"&s_name&"'"
end if
if s_add<>"" then
sqlr=sqlr & ",useradd"
sqll=sqll & ",'"&s_add&"'"
end if
if s_mail<>"" then
sqlr=sqlr & ",usermail"
sqll=sqll & ",'"&s_mail&"'"
end if
end if
sql=sqlr & ")" & sqll & ")"
rs.open sql,conn,1,3
'if conn.errors.count>0 then
'response.write "添加失败,请输入正确的信息。"
'response.write "<a href='answer.asp'>返回重新添加</a>"
'else
response.write("<script>alert('提交成功,谢谢你提出的见意!');window.location.href='liuyan.asp';</script>")
response.end
'end if
%>
提示:
无法显示网页 | |
您要访问的网页有问题,无法显示。 | |
请尝试以下操作:
HTTP 500 - 内部服务器错误 |