<?php
 include template("header"); ;echo '<link href="'; echo WEB_ROOT; ;echo '/include/library/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="'; echo WEB_ROOT; ;echo '/include/library/uploadify/swfobject.js"></script>
<script type="text/javascript" src="'; echo WEB_ROOT; ;echo '/include/library/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
    conf = {
        \'uploader\'  : \''; echo WEB_ROOT; ;echo '/include/library/uploadify/uploadify.swf\',
        \'script\'    : \''; echo WEB_ROOT; ;echo '/include/library/uploadify/uploadify.php\',
        \'cancelImg\' : \''; echo WEB_ROOT; ;echo '/include/library/uploadify/cancel.png\',
        \'folder\'    : \''; echo IMG_ROOT; ;echo '/images\',
        \'queueID\'   : \'fileQueue\',
          \'multi\'          : true,
          \'auto\'           : true,
          \'fileExt\'        : \'*.jpg,*.jpeg,*.csv,*.xls,*.rar\',
          \'removeCompleted\': false,
          \'onSelectOnce\'   : function(event,data) {
              $(\'#status-message\').text(data.filesSelected + \' 文件已经加入到上传队列！\');
            },
          \'onAllComplete\'  : function(event,data) {
              $(\'#status-message\').text(data.filesUploaded + \' 个文件上传完毕！ \' + data.errors + \' 个错误！\');
            },
        \'fileExt\'   : \'*.jpg,*.jpeg,*.csv,*.xls,*.rar\'
    };
    function upload(folder){
        $(\'#file_uploadUploader\').remove();
        conf[\'folder\'] = "'; echo WWW_ROOT; ;echo '" +folder;
        $(\'#file_upload\').uploadify(conf);
    }
    /*
    $(document).ready(function() {
      $(\'#file_upload\').uploadify(conf);
    });*/
</script>
<div id="menu2"><a href="ftp://tuan36524:09090909@www.tuan36524.com/wwwroot/agent/Static/" target="_black">FTP</a>
	<a href="file:///c:" target="_black">FTP</a>
	</div>
<div id="data"></div>
<div id="fm">
    <h2>文件上传</h2>
    <table>
        <tr><td>选择上传目录</td>
            <td>
                <select onchange="upload(this.value)">
                    <option>请选择...</option>
                    '; foreach($folder as $f){ ;echo '                    <option value="'; echo $f;;echo '">'; echo $f;;echo '</option>
                    '; } ;echo '                </select>
            </td>
        </tr>
        <tr><td>允许的文件类型</td><td>*.jpg,*.jpeg,*.csv,*.xls,*.rar</td></tr>
        <tr><td>上传</td><td>
                <div id="status-message">文件上传</div>
                <div id="fileQueue"></div>
                <input id="file_upload" type="file" name="Filedata" style="display:none" /></td></tr>
    </table>
    <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"); ?>
