<?php
 include template("header"); ;echo '<div id="menu2"><a href="'; echo WEB_ROOT; ;echo '/item/index.php">继续选购</a>&nbsp;&nbsp;<a href="'; echo WEB_ROOT; ;echo '/cart/clear.php">清空购物车</a></div>
<div id="fm" style="display:none">
    <h2>库存查询</h2>
    <form method="post" action="'; echo WEB_ROOT ;echo '/item/index.php">
        <label>款号：</label><input size="50" type="text" name="item_number" />
        <label>尺码：</label><input type="text" name="size" />
        <label>发布季：</label><input type="text" name="season" />
        <input type="submit" value="开始查询" />
    </form>
</div>
<div id="data" style="">
    <h2>购物车中的产品：</h2>
    <table border="0">
        <thead><tr><th>序号</th><th>款号</th><th>类别</th><th>尺码</th><th>数量</th><th>单重g</th><th>总重g</th><th>吊牌价</th><th>折扣</th><th>折扣价</th><th>操作</th></tr></thead>
        '; if(is_array($cart)){foreach($cart AS $index=>$one) { ;echo '        '; if($one['provider_id']<>$provider_id) {
            $provider_id = $one['provider_id'];
            
            $sum_one = array_pop($sum);
        ;echo '        <tr class="provider">
            <td colspan="12">'; echo "提供商：".$one['provider_name']."&nbsp;&nbsp;地区：".$one['provider_province']; ;echo '            <span id="provider_'; echo $provider_id; ;echo '">重量小计：<span name="sum_weight">'; echo $sum_one['sum_weight']; ;echo '</span>&nbsp;&nbsp;金额小计：<span name="sum_money">'; echo $sum_one['sum_money']; ;echo '</span></span></td>
        </tr>
        '; } ;echo '        <tr id="item_'; echo $one['id']; ;echo '" onmouseover="cart_item_over(\'item_'; echo $one['id']; ;echo '\')" onmouseout="cart_item_out(\'item_'; echo $one['id']; ;echo '\')">
            <td name="id">'; echo $one['id']; ;echo '</td>
            <td name="item_number">'; echo $one['item_number']; ;echo '</td>
            <td name="category_name">'; echo $one['category_name']; ;echo '</td>
            <td name="size">'; echo $one['size']; ;echo '</td>
            <td name="quantity"><input size="5" name="quantity" value="'; echo $one['quantity']; ;echo '" onkeyup="cart_modiQuantity('; echo $one['id']; ;echo ',this.value);" /></td>
            <td name="weight" id="item_'; echo $one['id']; ;echo '_weight">'; echo $one['weight']; ;echo '</td>
            <td name="weight_sum" id="item_'; echo $one['id']; ;echo '_weight_sum">'; echo $one['weight']*$one['quantity']; ;echo '</td>
            <td name="origin">'; echo $one['origin']; ;echo '</td>
            <td name="discount">'; echo $one['discount']; ;echo '</td>
            <td name="price">'; echo mceil($one['discount']*$one['origin']); ;echo '</td>
            <td name="op"><a href="javascript:cart_del('; echo $one['id'] ;echo ')">删除</a></td>
        </tr>
        '; }} ;echo '        <tr><td colspan="11" align="right">
                <h2 id="cart_sum">总重：<span id="cart_sum_weight">'; echo $sum1['sum_weight']; ;echo '</span>克&nbsp;&nbsp;
                    总金额：<span id="cart_sum_money">'; echo $sum1['sum_money']; ;echo '</span></h2>
                '; echo $pagestring; ;echo '</td></tr>
    </table>
</div>
<div id="op">
    <h2>[&nbsp;<a href="'; echo WEB_ROOT; ;echo '/cart/order.php">下单</a>&nbsp;]</h2>
    <div>'; include template("express"); ;echo '</div>
</div>
<div id="help">help</div>
'; include template("footer"); ?>
