<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExamImportWord_Form.aspx.cs"
    Inherits="RM.Web.Training.ExamImportWord.ExamImportWord_Form" %>

<!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 runat="server">
    <title></title>
    <script src="/Training/AskVolume/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="/Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Live/swfobject.js"></script>
    <script src="/Themes/Scripts/ShowMsg/msgbox.js" type="text/javascript"></script>
    <link href="/Themes/Scripts/ShowMsg/msgbox.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <img alt="loading" id="loading" style="top: 30%; left: 30%; position: absolute;"
        src="/Training/ExamImportWord/2897814_144041223195_2.gif" />
    <div>
        <input type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("AnnexUpload")%>"
            onclick="shangchuan_fj()">
          <a href="Test.doc">模版下载</a>
    </div>
    <div id="tksup" style="position: absolute; top: 25px; display: none; border: 1px #ccc solid;
        width: 610px; margin-left: 10px; background-color: White; padding-left: 10px;">
    </div>
    </form>
    <form id="ExamImport" action="ExamImportWord_List.aspx?key=ImportWord" method="post">
    <input type="hidden" name="json" id="json" value="" />
    <input type="hidden" name="key" id="Hidden1" value="ImportWord" />
    </form>
    <p>
    <fieldset style="height:100%;">
    <legend>帮助</legend> 
    <div style=" overflow:auto;height:100%">
     <div>
<p class="a1"> <br>
  [单选题]</p><br>
  <p class="a2">这是单选题第一题的题目
  <br>选项1<br>
  选项2<br>
  选项3<br>
  答案：A<br>
  注释：这里是注释的内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)</p>
<p>...... <br>
</p>
[单选题END]
<p>&nbsp;</p>
<p>&nbsp;</p>

<p class="a1">[多选题]</p><br>
  <p class="a2">这是多选题第一题的题目<br>
  选项1<br>
  选项2<br>
  选项3<br>
  答案：AB<br>
  注释：这里是注释的内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)<br>
  ....<br><br>
</p><br>
[多选题END]
<p>&nbsp;</p>
<p>&nbsp;</p>

<p class="a1">[问答题]</p><br>
  <p class="a2">问答题1的标题<br>  
  注释：这里是注释的内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)<br>
</p>
<p>...</p><br>
[问答题END]
<p>&nbsp;</p>
<p>&nbsp;</p>


<p class="a1">[排序题]</p><br>
  <p class="a2">这是排序题第一题的题目<br>
  选项1<br>
  选项2<br>
  选项3<br>
  答案：321<br>
  注释：这里是注释的内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)<br>
...<br><br>
</p>
[排序题END]
<p>&nbsp;</p>

<p class="a1">[判断题]</p><br>
  <p class="a2">这里是判断题1的标题<br>
  答案：对<br>
  注释：这里是判断题2的注释内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)<br>
  .....<br><br></p>
<p>&nbsp;</p>
[判断题END]
<p>&nbsp;</p>



<p class="a1">[填空题]</p><br>
<p>这里是填空的题目(答案1)(答案2)<br>
	注释：这里是注释的内容(可略)<br>
  分数：该题所占分数，分数为数字(可略)<br>
  ...<br><br>
</p>
[填空题END ]
<p>&nbsp;</p>
<p>&nbsp;</p>


<p></p>
</div> 
</div></fieldset>
    </p>
    <script type="text/javascript">
        var patharray = new Array();
        //附件上传
        function shangchuan_fj() {
            var flashvars = {
                FileType: '*.doc;*.docx;',
                FileMaxCount: 10,
                FilePath: '/Training/Courseware/UpLoadShares.ashx',
                FileSize: 1024 * 300
            };
            FlexUpload(flashvars);
        }
        //Flex文件上传
        function FlexUpload(flashvars) {
            $("#tksup").show();
            $("#tksup").append("<div id='ad1'></div>");
            var swfVersionStr = "10.0.0";
            var xiSwfUrlStr = "/live/playerProductInstall.swf";
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id = "ad1";
            attributes.name = "ad1";
            attributes.align = "middle";
            swfobject.embedSWF("/Live/TKS-UP.swf", "ad1", "600", "270", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
        }
        //Flex上传回调函数
        //---name:为文件名---data:FilePath地址返回值
        function uploadCompelete(name, data) {
            if (data == -3) {
                //     showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("File_not")%>,",2000, 5);
            } else if (data == -2) {
                //  showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("File_size")%>", 2000, 5);
            } else {
                patharray.push(data + "|" + name);
            }
        }
        //全部文件上传结束后触发
        function uploadEnd(name) {
            $("#tksup").hide();
            $("#ad1").remove();
            Loading(true);
            UpExamCo2p();
        }

        //进行云转换
        function UpExamCo2p() {
            Loading(false);
            getAjax("ExamImportWordSever_.ashx", "PathArray=" + patharray, function (rs) {
                //  $("#loading").hide();
                if (rs == "404") {
                    alert("404:未找到上传文件");
                } else {
                    var data = eval("(" + rs + ")");
                    showTipsMsg("上传成功数:" + data.sumcount, 2000, 4)
                    var errhtml = "";
                    $(data.errlist).each(function (i, obj) {
                        errhtml += obj;
                    });
                    if (errhtml != "") {
                        showTipsMsg(errhtml, 2000, 5);
                    }
                    $("#json").val(data.pathlist);
                    $("#ExamImport").submit();
                }
            });
        }
    </script>
</body>
</html>
