<?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 '/item/discount.php">折扣列表</a></div>
<div id="fm">
    <h2>库存查询</h2>
    <form method="get" action="'; echo WEB_ROOT ;echo '/item/index.php">
        <table class="analysis">
            <tr><td width="50%" rowspan="2">款号：（多款产品可以同时查询：K2101AN032-241,K2101AN032-541,E82359）<br />
                    <textarea cols="50" rows="2" name="item_number"></textarea>
                </td><td width="50%">类别：
                    <select name="category" width="20">
                        <option value="">请选择...</option>
                        '; foreach($category as $one){;echo '                        <option value="'; echo $one['id']; ;echo '">'; echo $one['zone'].'｜'.$one['name']; ;echo '</option>
                        '; } ;echo '                    </select>
                    供货商：
                    <select name="provider">
                        <option value="">请选择...</option>
                        '; foreach($provider as $one){;echo '                        <option value="'; echo $one['id']; ;echo '">'; echo $one['name'].'-'.$one['brand'].'-'.$one['channel']; ;echo '</option>
                        '; } ;echo '                    </select>
                </td></tr>
            <tr><td>尺码：<input type="text" name="size" />
                    发布季：<input type="text" name="season" />
                </td></tr>
            <tr><td colspan="2"><input type="submit" value="开始查询" /></td></tr>
        </table>
    </form>
</div>
<div id="op">
    <h2></h2>
</div>
<div id="data" style="">
    <div>'; foreach($provider as $one){;echo '        '; echo $one['name']."-".$one['channel']."：".$one['remark']."<br />" ;echo '        '; };echo '    </div>
    <table>
        <thead><tr><th>ID</th><th>款号</th><th>类别</th><th>供货商</th><th>发布季</th><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($item)){foreach($item AS $index=>$one) { ;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>'; echo $one['id']; ;echo '</td>
            <td>'; echo $one['item_number']; ;echo '</td>
            <td>'; echo $one['zone']."｜".$one['name']; ;echo '</td>
            <td>'; echo $one['provider_name']; ;echo '</td>
            <td>'; echo $one['season']; ;echo '</td>
            <td>'; echo $one['origin']; ;echo '</td>
            <td>'; echo $one['bclass']; ;echo '</td>
            <td>'; echo $one['sclass']; ;echo '</td>
            <td>'; echo $one['gender']; ;echo '</td>
            <td>'; echo $one['color']; ;echo '</td>
            <td>'; echo $one['weight']; ;echo '</td>
            <td>'; echo $one['series']; ;echo '</td>
            <td>'; echo $one['size']; ;echo '</td>
            <td>'; echo $one['quantity']; ;echo '</td>
            <td><a class="cart_add" href="javascript:cart_add('; echo $one['id']; ;echo ')" >添加</a></td>
        </tr>
        '; }} ;echo '        <tr><td colspan="15">'; echo $pagestring; ;echo '</td></tr>
    </table>
</div>
<div id="help">
    1 查询方式举例：<br />
    1) 款号：K2101AN032-241,K2101AN032-541 点击查询：列出所查询款号的所有产品。<br />
    2) 款号：K2101AN032-241 尺码：xl,xxl 点击查询：列出所查询款号，尺码为 xl,xxl 的产品。<br />
</div>
'; include template("footer"); ?>
