<%@ page language="VB" autoeventwireup="false" validaterequest="false" enabletheming="false" inherits="WebExam.Web.secure_storage_lista, App_Web_5ydpmfdq" %>


<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/modul/displayTest.ascx" TagName="displayTest" TagPrefix="uc1" %>
<%@ Register src="~/modul/WebMsg.ascx" tagname="WebMsg" tagprefix="uc2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/math/ASCIIMathML.js">
          //placeholder;
        </script>
    
 
</head>
<body style="padding:5px;" > <script type="text/javascript">
   function confirmDel(){return (confirm("确定要删除吗？删除后不可恢复！"))}
   var _testId;
    function edit(testId){
      _testId =testId;document.getElementById("T_insert").value="0";
      document.getElementById("T_testId").value=_testId;
      //location="store_a.aspx"+self.location.search+"&testid="+testId;
      var p=new Array();p[0]=self;
    parent.editTest(testId);//,p,"dialogHeight:500px;dialogWidth:770px;scroll:no;Status:no;help:no")
    
    }
    function insetTest(){
     document.getElementById("T_insert").value="1";
     var p=new Array();p[0]=self;
     //window.showModelessDialog("../testeditor/editsingletest.aspx"+self.location.search,p,"dialogHeight:500px;dialogWidth:770px;scroll:no;Status:no;help:no")
     parent.addTest();
    
    }
    function deleteTest(){
    if (!checkselect())
   {
  alert("请先选择试题！")
  return}
  if(confirmDel())
  document.getElementById("<%= Btn_delete.ClientId %>").click(); 
    return;
    }
    function checkselect() {
   
   var checklength=form1.cb_selected.length
 
   if (checklength==undefined)
   {
     if (form1.cb_selected.checked)
     {return true}
   }
  
  for(var i=0; i<checklength;i++)
   {
     if (form1.cb_selected(i).checked)
      return true
   }
  
  return false;
  
}
function saveSingleTest(note, score, plain, tests, scoreA, scoreB, scoreC, scoreD, scoreE, scoreF, levle, kp1, kp2) {
        document.getElementById("T_score").value=score;
        if(plain)document.getElementById("T_plain").value="1";else document.getElementById("T_plain").value="0";
        document.getElementById("T_test").value = tests[0]; document.getElementById("T_note").value = note;
        document.getElementById("T_xxa").value=tests[1];
        document.getElementById("T_xxb").value=tests[2];
        document.getElementById("T_xxc").value=tests[3];
        document.getElementById("T_xxd").value=tests[4];
        document.getElementById("T_xxe").value=tests[5];
        document.getElementById("T_xxf").value=tests[6];
        document.getElementById("T_sa").value=scoreA;
        document.getElementById("T_sb").value=scoreB;
        document.getElementById("T_sc").value=scoreC;
        document.getElementById("T_sd").value=scoreD;
        document.getElementById("T_se").value=scoreE;
        document.getElementById("T_sf").value=scoreF;
        document.getElementById("T_levle").value=levle;
        document.getElementById("T_kp1").value=kp1;
        document.getElementById("T_kp2").value=kp2;
        parent.frames[0].editorFrame.init();
        document.getElementById("<%= Btn_edit.ClientId %>").click(); 
    }

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name == 'cb_selected')
       e.checked = form.chkall.checked;
    }
    
  }
    </script>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

  
<uc2:WebMsg ID="WebMsg1" runat="server" />
    <div style="min-width:800px; margin:0">
        
        <div style="display: none">
            <input id="T_score" name="T_score" type="text" style="display: none" />
            <input id="T_plain" name="T_plain" type="text" style="display: none" />
            <input id="T_testId" name="T_testId" style="display: none" /><input id="T_note" name="T_note" type="text" />
            <input id="T_insert" name="T_insert" type="text" style="display: none" value="1" />
            <textarea id="T_test" name="T_test" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxa" name="T_xxa" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxb" name="T_xxb" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxc" name="T_xxc" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxd" name="T_xxd" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxe" name="T_xxe" cols="20" rows="2" style="display: none"></textarea>
            <textarea id="T_xxf" name="T_xxf" cols="20" rows="2" style="display: none"></textarea>
            <input id="T_sa" name="T_sa" type="text" style="display: none" />
            <input id="T_sb" name="T_sb" type="text" style="display: none" />
            <input id="T_sc" name="T_sc" type="text" style="display: none" />
            <input id="T_sd" name="T_sd" type="text" style="display: none" />
            <input id="T_se" name="T_se" type="text" style="display: none" />
            <input id="T_sf" name="T_sf" type="text" style="display: none" />
            <input id="T_levle" name="T_levle" type="text" style="display: none" />
            <input id="T_kp1" name="T_kp1" type="text" style="display: none" /><input id="T_kp2"
                name="T_kp2" type="text" style="display: none" />
            <asp:Button ID="Btn_edit" runat="server" Text="Btn_edit" />
            <asp:Button ID="Btn_delete" runat="server" Text="Btn_delete" />
        </div>
        <div style="text-align: center; font-size: large">
            题库管理
        </div>
        <div style="margin: 10px">
            当前科目：<asp:Label ID="L_subjectName" runat="server" Text=""></asp:Label>
            知识点
            <asp:DropDownList ID="D_keyPoint" runat="server" Style="color: navy;">
                <asp:ListItem Value="-1" Text="不限"></asp:ListItem>
            </asp:DropDownList>
            难度
            <asp:DropDownList ID="D_dgree" runat="server" Style="color: navy;">
                <asp:ListItem Value="127" Text="不限"></asp:ListItem>
                <asp:ListItem Value="0" Text="0"></asp:ListItem>
                <asp:ListItem Value="1" Text="1"></asp:ListItem>
                <asp:ListItem Value="2" Text="2"></asp:ListItem>
                <asp:ListItem Value="3" Text="3"></asp:ListItem>
                <asp:ListItem Value="4" Text="4"></asp:ListItem>
                <asp:ListItem Value="5" Text="5"></asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="Btn_ok" runat="server" Text="确定" />
        </div>
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="id">
            <LayoutTemplate>
                <ul id="itemPlaceholderContainer" runat="server" style="width: 100%; font-family: Verdana, Arial, Helvetica, sans-serif;
                    list-style-type: none; left: 0px; padding: 0px; margin: 0px">
                    <li id="itemPlaceholder" runat="server" />
                </ul>
            </LayoutTemplate>
            <EmptyDataTemplate>
                未返回数据。
            </EmptyDataTemplate>
            <EditItemTemplate>
            </EditItemTemplate>
            <ItemTemplate>
                <li style="background-color: #E0FFFF; color: #333333;">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td valign="top">
                               
                               <input type="checkbox"  name="cb_selected" value="<%# Eval("id") %>" />
                            
                                <a href='javascript:edit(<%# Eval("id") %>)'>编辑</a>
                            </td>
                            <td>
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td valign="top">
                                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.id") %>'
                                                Style="vertical-align: top; font-weight: bold;"></asp:Label>.
                                        </td>
                                        <td>
                                            <uc1:displayTest ID="displayTest1" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.timu") %>'
                                                plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <table cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label7" runat="server" Text="A."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest2" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.a") %>'
                                                            plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label6" runat="server" Text="B."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest3" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.b") %>'
                                                            plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label5" runat="server" Visible=' <%# DataBinder.Eval(Container, "DataItem.c") isnot dbNull.value %>'
                                                            Text="C."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest4" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.c") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.c") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label4" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.d") isnot dbNull.value %>'
                                                            Text="D."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest5" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.d") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.d") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label3" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.e") isnot dbNull.value %>'
                                                            Text="E."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest6" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.e") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.e") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label2" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.f") isnot dbNull.value %>'
                                                            Text="F."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest7" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.f") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.f") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </li>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <li style="background-color: #FFFFFF; color: #284775;">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td valign="top">
                                <input type="checkbox"  name="cb_selected" value="<%# Eval("id") %>" />
                              
                                <a href='javascript:edit(<%# Eval("id") %>)'>编辑</a>
                            </td>
                            <td>
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td valign="top">
                                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.id") %>'
                                                Style="vertical-align: top; font-weight: bold;"></asp:Label>.
                                        </td>
                                        <td>
                                            <uc1:displayTest ID="displayTest1" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.timu") %>'
                                                plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <table cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label7" runat="server" Text="A."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest2" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.a") %>'
                                                            plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label6" runat="server" Text="B."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest3" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.b") %>'
                                                            plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label5" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.c") isnot dbNull.value %>'
                                                            Text="C."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest4" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.c") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.c") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label4" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.d") isnot dbNull.value %>'
                                                            Text="D."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest5" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.d") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.d") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label3" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.e") isnot dbNull.value %>'
                                                            Text="E."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest6" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.e") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.e") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="Label2" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.f") isnot dbNull.value %>'
                                                            Text="F."></asp:Label>
                                                    </td>
                                                    <td>
                                                        <uc1:displayTest ID="displayTest7" runat="server" Visible='<%# DataBinder.Eval(Container, "DataItem.f") isnot dbNull.value %>'
                                                            text='<%# DataBinder.Eval(Container, "DataItem.f") %>' plain='<%# DataBinder.Eval(Container, "DataItem.plaintext") %>' />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </li>
            </AlternatingItemTemplate>
            <ItemSeparatorTemplate>
                <br />
            </ItemSeparatorTemplate>
        </asp:ListView>
        <pagers:PageNumbersPager ID="PageNumbersPager1" runat="server" />
        <div style="margin-top: 10px; margin-bottom: 10px; font-size: larger; font-weight: bold">
            <input id="selectAll" name="chkall" onclick="CheckAll(this.form)" type="checkbox" value="on" /><label for="selectAll"><strong>选中所有</strong></label>
                
            <a href="javascript:insetTest()">添加试题</a>
            <a href="javascript:deleteTest()">删除试题</a>
        </div>
    </div>
    
    </form>
</body>
</html>
