<!--#include file="conn.asp"-->
<!--#include file="fuction.asp"-->
<%
if request.form("name")="" then
response.Write "<script LANGUAGE='javascript'>alert('Please fill in your name!');history.go(-1);</script>"
response.End
end if
if request.form("email")="" then
response.Write "<script LANGUAGE='javascript'>alert('Please fill in your email!');history.go(-1);</script>"
response.End
end if
if request.form("shp")="" then
response.Write "<script LANGUAGE='javascript'>alert('Please fill in the product name!');history.go(-1);</script>"
response.End
end if
if request.form("content")="" then
response.Write "<script LANGUAGE='javascript'>alert('Please fill content!');history.go(-1);</script>"
response.End
end if

if request.form("temp")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('非法操作!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
'由于表单被重复提交(标志为session("antry")为空)引起
else
iname=nosql(request.Form("name"))
iqq=nosql(request.Form("qq"))
iemail=nosql(request.Form("email"))
iurl=nosql(request.form("url"))
ishp=nosql(request.Form("shp"))
isex=nosql(request.form("sex"))
icontent=nosql(request.form("content"))
%>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_qhdj where (id is null)",conn,1,3
rs.addnew
rs("name")=iname
rs("qq")=iqq
rs("email")=iemail
rs("url")=iurl
rs("shp")=ishp
rs("sex")=isex
rs("content")=icontent
rs("time")=now()
rs.update
rs.close
set rs=nothing
session("antry")="" '提交成功，清空session("antry")，以防重复提交！！
response.write "<p align=center><font color=red>Done!</font>"
response.write "<meta http-equiv=""refresh"" content=""1;url=qhdj.asp"">"
end if
%>