<?php
 include template("header"); ;echo '<div id="menu2"><a href="'; echo WEB_ROOT;;echo '/manage/file_upload.php">文件上传</a></div>
<div id="data"></div>
<div id="fm">
    <h2>产品上传</h2>
    <form id="item_upload" method="post" action="'; echo WEB_ROOT; ;echo '/manage/item_upload.php">
        <table>
            <tr><td>选择供应商</td>
                <td>
                    <select name="provider">
                        <option value="null">请选择...</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>选择产品分类</td>
                <td>
                    <select name="category">
                        <option value="null">请选择...</option>
                        '; foreach($category as $one){;echo '                        <option value="'; echo $one['id']; ;echo '">'; echo $one['zone']."｜".$one['name']; ;echo '</option>
                        '; } ;echo '                    </select>
                </td>
            </tr>
            <tr><td>选择CSV</td>
                <td>
                    <select name="csvfile">
                        <option value="null">请选择...</option>
                    '; foreach($files as $f){ if($f != "." && $f != ".."){;echo '                        <option>'; echo iconv("GB2312", "UTF-8", $f); ;echo '</option>
                    '; }} ;echo '                    </select>
                </td>
            </tr>
            <tr><td>粘贴CSV</td><td><textarea name="csv" cols="100" rows="20" ></textarea></td></tr>
            <tr><td>操作</td><td><input type="submit" value="确定上传" /></td></tr>
        </table>
    </form>
</div>
<div id="op">
    <h2>操作部分</h2>
</div>
<div id="help">注意上传某一个仓库的库存，降删除原有库存，替换为最新上传的库存</div>
'; include template("footer"); ?>
