<!--#include file="Include/Iheeo_Conn.asp"-->
<!--#include file="Include/Iheeo_config.asp"-->
<%if request.Cookies("bjx")("username")="" then
response.write "<script language=javascript>alert('对不起，您还没有登陆！');history.go(-1);</script>"
response.End
end if%>
<html><head><title><%=webname%>--订单详细资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<body leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%dim dingdan
dingdan=request.QueryString("dan")
set rs=server.CreateObject("adodb.recordset")
rs.open "select BJX_action.actionid,BJX_goods.shuilv,BJX_goods.bookid,BJX_goods.shjiaid,BJX_goods.bookname,BJX_goods.shichangjia,BJX_goods.huiyuanjia,bjx_action.actiondate,bjx_action.shousex,bjx_action.danjia,bjx_action.feiyong,bjx_action.fapiao,bjx_action.userzhenshiname,bjx_action.shouhuoname,bjx_action.dingdan,bjx_action.youbian,bjx_action.liuyan,bjx_action.zhifufangshi,bjx_action.songhuofangshi,bjx_action.zhuangtai,bjx_action.zonger,bjx_action.useremail,bjx_action.usertel,bjx_action.shouhuodizhi,bjx_action.bookcount,bjx_action.star,bjx_action.pingjia from BJX_goods inner join bjx_action on BJX_goods.bookid=bjx_action.bookid where bjx_action.username='"&request.Cookies("bjx")("username")&"' and dingdan='"&dingdan&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "<p align=center>此订单中有商品已被管理员删除，无法进行正确计算!<br>订单取消，请通知管理员或重新下订单!</p>"
response.End
end if
%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td height="10"></td></tr>
<tr>
<td> 
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#cccccc" align="center">
                          <tr><td colspan="3">　<strong><font color="#ffffff">订购数量订单号为：<font color="#FF0000"><%=dingdan%></font>，详细资料如下：</font></strong></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td width="15%" align="right">订单状态：</td>
                            <td colspan="2"> 
                              <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                                <tr> 
                                
                                    <td> 
                                      <%zhuang()%>
                                      <br>
					<%if rs("zhuangtai")<>6 then %>
					
                                      <%else
					response.write "<font color=red><b>订单工作流程全部完成</b></font>"
					end if%>                                    </td>
                                  
                                </tr>
                              </table>                            </td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">商品列表：</td>
                            <td colspan="2"> 
                              <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
                                <tr align="center"> 
                                  <td><strong><font color="#ffffff">商品名称</font></strong></td>
                                  <td><strong><font color="#ffffff">订购数量</font></strong></td>
                                  <td><strong><font color="#ffffff">会员价格</font></strong></td>
                                  <td><strong><font color="#ffffff">金额小计</font></strong></td>
                                </tr>
                                <%zongji=0
		do while not rs.eof
a=rs("shuilv")
b=a+1%>
                                <tr bgcolor="#FFFFFF"> 
                                  <td style='PADDING-LEFT: 5px' height="22"><a target="_blank" href=product.asp?Iheeoid=<%=rs("bookid")%> ><%=trim(rs("bookname"))%></a></td>
                                  <td height="22"> 
                                    <div align="center"><%=rs("bookcount")%></div>                                  </td>
                                  <td height="22"> 
                                    <div align="center"><%=formatnumber(rs("danjia")*b,0)%></div>                                  </td>
                                  <td height="22"> 
                                    <div align="center"><%=rs("zonger")&"元"%></div>                                  </td>
                                </tr>
		<%zongji=rs("zonger")+zongji
		feiyong=rs("feiyong")
		actionid=rs("actionid")
		zhuangtai=rs("zhuangtai")
		rs.movenext
		loop
		rs.movefirst%>
                                <tr bgcolor="#FFFFFF"> 
                                  <td colspan="4" height="22"> 
                                    <div align="right">订单总额：<%=zongji%>元＋费用：<%=feiyong%>元　　共计：<%=zongji+feiyong%>元 
                                      &nbsp;&nbsp;&nbsp;&nbsp;</div>                                  </td>
                                </tr>
                              </table>                            </td>
                          </tr>
                          <tr bgcolor="#FFFFFF"><form name="star" method="post" action="savedingdan.asp?dan=<%=dingdan%>&action=star">
<td align="right">订单评级：</td><td colspan="2"><input type="radio" name="star" value="1" <% If rs("star") = 1 Then Response.write "Checked" %>>☆
<input type="radio" name="star" value="2" <% If rs("star") = 2 Then Response.write "Checked" %>>☆☆
<input type="radio" name="star" value="3" <% If rs("star") = 3 Then Response.write "Checked" %>>☆☆☆
<input type="radio" name="star" value="4" <% If rs("star") = 4 Then Response.write "Checked" %>>☆☆☆☆
<input type="radio" name="star" value="5" <% If rs("star") = 5 Then Response.write "Checked" %>>☆☆☆☆☆<br><%if rs("zhuangtai")=5 then %>
					<input class="go-wenbenkuang" name="submit" value="给订单评级" type="submit"><%end if%></td></form>
                          </tr>
                          <tr bgcolor="#FFFFFF"><form name="pingjia" method="post" action="savedingdan.asp?dan=<%=dingdan%>&action=pingjia">
                            <td align="right">订单评价：</td>
                            <td colspan="2"><textarea name="pingjia" cols="70" rows="3" id="pingjia"><%=rs("pingjia")%></textarea><br><%if rs("zhuangtai")=5 then %>
					<input class="go-wenbenkuang" name="submit" value="给订单评价" type="submit"><%end if%></td></form>
                          </tr>
    <%set Godbook=server.CreateObject("adodb.recordset")
	Godbook.open "select * from BJX_action_jp where username='"&request.Cookies("bjx")("username")&"' and dingdan='"&dingdan&"'",conn,1,1
	if Godbook.recordcount>0 then%>
						  <tr bgcolor="#FFFFFF"> 
                            <td align="right">奖品列表：</td>
                            <td colspan="2"> 
                              <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
                                <tr align="center"> 
                                  <td><strong><font color="#ffffff">奖品名称</font></strong></td>
                                  <td><strong><font color="#ffffff">所用积分</font></strong></td>
                                </tr>
        <%
	while not Godbook.eof%>
        <tr bgcolor="#FFFFFF"> 
	<td height="22"> 
	<%
	set Godbook1=server.CreateObject("adodb.recordset")
	Godbook1.open "select * from BJX_jiangpin where bookid="&Godbook("bookid"),conn,1,1
	if Godbook1.recordcount=1 then
	response.write Godbook1("bookname")
	end if
	Godbook1.close
	set Godbook1=nothing%>	</td>
	<td align="center" height="22"><%=Godbook("jifen")%></td>
	</tr>
        <%
	Godbook.movenext
	wend%>
	</table>	</td>
	</tr>
<%end if
Godbook.close
set Godbook=nothing%>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">收货人姓名：</td>
                            <td width="47%" style="PADDING-LEFT: 12px"><%=trim(rs("userzhenshiname"))%></td>
                            <td width="38%" style="PADDING-LEFT: 12px"><a href="help.asp?action=feiyong" >查看送货费用说明</a></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">收货地址：</td>
                            <td style="PADDING-LEFT: 12px"><%=trim(rs("shouhuodizhi"))%></td>
                            <td style="PADDING-LEFT: 12px"><a href="about.asp?action=lxwm"><font color=red>查看商家联系方式</font></a></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">邮编：</td>
                            <td style="PADDING-LEFT: 12px"><%=trim(rs("youbian"))%></td>
                            <td style="PADDING-LEFT: 12px"><a href=help.asp?action=fukuan><font color=red>查看商家汇款方式</font></a></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">联系电话：</td>
                            <td style="PADDING-LEFT: 12px"><%=trim(rs("usertel"))%></td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">电子邮件：</td>
                            <td style="PADDING-LEFT: 12px"><%=trim(rs("useremail"))%></td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">送货方式：</td>
                            <td style="PADDING-LEFT: 12px"> 
                              <%set rs2=server.CreateObject("adodb.recordset")
    rs2.Open "select * from Iheeo_Delivery where SongKey="&rs("songhuofangshi"),conn,1,1
    response.Write trim(rs2("SongName"))
    rs2.Close
    set rs2=nothing%>                            </td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">支付方式：</td>
                            <td style="PADDING-LEFT: 12px"> 
                              <%set rs2=server.CreateObject("adodb.recordset")
    rs2.Open "select * from Iheeo_Pay where PayKey="&rs("zhifufangshi"),conn,1,1
    response.Write trim(rs2("PayName"))
    rs2.close
    set rs2=nothing%>                            </td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">是否要发票：</td>
                            <td style="PADDING-LEFT: 12px">
                              <%if rs("fapiao")=1 then %>
                              <font color=red>需要发票</font>
                              <%else%>
                              不需要发票
                            <%end if%>                            </td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">您的留言：</td>
                            <td style="PADDING-LEFT: 12px"><%=trim(rs("liuyan"))%></td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td align="right">下单日期：</td>
                            <td style="PADDING-LEFT: 12px"><%=rs("actiondate")%></td>
                            <td style="PADDING-LEFT: 12px">　</td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td height="40" colspan="3" align="center"><br>
                            <%if zhuangtai=1 then%>
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr " method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="laowan_1248836018_biz@163.com ">      
    <input type="hidden" name="item_name" value="<%=dingdan%>"> 
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="amount" value="<%=zongji+feiyong%>"> 
<input type="hidden" name="return" value="http://<%                 '这里是客户支付成功, 返回信息的地址!
theurl=LCase(Request.ServerVariables("HTTP_HOST"))&Request.ServerVariables("URL")
theurl=Left(theurl,InstrRev(theurl,"/"))
response.write theurl&"paypal.asp?aid="&actionid&""
%>">    
<input type="submit" name="Submit3" value="Use Paypal Payment">
</form>
<%end if%></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                          <td height="40" colspan="3" align="center"> 
<%if rs("zhuangtai")=1 then%>
<input class="go-wenbenkuang" type="submit" name="submit" value="删除订单" onClick="if(confirm('您确定要删除吗?')) location.href='savedingdan.asp?action=del&dan=<%=dingdan%>';else return;">
<%end if%>
<input class=go-wenbenkuang onClick=javascript:window.close() type=reset value=关闭窗口 name=submit></td>
</tr>
</table>
</td>
</tr>
</table>
<%
sub zhuang()
select case rs("zhuangtai")
case "1"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="zhuangtai" type="checkbox" id="zhuangtai" value="2" DISABLED>
用户已经划出款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" DISABLED>服务商已经收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>服务商已经发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已经收到货 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai" value="3" DISABLED>订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>订单已完成 
<%end if%>
<%case "2"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>用户已经划出款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" DISABLED>服务商已经收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>服务商已经发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已经收到货
<%case "3"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>用户已经划出款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>服务商已经收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>服务商已经发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已经收到货
<%else%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox1" value="checkbox" DISABLED>订单已完成 
<%end if%>
<%case "4"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>用户已经划出款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>服务商已经收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>服务商已经发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="5" DISABLED>用户已经收到货
<%case "5"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>用户已经划出款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>服务商已经收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>服务商已经发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>用户已经收到货
<%else%>
<input name="checkbox3" type="checkbox" DISABLED value="checkbox" checked>订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>订单已完成 
<%end if%>
<%case "6"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未作任何处理<span style='font-family:Wingdings;'>à</span> 
<input name="checkbox3" type="checkbox" DISABLED value="checkbox" checked>订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>订单已完成 
<%end select
end sub%>
</body>
</html>
