<!--#include file="../conn.asp"-->
<%
if session("userId23")="" then
	response.write "请先<a href='../login_2.asp'>登录系统</a>."
	response.End()
end if



dim uu(5)
set rs_user = server.CreateObject("adodb.recordset")
rs_user.open "select * from member where id="& session("userId23") &"",conn,1,1
if not rs_user.eof then
	uu(0) = rs_user("name")&"&nbsp;"
	uu(1) = rs_user("phone")&"&nbsp;"
	uu(2) = rs_user("address")&"&nbsp;"
	uu(3) = rs_user("email")&"&nbsp;"
end if
rs_user.close
set rs_user = nothing

'获得汽车信息
if request.Form("radiochexing")<>"" then
	dim car(11)
	set rs_car = server.CreateObject("adodb.recordset")
	rs_car.open "select * from rentCar where id="& request.Form("radiochexing") &"",conn,1,1
	if not rs_car.eof then
		car(0) = rs_car("chexing")
		car(1) = rs_car("pinpai")
		car(2) = rs_car("xinghao")
		car(3) = rs_car("dayzujin_sc")		'市场价日租金
		car(4) = rs_car("dayzujin_yks")		'易卡搜价日租金
		car(5) = rs_car("licheng_sc")		'市场价里程限制
		car(6) = rs_car("licheng_yks")		'易卡搜里程限制
		car(7) = rs_car("zongheMoney")		'综合服务费
		car(8) = rs_car("chaofei")			'超里程费
		car(9) = rs_car("chaoshifei")		'超时费
		car(10)= rs_car("id")
	end if
	rs_car.close
	set rs_car = nothing
else
	'如果没有选取汽车
	response.write "<script>alert('请选择所租车型。');history.back();</script>"
	response.End()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>您的订单</title>
<link href="../css/comm.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="bodyDiv">
<!--#include file="rent_top.asp"-->
<!--#include file="../model_daohang.asp"-->
<table width="100%" height="111" border="0" cellpadding="0" cellspacing="0">
<form name="form3" id="form3" action="rentDingDan_fun.asp" method="post">
    <tr>
     <td>
     <table width="80%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#ffffff">
           <tr bgcolor="#f3f3f3">
             <td align="center" colspan="6"><strong>您的订单</strong></td>
           </tr>
           <tr>
             <td><strong>订单号</strong></td>
             <td colspan="5"><%
		 tmp_jjj = ""
		 tmp_jjj = now()
		 tmp_kkk = year(tmp_jjj)&month(tmp_jjj)&day(tmp_jjj)&session("userId23")
		 response.write tmp_kkk
		 response.write "<input type='hidden' name='dingdanNum' id='dingdanNum' value='"& tmp_kkk &"' />"
		 %></td>
           </tr>
           <tr bgcolor="#f3f3f3" height="30">
             <td align="center" colspan="6"><strong>客户信息<input name="userId" type="hidden" id="userId" value="<%=session("userId23")%>" />
             </strong></td>
           </tr>
           <tr>
             <td>客户姓名</td>
             <td><%=uu(0)%></td>
             <td>联系电话</td>
             <td><%=uu(1)%></td>
             <td>联系地址</td>
             <td><%=uu(2)%></td>
           </tr>
           <tr height="25">
             <td>电子邮箱</td>
             <td colspan="5"><%=uu(3)%></td>
            </tr>

           <tr bgcolor="#f3f3f3">
             <td align="center" colspan="6"><strong>租车信息</strong><input name="carId" type="hidden" id="carId" value="<%=car(10)%>" /></td>
           </tr>
           <tr height="25">
             <td>车型</td>
             <td><%=car(0)%></td>
             <td>取车时间</td>
             <td colspan="3"><%=year(session("quche_date"))&"年"&month(session("quche_date"))&"月"&day(session("quche_date"))&"日"&session("quche_hourStart")&"时&nbsp;到&nbsp;"&session("quche_hourEnd")&"时"%></td>
           </tr>
           <tr height="25">
             <td>租车城市</td>
             <td><%=session("quche_city1")%></td>
             <td><%
			 if session("quche_fangshi")="上门送货" then
			 	response.write "送货地址"
			elseif session("quche_fangshi")="门店自取" then
				response.write "门店名称"
			else
				response.write "&nbsp;"
			end if
				%></td>
             <td>
             <%
			 if session("quche_fangshi")="上门送货" then
			 	response.write session("quche_addr")
			elseif session("quche_fangshi")="门店自取" then
				response.write session("quche_city2")
			else
				response.write "&nbsp;"
			end if
			 %>             </td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
           <tr>
             <td>租期</td>
             <td><%=session("zuqi")&"天"%></td>
             <td>还车城市</td>
             <td><%=session("huanche_city1")%></td>
             <td>还车门店</td>
             <td colspan="3"><%=session("huanche_city2")&"&nbsp;"%></td>
           </tr>
       </table>
       
       <div style="margin-top:20px;">
         <table width="80%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#ffffff">
           <tbody>
             <tr bgcolor="#f3f3f3" height="30">
               <td align="center" colspan="6"><strong>费用明细</strong></td>
             </tr>
             <tr height="25">
               <td align="middle" width="120">科目</td>
               
               <td align="middle" width="18%">市场价</td>
               <td align="middle" width="18%">易卡搜价</td>
               <td align="middle" width="18%">金额</td>
               <td align="middle" width="18%">备注</td>
             </tr>
             <tr height="25">
               <td width="120"  align="left">日租金</td>
               <td align="left" width="120"><%=car(3)%></td>
               <td width="120" height="25" align="left"><%=car(4)%></td>
               <td width="120" height="25" align="left"><%=car(4)%>
                 <input type="hidden" name="rizongjia" id="rizongjia" value="<%=car(4)%>" /></td>
               <td width="150" height="25" align="left">&nbsp;</td>
             </tr>
             <tr height="25">
               <td align="left" width="120">综合服务费</td>
               <td align="left" width="120"><%=car(7)%></td>
               <td align="left" width="120"><%=car(7)%></td>
               <td align="left" width="120"><%=car(7)%>
                 <input type="hidden" name="totalzonghe" id="totalzonghe" value="<%=car(7)%>" /></td>
               <td align="left" width="150">&nbsp;</td>
             </tr>
             <%
			 dim tmp_fujia
			 tmp_fujia = ""
			 tmp_fujia = request.Form("checkbox")
			 zengzhiId = replace(tmp_fujia&"",", ","|")			'增值服务项目ID，准备插入数据库，用|分割
			 tmp_fujia_arr = split(tmp_fujia,", ")
			 
			 tmp_fujia_i = 0
			 for tmp_fujia_i = 0 to ubound(tmp_fujia_arr)
			 	tmp_fujia_sql = tmp_fujia_sql & " or id = "& tmp_fujia_arr(tmp_fujia_i) &" "
			 next
			 
			 tmp_fujia_sql = mid(tmp_fujia_sql,5,len(tmp_fujia_sql))
			 
			 '如果有增值服务内容
			 if tmp_fujia_sql <> "" then
				 set rs_fujia = server.CreateObject("adodb.recordset")
				 rs_fujia.open "select * from rentZengZhi where ("& tmp_fujia_sql &")",conn,1,1
				 do while not rs_fujia.eof
				 %>
        	     <tr height="25">
            	   <td align="left" width="120"><%=rs_fujia("zzname")%></td>
            	   <td align="left" width="120">&nbsp;</td>
            	   <td align="left" width="120"><%=rs_fujia("zzjiagenote")%></td>
            	   <td align="left" width="120"><%=rs_fujia("zzjiagenote")%></td>
            	   <td align="left" width="150"><%=rs_fujia("beizhu")&"&nbsp;"%></td>
            	 </tr>
             	<%
			 	rs_fujia.movenext
			 	loop
			 	rs_fujia.close
			 	set rs_fujia = nothing
			 end if
				%>
           </tbody>
         </table><div align="center" style="padding:10px;">
         <input type="submit" name="button" id="button" value="  确 认  " />
         <input name="zengzhiId" type="hidden" id="zengzhiId" value="<%=zengzhiId%>" /></div>
       </div></td>
     </tr>
</form>
</table>
<!--#include file="../model_bottom.asp"-->
</div>
</body>
</html>