<%@ page language="C#" autoeventwireup="true" inherits="Knowledge_JqueryAdjunctUpload, App_Web_jxxxkg0n" theme="Themes" stylesheettheme="Themes" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

      <script type="text/javascript" src="../js/jquery.js"></script>
    <link href="../js/JQueryUpload/uploadify.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="../js/JQueryUpload/swfobject.js"></script> 

<script type="text/javascript" src="../js/JQueryUpload/jquery.uploadify.v2.1.4.js"></script>
 <script src="../js/artDialog3/artDialog.min.js"></script>

    <script>        (function($) { var d = $.dialog.defaults; d.skin = ['chrome']; })(art);</script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#uploadify").uploadify({
            'uploader': '../js/JQueryUpload/uploadify.swf',
            'script': '../js/JQueryUpload/UploadKnowledge.aspx?id=' + document.getElementById("hideId").value + '$type=' + document.getElementById("hideTypeId").value, //哈哈哈哈可以根据实际情况改变此后台文件，自己重写
            'cancelImg': '../js/JQueryUpload/cancel.png',
            'folder': '/upload/KnowledgeAdjunct',
            'queueID': 'fileQueue',
            'auto': false,
            'multi': true,
            'fileDesc': '音频wma;mp3;视频wmv;swf;flv;文本txt;电子书pdf;office文档;',
            'fileExt': '*.wma;*.mp3;*.wmv;*.swf;*.flv;*.txt;*.pdf;*.doc;*.xls;*.ppt',
            'sizeLimit': '500000000',

            'buttonImg': '/images/selectfile.gif',
            'onComplete': function(event, queueID, fileObj) {
                //alert('文件：' + fileObj.name + "size:" + fileObj.size + "格式：" + fileObj.type); 

            },
            'onAllComplete': function(event, data) {
                art.dialog({ content: '共上传' + data.filesUploaded + '个文件,错误数' + data.errors + ',平均速度' + data.speed.toFixed(2) + 'kb/s', yesText: '确定', lock: true, icon: 'succeed', width: '200px', yesFn: function() {
                    //alert('xxxx');
                    //art.dialog.close();
                    return true;
                }
                });
            }
        });
    }); 
    
    //用ajax的方式向数据库插入课件信息
</script> 
</head>
<body>
    <form id="form1" runat="server">
        <table cellpadding="6px" cellspacing="1" width="100%" border="0" class="table_notitle">
            <tr>
                <td colspan="2" align="center" class="td02">
                    <font color="red" style="font-size:12px;">系统目前支持的课件类型有音频wma;mp3;视频wmv;swf;flv;文本txt;电子书pdf;幻灯片mht</font>
                </td>
            </tr>
            <tr>
                <td height="25" width="30%" align="right" class="td01" style="font-size:12px;">
                    上传附件：
                </td>
                <td height="25" width="*" align="left" style="font-size:12px;">
                  
                   <asp:HiddenField ID="hideId" Value="0" runat="server" />
                   <asp:HiddenField ID="hideTypeId" Value="0" runat="server" />
                   <input type="file" name="uploadify" id="uploadify" />
<div id="fileQueue"></div> 
<br />
<input id="btnUpload" class="conn_btn" onclick="javascript:$('#uploadify').uploadifyUpload()" type="button" value="上传" />
                  <input id="btnCancel" onclick="javascript:$('#uploadify').uploadifyClearQueue()" class="conn_btn" type="button" value="取消上传" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

