<%@ page language="VB" masterpagefile="~/blank.master" autoeventwireup="false" inherits="WebExam.Web.storage_index, App_Web_5ydpmfdq" title="题库安全设置" %>

<%@ MasterType VirtualPath="~/blank.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:ScriptManager id="ScriptManager" runat="server" />
<!--telerik:RadWindowManager ID="RadWindowManager1" Skin="Vista" Height="500" Width="600" VisibleStatusbar="False" Modal="True">
        
    </telerik:RadWindowManager-->

    <script type="text/javascript">
    var oWnd =null;
  function userInfo_onclick(userId) {
  
   //oWnd = window.radopen('../../department/userInfo.aspx?userid='+encodeURIComponent(userId), "null");
      //top.__modalFrame('../../department/userInfo.aspx?userid='+encodeURIComponent(userId),500,500)
      window.showModalDialog('../../department/userInfo.aspx?userid=' + encodeURIComponent(userId), "userInfo", "dialogHeight:550px;dialogWidth:480px;scroll:no;Status:no;help:no")
  }
 
 function closeWindow(){
   if(oWnd!=null)oWnd.close();
 
 }
function checkselect() {var userList="";
    
    var form=document.forms[0];  
   if(form.select.length==null){
      if (form.select.checked) userList=form.select.value;
      else
      
      userList="";
   }
   else{
   var checklength=form.select.length
   
  for(var i=0; i<checklength;i++)
   {
     if (form.select(i).checked)
      {userList+=","+form.select(i).value}
   }
  
  
   
   }
   if(userList!=""){
    userList=userList.substring(1);
  return true;}
  else{alert("请先选择用户！");
  return false;}
  
}

    </script>

    <table>
        <tr>
            <td valign="top">
                &nbsp;</td>
            <td style="width: 20px">
            </td>
            <td valign="top">
                <asp:RadioButton ID="RB_secure" GroupName="addp" runat="server" AutoPostBack="true"
                    onkeyup="secure()" Text="仅限指定人员使用" />
                <asp:RadioButton ID="RB_public" runat="server" AutoPostBack="true" GroupName="addp"
                    onkeyup="secure()" Text="允许任何人使用" />
                <asp:Panel ID="Panel1" Visible="false" runat="server">
                   
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="#333333" GridLines="None">
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <input type="checkbox" value='<%# DataBinder.Eval(Container.DataItem, "userId") %>'
                                        name="select" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="userId" HeaderText="指定人员列表" />

                            <asp:HyperLinkField
                            Text="详细资料"></asp:HyperLinkField>
                        </Columns>
                        <EmptyDataTemplate>
                            <h3>无指定人员</h3></EmptyDataTemplate>
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <p>注意：指定人员仅可以使用本级科目的题库，不可以使用下级题库。本级题库管理员及上级题库管理员已具有使用题库的权限。</p>
                    <asp:Button ID="B_delete" runat="server" Text="删除选中用户" OnClientClick="return checkselect();" />
                    <asp:TextBox ID="TB_user" ValidationGroup="add" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ValidationGroup="add" Display="None" ID="RequiredFieldValidator1"
                    runat="server" ErrorMessage="请输入用户名！" ControlToValidate="TB_user"></asp:RequiredFieldValidator>
                <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
                    TargetControlID="RequiredFieldValidator1">
                </ajaxToolkit:ValidatorCalloutExtender>
                    
                    <asp:LinkButton
                        ID="L_add" runat="server" ValidationGroup="add">添加用户</asp:LinkButton>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
