<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="extexamdatamanager.aspx.cs" Inherits="Us.Web.Extend.admin.extexam.extexamdatamanager" %>


<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>试题管理管理</title>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />

    <%=ImportScriptStr %>
    <script language="javascript" type="text/javascript">

        var editor, editor1;
        //KindEditor.ready(function (K) {
        //    editor = K.create('textarea[name="txtDAsk"]', {
        //        resizeType: 1,
        //        allowPreviewEmoticons: false,
        //        newlineTag: 'br',
        //        filterMode: false,
        //        height: "200px",
        //        minHeight: 200,//设置编辑器的最小高度
        //        cssPath: ['../plugins/code/prettify.css', 'index.css'],
        //        allowImageUpload: false,
        //        items: [
        //            'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
        //            'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
        //            'insertunorderedlist', '|', 'emoticons', 'image', 'link', '', 'source']
        //    });
        //});
        KindEditor.ready(function (K) {
            editor = K.create('textarea[name="txtDAsk,txtDTitle,txtDAnswer"]', {
                
                resizeType: 1,
                allowPreviewEmoticons: false,
                newlineTag: 'br',
                filterMode: false,

                cssPath: ['../plugins/code/prettify.css', 'index.css'],
                allowImageUpload: false,
                items: [
                    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                    'insertunorderedlist', '|', 'emoticons', 'image', 'link', '', 'source']
            });
        });



    </script>
    <script src="../js/jquery/jquery.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {

            $("#drpTID").change(function () {
                changeTID($(this).val());
            });
            changeTID($("#drpTID").val());

        });

        function changeTID(tid) {
            //1填空题，2单选题，3多选题，4判断题，5简答题，6阅读题
            //        试题题目sttm
            //        选项内容xxnr
            //        试题答案stda
            //        选项个数xxgs
            //        试题答案stdadanx
            //        试题答案stdaduox
            //        试题答案stdapd
            //        试题解析stjx
            //        关键词gjc

            var $sttm = $("#sttm");
            var $xxnr = $("#xxnr");
            var $stda = $("#stda");
            var $xxgs = $("#xxgs");
            var $stdadanx = $("#stdadanx");
            var $stdaduox = $("#stdaduox");
            //var $stdapd = $("#stdapd");
            var $stjx = $("#stjx");
            var $gjc = $("#gjc");
            //alert(tid);
            switch (tid) {
                case "1": //填空题
                    $sttm.show();
                    $xxnr.hide();
                    $stda.show();
                    $xxgs.hide();
                    $stdadanx.hide();
                    $stdaduox.hide();
                    //$stdapd.hide();
                    $stjx.show();
                    $gjc.show();
                    break;
                case "2": //单选题
                    $sttm.show();
                    $xxnr.show();
                    $stda.hide();
                    $xxgs.show();
                    $stdadanx.show();
                    $stdaduox.hide();
                   // $stdapd.hide();
                    $stjx.show();
                    $gjc.show();
                    break;
                case "3": //多选题
                    $sttm.show();
                    $xxnr.show();
                    $stda.hide();
                    $xxgs.show();
                    $stdadanx.hide();
                    $stdaduox.show();
                   // $stdapd.hide();
                    $stjx.show();
                    $gjc.show();
                    break;
                case "4": //判断题
                    //$sttm.show();
                    //$xxnr.hide();
                    //$stda.hide();
                    //$xxgs.hide();
                    //$stdadanx.hide();
                    //$stdaduox.hide();
                    //$stdapd.show();
                    //$stjx.show();
                    //$gjc.show();
                    $sttm.show();
                    $xxnr.show();
                    $stda.hide();
                    $xxgs.show();
                    $stdadanx.show();
                    $stdaduox.hide();
                    //$stdapd.hide();
                    $stjx.show();
                    $gjc.show();
                    break;
                case "5": //简答题
                    $sttm.show();
                    $xxnr.hide();
                    $stda.show();
                    $xxgs.hide();
                    $stdadanx.hide();
                    $stdaduox.hide();
                    //$stdapd.hide();
                    $stjx.show();
                    $gjc.show();
                    break;
                case "6": //阅读题
                    $sttm.show();
                    $xxnr.hide();
                    $stda.show();
                    $xxgs.hide();
                    $stdadanx.hide();
                    $stdaduox.hide();
                    //$stdapd.hide();
                    $stjx.show();
                    $gjc.hide();
                    break;
            }
            win_onLoad();
        }

    </script>

    <script src="../js/jquery/jquery.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function opJsTree(txt, txtValue) {
            var para = "/admin/extexam/extexamsorttreeselect.aspx?para=" + "1" + "&list=" + $("#" + txtValue).val();
            //UsOpenDialogTree(para, txt, txtValue);
            CareffArtOpen4(para, '题库分类', 300, 500, function (path) {
                //alert(path);
                if (path == null) { return false; }
                var strs = path.split("#")
                var m = $id(txt)
                m.value = strs[1];
                var m1 = $id(txtValue)
                m1.value = strs[0];
            });
        }


    </script>
    <script language="javascript" type="text/javascript">

        function jscheckAll() {
            var info = "对不起，你必须输入试题标题才能提交？";

            var html = editor.html();
            //alert(html);
            var TID = $("#drpTID").val()
            if (html == "" || html == "<br />") {
                CareffArtAlert(info, 2);
                return false;
            }
            switch (tid) {
                case "2": //单选题
                    break;
                case "3": //多选题
                    break;
                case "4": //判断题
                    break;
            }


            //alert(art.dialog.data("retdata"));


            return true;

        }


    </script>
</head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">

        <div id="tbMain">
            <div class="divTbg">
                <div class="divTbgL">
                </div>
                <div class="divTbgInfo">
                    <div class="divTbgTitle">
                        试题管理管理
                    </div>
                </div>
            </div>
            <div class="divTbgF">
            </div>
            <div class="divTNavBG" id="topURL">
                <ul id="topURLul">
                    <li class="divURLed" id="div1">
                        <div>
                            <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                            基本信息
                        </div>
                    </li>
                </ul>
            </div>
            <div id="mypanel">
                <div class="divInfoContext">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        试题管理管理
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist" onmouseover="changeto()" onmouseout="changeback()">
                            <tr class="tablisttr">
                                <td class="tablisttitle">题库编号<span class="fStar">*</span></td>
                                <td class="tabmanagertr">


                                    <div class="nodisplay">
                                        <asp:TextBox ID="txtSID" runat="server" ToolTip="题库编号" Text="0"></asp:TextBox>
                                    </div>
                                    <asp:TextBox ID="txtParentName" runat="server" ToolTip="父级菜单" Text="『题库分类管理』" CssClass="1"></asp:TextBox>
                                    <a href="javascript:opJsTree('txtParentName','txtSID');">[选择]</a>



                                </td>
                                <td class="tablisttitle">是否启用<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:DropDownList runat="server" ID="drpEnableState" ToolTip="是否启用">
                                        <asp:ListItem Value="CodeYesNo" Text="codeno"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">试题类型</td>
                                <td class="tabmanagertr">


                                    <asp:DropDownList runat="server" ID="drpTID" ToolTip="试题类型编号">
                                        <asp:ListItem Value="CodeYesNo" Text="code"></asp:ListItem>
                                    </asp:DropDownList>



                                </td>
                                <td class="tablisttitle">难度等级</td>
                                <td class="tabmanagertr">

                                    <asp:DropDownList runat="server" ID="drpDGrade" ToolTip="难度等级">
                                        <asp:ListItem Value="ExamDGrade" Text="codeno"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">显示顺序<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtShowID" runat="server" ToolTip="显示顺序" Text="1" CssClass="1"></asp:TextBox>
                                </td>
                                <td class="tablisttitle">问题数量</td>
                                <td class="tabmanagertr"></td>
                            </tr>
                            <tr class="tablisttr" id="sttm">
                                <td class="tablisttitle">试题标题<span class="fStar">*</span></td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDTitle" runat="server" ToolTip="试题标题" Text="" TextMode="MultiLine" Height="60px" Width="100%"></asp:TextBox>
                                </td>

                            </tr>
                            <tr class="tablisttr" id="xxnr">
                                <td class="tablisttitle">试题内容</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDAsk" runat="server" ToolTip="试题内容" Text="" TextMode="MultiLine" Height="150px" Width="100%"></asp:TextBox>
                                </td>

                            </tr>

                            <tr class="tablisttr" id="stda">
                                <td class="tablisttitle">试题答案</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDAnswer" runat="server" ToolTip="问题答案" Text="" TextMode="MultiLine" Height="60px" Width="100%"></asp:TextBox></td>
                            </tr>
                            <tr class="tablisttr" id="xxgs">
                                <td class="tablisttitle">选项个数</td>
                                <td class="tabmanagertr" colspan="3">


                                    <asp:DropDownList ID="drpDNumber" runat="server" ToolTip="选项个数" AutoPostBack="True" OnSelectedIndexChanged="drpDNumber_SelectedIndexChanged">
                                        <asp:ListItem>2</asp:ListItem>
                                        <asp:ListItem>3</asp:ListItem>
                                        <asp:ListItem Selected="True">4</asp:ListItem>
                                        <asp:ListItem>5</asp:ListItem>
                                        <asp:ListItem>6</asp:ListItem>
                                        <asp:ListItem>7</asp:ListItem>
                                        <asp:ListItem>8</asp:ListItem>
                                        <asp:ListItem>9</asp:ListItem>
                                    </asp:DropDownList>


                                </td>
                            </tr>
                            <tr class="tablisttr" id="stdadanx">
                                <td class="tablisttitle">试题答案</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:RadioButtonList ID="radDAnswer" runat="server"
                                        RepeatDirection="Horizontal" RepeatLayout="Flow">
                                        <asp:ListItem>(A)</asp:ListItem>
                                        <asp:ListItem>(B)</asp:ListItem>
                                        <asp:ListItem>(C)</asp:ListItem>
                                        <asp:ListItem>(D)</asp:ListItem>

                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr class="tablisttr" id="stdaduox">
                                <td class="tablisttitle">试题答案</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:CheckBoxList ID="cblDAnswer" runat="server" RepeatDirection="Horizontal"
                                        RepeatLayout="Flow">
                                        <asp:ListItem>(A)</asp:ListItem>
                                        <asp:ListItem>(B)</asp:ListItem>
                                        <asp:ListItem>(C)</asp:ListItem>
                                        <asp:ListItem>(D)</asp:ListItem>

                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <%--<tr class="tablisttr" id="stdapd">
                                <td class="tablisttitle">试题答案</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:RadioButtonList ID="radDAnswer1" runat="server"
                                        RepeatDirection="Horizontal" RepeatLayout="Flow">
                                        <asp:ListItem Value="0">(对)</asp:ListItem>
                                        <asp:ListItem Value="1">(错)</asp:ListItem>
                                    </asp:RadioButtonList></td>
                            </tr>--%>
                            <tr class="tablisttr">
                                <td class="tablisttitle">问题解析</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDAnalysis" runat="server" ToolTip="问题解析" Text="" TextMode="MultiLine" Height="40px" Width="100%"></asp:TextBox>
                                </td>
                                </tr>
                            <%-- <tr class="tablisttr">
                                <td class="tablisttitle">关键词</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDKey" runat="server" ToolTip="关键词" Text="" TextMode="MultiLine" Height="40px" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">知识点</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDPoint" runat="server" ToolTip="知识点" Text="" TextMode="MultiLine" Height="40px" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                            
                            
                            <tr class="tablisttr">
                                <td class="tablisttitle">试题说明</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtDInfo" runat="server" ToolTip="试题说明" Text="" TextMode="MultiLine" Height="40px" Width="100%"></asp:TextBox>
                                </td>
                            </tr>--%>
                        </table>




                        <div class="divSave">
                            <asp:Button ID="btnSubmit" runat="server" Text="保存(S)"
                                CssClass="SkyButtonFocus" OnClick="btnSubmit_Click" />
                            <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus"
                                OnClick="btnSubmit_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </form>
</body>
</html>
