<!--#include file="../conn.asp"-->
<!--#include file="../userCheck.asp"-->
<%
dim jjj(10)

jjj(0)  = trim(request.form("dingdanNum"))
jjj(1)  = trim(request.form("userId"))
jjj(2)  = trim(request.form("carId"))
jjj(3)  = session("quche_date")&" "&session("quche_hourStart")&":00:00"

if session("quche_fangshi") = "上门送货" then
	jjj(4)  = session("quche_addr")
elseif session("quche_fangshi") = "门店自取" then
	jjj(4)  = session("quche_city1") & session("quche_city2")
else
	jjj(4)  = "不祥"
end if

jjj(5)  = session("huanche_city1") & session("huanche_city2")
jjj(6)  = session("zuqi")
jjj(7)  = trim(request.form("rizongjia"))
jjj(8)  = trim(request.form("totalMoney"))
jjj(9)  = trim(request.form("totalzonghe"))
jjj(10) = trim(request.form("zengzhiId"))

if jjj(0) = "" or jjj(1) = "" then call wrong("信息不完整。")

set rs_789 = server.createObject("adodb.recordset")
rs_789.open "select top 1 * from rentOrder",conn,1,3
rs_789.addnew
	rs_789("orderNum")     = jjj(0)
	rs_789("userId")       = jjj(1)
	rs_789("carId")        = jjj(2)
	rs_789("qucheTime")    = jjj(3)
	rs_789("qucheAddr")    = jjj(4)
	rs_789("huancheAddr")  = jjj(5)
	rs_789("zuqi")         = jjj(6)
	rs_789("rizongjia")    = jjj(7)
	'rs_789("totalMoney")   = jjj(8)		'此项功能未作
	rs_789("totalzonghe")  = jjj(9)
	rs_789("zengzhiId")    = jjj(10)
rs_789.update
rs_789.close
set rs_789 = nothing

response.write "<script>alert('订单提交成功，我们会及时为您处理。');window.open('../default.asp','_self');</script>"
%>