<?php
 include template("header"); ;echo '<script charset="utf-8" src="'; echo WEB_ROOT;;echo '/include/library/kindeditor-3.5.2-zh_CN/kindeditor.js"></script>
    <script>
        KE.show({
            id : \'detail\',
            resizeMode : 1,
            allowPreviewEmoticons : false,
            allowUpload : false,
            items : [
            \'fontname\', \'fontsize\', \'|\', \'textcolor\', \'bgcolor\', \'bold\', \'italic\', \'underline\',
            \'removeformat\', \'|\', \'justifyleft\', \'justifycenter\', \'justifyright\', \'insertorderedlist\',
            \'insertunorderedlist\', \'|\', \'emoticons\', \'image\', \'link\']
        });
    </script>
<div id="menu2"><a href="#">小菜单</a></div>
<div id="data">
    <h2>订单信息</h2>
    <table>
        <thead><tr><th>序号</th><th>产品列表</th><th>收货人</th><th>手机</th><th>地区</th><th>重量</th>
                <th>快递单号</th><th>快递费</th><th>商品总价</th><th>订单总价</th><th>付款时间</th></tr></thead>
        <tbody>
        <tr>
            <td>'; echo ++$index ;echo '</td>
            <td>'; echo OOrder::getItemList($order['order_number']) ;echo '</td>
            <td>'; echo $order['realname'] ;echo '</td>
            <td>'; echo $order['mobile'] ;echo '</td>
            <td>'; echo $order['province'] ;echo '</td>
            <td>'; echo $order['weight'] ;echo '</td>
            <td>'; echo $order['express_name'] ;echo '：'; echo $order['express_no'] ;echo '</td>
            <td>'; echo $order['fare'] ;echo '</td>
            <td>'; echo $order['sum'] - $order['fare'] ;echo '</td>
            <td>'; echo $order['sum'] ;echo '</td>
            <td>'; echo date('Y-m-d H:i:s', $order['pay_time']) ;echo '</td></tr></tbody>
    </table>
    '; if(!empty($support)){;echo '    <h2>处理记录</h2>
    <table>
        '; if(is_array($support)){foreach($support as $index=>$one){ ;echo '        <thead><tr>
                <th width="20">'; echo ++$index; ;echo '</th>
                <th>'; echo $one['title'];;echo '</th>
                <th width="150">'; echo  date('Y-m-d H:i:s',$one['create_time']);;echo '</th>
                <th width="100">'; echo $s->sort[$sort][$one['state']];  ;echo '</th></tr></thead>
        <tbody>
            <tr><td colspan="4"><p>'; echo $one['detail'] ;echo '</p></td></tr>
        </tbody>
        '; }} ;echo '    </table>
    '; } ;echo '</div>
<div id="fm">
    <table><tr><td><h2>售后流程：代理提交申请　　>　　管理员同意　　>　　代理发回货品：反馈快递单号　　>　　管理员收货确认退款</h2>
            &nbsp;请各位代理注意退货流程，写清申请理由！</td></tr></table>
    <h2>提交售后申请</h2>
    <table>
    <form id="support_form" method="post" action="">
        <tr><td>相关订单</td><td>
                <input name="sort" type="hidden" value="sale" />
                <input name="sid" type="hidden" value="'; echo $sid;;echo '" />
                <input name="detail_id" type="hidden" value="'; echo $order_number; ;echo '" />
                <a href="'; echo WEB_ROOT."/order/item.php?order_number=".$order_number ;echo '" target="_blank">'; echo $order_number; ;echo '</a></td></tr>
        <tr><td>标题</td><td><input size="55" name="title" type="text" /></td></tr>
        <tr><td>详细描述</td><td><textarea id="detail" cols="40" rows="8" name="detail" style="width:500px;height:200px;visibility:hidden;"></textarea></td></tr>
        <tr><td>操作</td><td>
                <input id="state" type="hidden" name="state" /><!-- 由下面的函数设定 -->
                '; echo Support::opHtml('sale', $state, FALSE); ;echo '            </td></tr>
        <tr><td></td><td></td></tr>
    </form>
    </table>
</div>
<div id="op">
    <h2>操作部分</h2>
</div>
<div id="help">help</div>
'; include template("footer"); ?>
