<!--#include file="conn.asp"-->
<%if session("username")="" then
response.write "<script language=javascript>alert('Pleas login!');history.go(-1);</script>"
response.End
end if%>
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<html>
<head>
<title><%=webname%>--My Orders</title>
<link rel="SHORTCUT ICON" href="<%=weburl%>shortcut.ico">
<meta name="generator" content="snsn-shop">
<meta name=keywords content="<%=webgjz%>">
<meta name="description" content="<%=webmx%>">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link href="<%=weburl%>css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">
<%dim dingdan
dingdan=nosql(request.QueryString("dan"))
set rs=server.CreateObject("adodb.recordset")
rs.open "select wygkcn_shop.shopid,wygkcn_shop.shopname,wygkcn_shop.shichangjia,wygkcn_shop.huiyuanjia,shop_action.actiondate,shop_action.shousex,shop_action.quyu,shop_action.danjia,shop_action.feiyong,shop_action.fapiao,shop_action.fhsj,shop_action.quyu,shop_action.baojia,shop_action.userzhenshiname,shop_action.shouhuoname,shop_action.dingdan,shop_action.youbian,shop_action.liuyan,shop_action.zhifufangshi,shop_action.songhuofangshi,shop_action.zhifufangshi,shop_action.songhuofangshi,shop_action.zhuangtai,shop_action.zonger,shop_action.useremail,shop_action.usertel,shop_action.shouhuodizhi,shop_action.shopcount,shop_action.psdq,shop_action.qlr from wygkcn_shop inner join shop_action on wygkcn_shop.shopid=shop_action.shopid where shop_action.username='"&nosql(session("username"))&"' and dingdan='"&dingdan&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "<center>此订单中有商品已被管理员删除，无法进行正确计算。<br>Order has been cancelled. Please notify the adminstrator or place a new order.</center>"
response.End
end if
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="10" height="32" background="images/i33.gif"></td>
    <td align="left" valign="middle" background="images/i35.gif"><font 
                  color=#ff6600><b><img src="images/o.gif" width="15" height="15"> 
      </b></font><b><strong>Order number：<%=dingdan%></strong></b> </td>
    <td width="10" background="images/i34.gif"></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="10" background="images/i26.gif"></td>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>State：</td>
          <td width="83%" height="23"  > <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <form name="form1" method="post" action="savedingdan.asp?dan=<%=dingdan%>&action=save">
                  <td > <%zhuang()%>
                    <%if rs("zhuangtai")<>5 then %>
                    <input name="Submit" type="submit" class="go-wenbenkuang" value="Change">
                    <%else
									  response.write "<font color=red><b>Order process is now complete！</b></font>"
									  end if%></td>
                </form>
              </tr>
            </table></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="17%" height="23"  style='PADDING-LEFT: 10px'>Products：</td>
          <td height="23"  > <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><IMG height=5 src="images/block.gif" width=1></td>
              </tr>
            </table>
            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table-zuoshang">
              <tr bgcolor="f1f1f1"  class="a1"> 
                <td height="22"  > <div align="center">Product</div></td>
                <td height="22"  > <div align="center">Qty</div></td>
                <td height="22"  > <div align="center">Member Price:</div></td>
                <td height="22"  > <div align="center">Total</div></td>
                <td  ><div align="center">District</div></td>
              </tr>
              <%zongji=0
		do while not rs.eof%>
              <tr bgcolor="#FFFFFF"> 
                <td style='PADDING-LEFT: 5px' height="22"  ><a href=list.asp?id=<%=rs("shopid")%> target=_blank><%=trim(rs("shopname"))%></a></td>
                <td height="22"  > <div align="center"><%=rs("shopcount")%></div></td>
                <td height="22"  > <div align="center"><%=formatnumber(round(rs("danjia"),2),2)&""%></div></td>
                <td height="22"  > <div align="center"><%=formatnumber(round(rs("zonger"),2),2)&""%></div></td>
                <td height="22" align="center"  ><%=trim(rs("psdq"))%></td>
              </tr>
              <%
	    zongji=rs("zonger")+zongji 
		feiyong=rs("feiyong")															  
		rs.movenext
		loop
		rs.movefirst%>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="5" height="22"  > <div align="right">Total Price：<%=formatnumber(round(zongji,2),2)%>＋Shipping Fee：<%=formatnumber(round(feiyong,2),2)%> 　　Total price：<%=formatnumber(round(zongji+feiyong,2),2)%> &nbsp;&nbsp;&nbsp;&nbsp;</div></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><IMG height=5 src="images/block.gif" width=1></td>
              </tr>
            </table></td>
        </tr>
        <%set snsn=server.CreateObject("adodb.recordset")
	snsn.open "select * from shop_action_jp where username='"&session("username")&"' and dingdan='"&dingdan&"'",conn,1,1
	if snsn.recordcount>0 then%>
        <tr bgcolor="#FFFFFF"> 
          <td width="17%" height="23"  style='PADDING-LEFT: 10px'>GIFT：</td>
          <td height="23"  > <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-zuoshang">
              <tr  class="a1"> 
                <td height="22"  > <div align="center">gift name </div></td>
                <td height="22"  > <div align="center">scores</div></td>
              </tr>
              <%
	while not snsn.eof%>
              <tr bgcolor="#FFFFFF"> 
                <td height="22"  > <%
	set snsn1=server.CreateObject("adodb.recordset")
	snsn1.open "select * from shop_jiangpin where shopid="&snsn("shopid"),conn,1,1
	if snsn1.recordcount=1 then
	response.write snsn1("shopname")
	end if
	snsn1.close
	set snsn1=nothing%> </td>
                <td align="center" height="22"  ><%=snsn("jifen")%></td>
              </tr>
              <%
	snsn.movenext
	wend%>
            </table></td>
        </tr>
        <%end if
snsn.close
set snsn=nothing%>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Name：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("userzhenshiname"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Address：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("shouhuodizhi"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Code：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("youbian"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Tel：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("usertel"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Email：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("useremail"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td bgcolor="#FFFFFF" style='PADDING-LEFT: 10px'>District：</td>
          <td bgcolor="#FFFFFF" style='PADDING-LEFT: 10px'><%=trim(rs("quyu"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="22" bgcolor="#FFFFFF" class="table-xiayou" style='PADDING-LEFT: 10px'>Shipping：</td>
          <td style='PADDING-LEFT: 10px' height="22" class="table-xiayou"> <%set rs2=server.CreateObject("adodb.recordset")
    rs2.Open "select * from shop_sys where songid="&rs("songhuofangshi"),conn,1,1
    if  rs2.eof then 
	response.Write ("Error: Method of delivery may have been deleted.")
	else
    response.Write trim(rs2("fsh"))
	end if
    rs2.Close
    set rs2=nothing%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="11" bgcolor="#FFFFFF" class="table-xiayou" style='PADDING-LEFT: 10px'>Payment：</td>
          <td height="11" class="table-xiayou" style='PADDING-LEFT: 10px'> <%set rs2=server.CreateObject("adodb.recordset")
    rs2.Open "select * from shop_songhuo where songid="&rs("zhifufangshi"),conn,1,1
	if  rs2.eof then 
	response.Write ("Error: Method of payment may have been deleted.")
	else
    response.Write trim(rs2("subject"))
    end if
	rs2.close
    set rs2=nothing%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Invoice：</td>
          <td height="23"  style='PADDING-LEFT: 10px'> <%if rs("fapiao")=1 then %> 
          <font color=red>Yes</font> <%else%>
            No 
            <%end if%> </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>More：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=trim(rs("liuyan"))%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="23"  style='PADDING-LEFT: 10px'>Date：</td>
          <td height="23"  style='PADDING-LEFT: 10px'><%=rs("actiondate")%></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="32" colspan="2"  > <div align="center"> 
              <%if rs("zhuangtai")=1 then%>
              <input name="Submit2" type="submit" class="go-wenbenkuang" value="Del"  onClick="if(confirm('Are you sure?')) location.href='savedingdan.asp?action=del&dan=<%=dingdan%>';else return;">
              <%end if%>
              &nbsp;&nbsp; 
              <input name="Submit22" type="submit" class="go-wenbenkuang" value="Close"  onClick=javascript:window.close()>
            </div></td>
        </tr>
      </table> </td>
    <td width="10" background="images/i27.gif"></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="10" height="10" background="images/i28.gif"></td>
    <td  background="images/i29.gif"></td>
    <td width="10" background="images/i30.gif"></td>
  </tr>
</table>
<br>
<%sub zhuang()
select case rs("zhuangtai")
case "1"%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
<font color="#FF0000">Waiting to be processed</font><span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")="货到付款" then %>
<input name="zhuangtai" type="checkbox" id="checkbox" value="2" >
Order confirmed, being processed for shipping<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3" DISABLED>
Goods have been shipped<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped, payment confirmed, thank you for your order 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai" value="2" >
Order confirmed, awaiting payment<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Payment received, being processed for shipping <span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped, payment confirmed, thank you for your order  
<%end if%>
<%case "2"%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox2" value="checkbox" checked>
<font color="#FF0000">Waiting to be processed</font><span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")="货到付款" then %>
<input name="zhuangtai" type="checkbox" id="checkbox2" value="2" DISABLED checked>
<font color="#FF0000">订Order confirmed, being processed for shipping </font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3" DISABLED>
Goods have been shipped<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped, payment confirmed, thank you for your order 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai2" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, awaiting payment</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3" DISABLED>
Payment received, being processed for shipping <span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox" DISABLED>
Goods have been shipped, payment confirmed, thank you for your order  
<%end if%>
<%case "3"%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox5" value="checkbox" checked>
<font color="#FF0000">Waiting to be processed</font><span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")="货到付款" then %>
<input name="zhuangtai" type="checkbox" id="checkbox5" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, being processed for shipping</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3"  DISABLED checked>
<font color="#FF0000">Goods have been shipped</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4" >
Goods have been shipped, payment confirmed, thank you for your order 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai22" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, awaiting payment</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox"  DISABLED checked>
<font color="#FF0000">Payment received, being processed for shipping</font> <span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4" DISABLED>
Goods have been shipped<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox">
Goods have been shipped, payment confirmed, thank you for your order  
<%end if%>
<%case "4"%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox52" value="checkbox" checked>
<font color="#FF0000">Waiting to be processed</font><span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")="货到付款" then %>
<input name="zhuangtai" type="checkbox" id="checkbox52" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, being processed for shipping</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3"  DISABLED checked>
<font color="#FF0000">Goods have been shipped</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4"   DISABLED checked>
<font color="#FF0000">Goods have been shipped, payment confirmed, thank you for your order</font> 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai222" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, awaiting payment</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox"  DISABLED checked>
<font color="#FF0000">Payment received, being processed for shipping</font> <span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4"  DISABLED checked>
<font color="#FF0000">Goods have been shipped</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="5" >
Goods have been shipped, payment confirmed, thank you for your order  
<%end if%>
<%case "5"%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox522" value="checkbox" checked>
<font color="#FF0000">Waiting to be processed</font><span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")="货到付款" then %>
<input name="zhuangtai" type="checkbox" id="checkbox522" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, being processed for shipping</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3"  DISABLED checked>
<font color="#FF0000">Goods have been shipped</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4"   DISABLED checked>
<font color="#FF0000">Goods have been shipped, payment confirmed, thank you for your order</font> 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai2222" value="2" DISABLED checked>
<font color="#FF0000">Order confirmed, awaiting payment</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="checkbox"  DISABLED checked>
<font color="#FF0000">Payment received, being processed for shipping</font> <span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4"  DISABLED checked>
<font color="#FF0000">Goods have been shipped</font><span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="5"  DISABLED checked >
<font color="#FF0000">Goods have been shipped, payment confirmed, thank you for your order </font> 
<%end if%>
<%end select
end sub%>
</body>
</html>