<!--#include file="ESCMS_conn.asp" -->
<!--#include file="ESCMS_config.asp" -->


<%


call DBConnBegin()
Dim Shop_Pro,Shop_Number,Shop_Pay,Shop_User,Shop_photo,Shop_mail,Shop_Add,Shop_content,Shop_AutoID
Shop_Pro=Get_SafeStr(Request.Form("Shop_Pro"))
Shop_Number=Get_SafeStr(Request.Form("Shop_Number"))
Shop_Pay=Get_SafeStr(Request.Form("Shop_Pay"))
Shop_User=Get_SafeStr(Request.Form("Shop_User"))
Shop_photo=Get_SafeStr(Request.Form("Shop_photo"))
Shop_mail=Get_SafeStr(Request.Form("Shop_mail")) 
Shop_Add=Request.Form("Shop_Add")
Shop_content=Request.Form("Shop_content")
%> 
<%
if cstr(Session("GetCode"))<>cstr(Trim(Request("Shop_code"))) then
Go_Error("输入正确的验证码!")
elseif Shop_Pro="" then 
Go_Error("填写你要订购的产品！")
elseif Shop_User="" then
Go_Error("填写你的留言！")
elseif IsValidEmail(Shop_mail) = False then
Go_Error("请正确填写你的邮箱！")
elseif Shop_photo="" then
Go_Error("请正确填写您的电话！")
elseif Shop_Number="" then
Go_Error("请正确填写订购数量！")
elseif Shop_User="" then
Go_Error("请正确填写您的姓名！")
else 

Randomize()
Shop_AutoID=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&Int(Rnd()*1000)
oRs.open"[shop]",oconn,1,3
oRs.addnew

oRs("Shop_Pro")=Shop_Pro
oRs("Shop_Number")=Shop_Number
oRs("Shop_Pay")=Shop_Pay
oRs("Shop_User")=Shop_User
oRs("Shop_photo")=Shop_photo
oRs("Shop_mail")=Shop_mail
oRs("Shop_Add")=Shop_Add
oRs("Shop_content")=Shop_content
oRs("Shop_AutoID")=Shop_AutoID
oRs("Shop_View")=0

oRs.update
DBConnend()
Response.Write "<script language=javascript>alert('订单提交成功!\n\n您的订单号是:"&Shop_AutoID&"\n\n凭此订单号查询您的订单!\n\n系统将自动返回前一页面...');history.back();</script>"
end if 
%> 
