<!--#include file="conn.asp"-->
<%
page_title=Eval("case_title"&Language)
page_keywords=Eval("case_keywords"&Language)
page_description=Eval("case_description"&Language)
if page_title="" then
page_title=city_title
page_keywords=city_keywords
page_description=city_description
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-Language" content="zh-CN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><%=page_title%></title>
<meta name="keywords" content="<%=page_keywords%>" />
<meta name="description" content="<%=page_description%>" />
<!--#include file="top.asp"-->
<!--#include file="header.asp"-->
  <link href="<%=filepath%>inc/mycenter.css" type="text/css" rel="stylesheet">
  <link href="<%=filepath%>inc/style.css" type="text/css" rel="stylesheet">
  <link href="<%=filepath%>inc/user.css" type="text/css" rel="stylesheet">
  <script language="javascript" type="text/javascript">

        function check(ck) {
            if (ck == "0") {
                alert("库存不足，请取消订单！");
                return false;
            }
            else if (ck == "2") {
                return true;
            }
            else if (ck == "3") {
                $("form").attr("target", "");
                $("form").attr("action", "/MyCenter/MyOrderList.aspx");
                return true;
            }
            return false;
        }

        function checkurl(ck, url, dikou, payment, img) {
            if (ck == "1") {
                $("#hdPayHtml").val(url);
                $("#lblDikou").html("<font style='color: #a10000;font-weight: bold;'>" + dikou + "</font>");
                $("#lblPayment").html("<font style='color: #a10000;font-weight: bold;'>" + payment+ "</font>");
                $("#imgmode").attr("src", img);
                $.facebox($("#divPay").clone().show());
                return false;
            }
            return false;
        }

        function Go(e) {
            window.open($("#hdPayHtml").val());
        }
    </script>
  <div id="wrap">
    <!--container-->
    <div class="main">
      <!--sidebar-->
      <!--#include file="Mb_left.asp"-->
      <script type="text/javascript">
                try
                {
                    document.getElementById("User_Order_List").className = "current"; //控制CSS
                }
                catch(e){}
</script>
      <!--sidebar end-->
      <!--main-->
      <div class="mainBox">
        <div class="mainContent">
          
<%
set rs=server.CreateObject("adodb.recordset")
  dim zhuangtai,timesel
  zhuangtai=request.QueryString("zhuangtai")
  timesel=request.QueryString("timesel")
if timesel<>"" then

sel_no1=dateadd("m",-int(timesel),date())
sel_no2=dateadd("m",-0,date())

rs.open "select distinct(dingdan),niming,username,actiondate,userid,zhuangtai,shopxp_shfs,zhifufangshi from shopxp_action where username='"&session("user_xxx_name")&"' and actiondate>#"&sel_no1&"# and actiondate <#"&sel_no2&"#  order by actiondate",conn,1,1

else
  
  if zhuangtai=0 or zhuangtai="" then
  select case zhuangtai
  case "0"
  rs.open "select distinct(dingdan),niming,username,actiondate,userid,zhuangtai,shopxp_shfs,zhifufangshi from shopxp_action where username='"&session("user_xxx_name")&"' and zhuangtai<8 order by actiondate desc",conn,1,1
  case ""
  rs.open "select distinct(dingdan),niming,username,actiondate,userid,zhuangtai,shopxp_shfs,zhifufangshi from shopxp_action where username='"&session("user_xxx_name")&"' and zhuangtai<8 order by actiondate desc",conn,1,1
  end select
  else
  rs.open "select distinct(dingdan),niming,username,actiondate,userid,zhuangtai,shopxp_shfs,zhifufangshi from shopxp_action where username='"&session("user_xxx_name")&"' and zhuangtai="&zhuangtai&" order by actiondate",conn,1,1
  end if

end if
%>			<div class="mycontent">
            <div class="mycontent_10"> <span>我的订单</span> </div>
            <div class="mycontent_11"> 您目前的会员级别：<span class="jfSTYLE1">普通会员</span><br>
              截至
              2013年08月08日，您共有 <span id="lblOrderTotalCount" class="jfSTYLE1"><%=Cstr(rs.RecordCount)%></span> 个订单未完成付款交易 </div>
          </div>
          <div class="mycontent_12">
            <div id="listtable" style="position: relative; width: 100%">
              <div id="navlistbg">
                <ul id="navlist">
                  <li><a href="MyOrderList.asp" id="current">未付款</a></li>
                  <li><a href="MyOrderList2.asp">已付款</a></li>
                  <li><a href="MyOrderList3.asp">已结束</a></li>
                </ul>
              </div>
              <table cellspacing="0" cellpadding="0" align="center" border="0" class="listtable margin_bottom10">
                <thead>
                  <tr>
                    <th> 订单号 </th>
                    <th> 下单时间 </th>
                    <th> 待支付金额 </th>
                    <th> 状态 </th>
                    <th> 查看详情 </th>
                    <th> 支付 </th>
                    <th> 操作 </th>
                  </tr>
                </thead>
                <tbody>
				
  <% 
if not rs.bof or not rs.eof then
do while not rs.eof   %>
                  <tr>
                    <td><a href="MyOrderDetail.asp?dingdan=<%=trim(rs("dingdan"))%>" target="_blank"><font style="color: #315E81;"> <%=trim(rs("dingdan"))%></font></a></td>
                    <td><%=rs("actiondate")%></td>
                    <td align="right">
<%dim shopxp,rs2
	'////
	set shopxp=server.CreateObject("adodb.recordset")
	shopxp.open "select sum(zonger) as zonger from shopxp_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
	'response.write "<font color=#FF6600>"&formatnumber(shopxp("zonger"),2)&"</font>"
	zonger=shopxp("zonger")
	shopxp.close
	set shopxp=nothing%>
	 <%
	set shopxp=server.CreateObject("adodb.recordset")
	shopxp.open "select feiyong from shopxp_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
	'response.write "<font color=#FF6600>"&formatnumber(shopxp("feiyong"),2)&"</font>"
	feiyong=shopxp("feiyong")
	shopxp.close
	set shopxp=nothing%>
	￥<%=formatnumber(zonger+feiyong,2)%>
	</td>
                    <td> <%select case rs("zhuangtai")
	case "1"
	response.write "等候付款"
	case "2"
	response.write "等待发货"
	case "3"
	response.write "已经发货"
	case "4"
	response.write "已经收货"
	case "5"
	response.write "已经退货"
	case "6"
	response.write "交易完成"
	case "7"
	response.write "已经退款"
	end select%></a> </td>
                    <td><a href="http://c.genanx.com/MyCenter/MyOrderDetail.aspx?ID=1072"><font style="color: #315E81">查看详情</font></a> </td>
                    <td> 未支付 </td>
                    <td><a onclick="return check(&#39;2&#39;);" id="rptOrder_ctl01_lbl_OrderPay" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("rptOrder$ctl01$lbl_OrderPay", "", false, "", "http://www.genanx.com/Alipay/alipayto/4358080825791.html", false, true))"><font style="color: #315E81">我要付款</font></a> <a onclick="return check(&#39;3&#39;);" id="rptOrder_ctl01_lbl_Cancle" href="javascript:__doPostBack('rptOrder$ctl01$lbl_Cancle','')"><font style="color: #315E81">取消订单</font></a> </td>
                  </tr>
<%
   rs.movenext
  loop
  else
  response.Write("<tr><td style='color:red' colspan=7 >暂没有订单数据</td></tr> ")
  end if
  rs.close
  set rs=nothing%>
                </tbody>
              </table>
              <p> </p>
              <!-- AspNetPager 7.3.2  Copyright:2003-2010 Webdiyer (www.webdiyer.com) -->
              <div id="wqPager" class="pager" style="white-space:nowrap;">
                <div class="pager_left" align="right" style="width:;"> 每页 10 条，共 3 条 </div>
                <div> <a disabled="disabled" style="margin-right:5px;">第一页</a><a disabled="disabled" style="margin-right:5px;">上一页</a><a disabled="disabled" style="margin-right:5px;">下一页</a><a disabled="disabled" style="margin-right:5px;">最后一页</a>&nbsp;&nbsp;
                  <input type="text" value="1" disabled="disabled" name="wqPager_input" id="wqPager_input" onkeydown="ANP_keydown(event,&#39;wqPager_btn&#39;);" style="width:30px;">
                  页
                  <input type="submit" value="go" name="wqPager" id="wqPager_btn" disabled="disabled" onclick="if(ANP_checkInput(&#39;wqPager_input&#39;,1)){__doPostBack(&#39;wqPager&#39;,&#39;&#39;)} else{return false}">
                </div>
              </div>
              <!-- AspNetPager 7.3.2  Copyright:2003-2010 Webdiyer (www.webdiyer.com) -->
            </div>
          </div>
        </div>
      </div>
      <!--main end-->
    </div>
    <!--container end-->
    <div class="clr"> </div>
    <!-- start footer -->
  </div>
  <!--#include file="foot.asp"-->
