<?php
 include template("header"); ;echo '<div id="menu2">
    <a href="'; echo WEB_ROOT; ;echo '/order/index.php?state=pay">待发货订单</a>&nbsp;|
    <a href="'; echo WEB_ROOT; ;echo '/order/index.php?state=send">已发货订单</a>&nbsp;|
    <a href="'; echo WEB_ROOT; ;echo '/order/index.php?state=refund">已退款订单</a>&nbsp;|
    <a href="'; echo WEB_ROOT; ;echo '/order/index.php?state=unpay">未支付订单</a>&nbsp;|
    <a href="'; echo WEB_ROOT; ;echo '/order/index.php">全部订单</a>
</div>
<div id="info" style="display:none">info</div>
<div id="data">
    <form action="" method="post">
        订单号：<input type="text" name="order_number" />
        收件人：<input type="text" name="real_name" />
        <input name="search" type="submit" value="订单查询" />
    </form>
    <table>
        <thead><tr><th>订单号</th><th>商品列表</th><th>收货人</th><th>提供商</th><th>下单时间 / 支付时间</th><th>运费</th><th>总金额</th><th>快递单号</th><th>订单状态</th><th>操作</th></tr></thead>
        '; if(is_array($order_info)){foreach($order_info AS $index=>$one) { ;echo '        <tr id="order_'; echo $one['id']; ;echo '" onmouseover="cart_item_over(\'order_'; echo $one['id']; ;echo '\')" onmouseout="cart_item_out(\'order_'; echo $one['id']; ;echo '\')">
            <td><a href="'; echo WEB_ROOT."/order/item.php?order_number=".$one['order_number']; ;echo '">'; echo $one['order_number']; ;echo '</a></td>
            <td>'; echo OOrder::getItemList($one['order_number']); ;echo '</td>
            <td>'; echo $one['realname'];echo '<br />（'; echo $one['province'];echo '）</td>
            <td>'; echo $one['name'] ;echo '</td>
            <td>'; echo date('Y-m-d H:i:s',$one['create_time']) ;echo '<br />'; if($one['pay_time']) echo date('Y-m-d H:i:s',$one['pay_time']) ;echo '</td>
            <td>'; echo $one['fare'] ;echo '</td>
            <td>'; echo $one['sum'] ;echo '</td>
            <td>'; echo $one['express_name'].":".$one['express_no'] ;echo '</td>
            <td>'; echo state($one['state']) ;echo '</td>
            <td>
                '; if($one['state']=='unpay'){ ;echo '                <a href="javascript:order_pay(\''; echo $one['order_number']; ;echo '\')">支付</a>
                '; }elseif($one['state']=='send'){ ;echo '                <a href="'; echo WEB_ROOT."/support/support.php?detail_id=".$one['order_number']; ;echo '">售后</a>
                '; } ;echo '                <a href="'; echo WEB_ROOT."/order/item.php?order_number=".$one['order_number']; ;echo '">详情</a>
            </td>
        </tr>
        '; }} ;echo '        <tr><td colspan="10">'; echo $pagestring; ;echo '</td></tr>
    </table>
</div>
<div id="fm">
    <h2>标题</h2>
    <form id="login-user-form" method="post" action="/account/login.php" class="validator">
    </form>
</div>
<div id="op">
    <h2>操作部分</h2>
</div>
<div id="help">help</div>
'; include template("footer"); ?>
