authority_edit.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:4k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="authority_edit.aspx.cs" Inherits="web_system_authority_edit" %>
- <!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>
- <link href="../../css/style.css" rel="stylesheet" type="text/css" />
- <script language="javascript" type="text/javascript">
- function check(id)
- {
- var current = document.getElementById("chk"+id);
- var temp1 = document.getElementsByTagName("input");
- for(var i=1; i<temp1.length; i++)
- {
- if(temp1[i].type == "checkbox" && temp1[i].parent==id)
- {
- temp1[i].checked = current.checked;
- var temp2 = document.getElementsByTagName("input");
- for(var j=1; j<temp2.length; j++)
- {
- if(temp2[j].type == "checkbox" && ("chk"+temp2[j].parent)==temp1[i].id)
- {
- temp2[j].checked = current.checked;
- var temp3 = document.getElementsByTagName("input");
- for(var k=1; k<temp3.length; k++)
- {
- if(temp3[k].type == "checkbox" && ("chk"+temp3[k].parent)==temp2[j].id)
- {
- temp3[k].checked = current.checked;
- }
- }
- }
- }
- }
- }
- }
- function sum()
- {
- var flag = "0";
- var menus = "";
- for(var i=0; i<1000; i++)
- {
- if(document.getElementById("chk"+i)!=null)
- {
- if(document.getElementById("chk"+i).checked)
- {
- flag = "1"
- menus = menus + i + ",";
- }
- }
- }
- if(flag == "0")
- {
- alert("請至少選擇一個選單");
- return false;
- }
- var dir_edit = "";
- for(var i=0; i<1000; i++)
- {
- if(document.getElementById("rb"+i+"_1")!=null)
- {
- if(document.getElementById("rb"+i+"_1").type=="radio")
- {
- if(document.getElementById("rb"+i+"_1").checked)
- {
- var value = document.getElementById("rb"+i+"_1").value.substring(4,document.getElementById("rb"+i+"_1").value.length);
- dir_edit = dir_edit + value + ";";
- }
- }
- }
- }
- document.all.DirEdit.value = dir_edit.substring(0,menus.length-1);
- document.all.Menus.value=menus.substring(0,menus.length-1);
- return true;
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <center>
- <br />
- <asp:Label ID="LblName" runat="server" Style="position: relative" Text="權限群組名稱: "></asp:Label>
- <asp:TextBox ID="TxtName" runat="server" Style="position: relative"></asp:TextBox>
- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtName"
- ErrorMessage="名稱不能為空" Style="position: relative"></asp:RequiredFieldValidator>
- <br /></center>
- <asp:HiddenField ID="MaxDir" runat="server" />
- <input id="DirEdit" runat="server" type="hidden" />
- <input id="Menus" runat="server" type="hidden" />
- <asp:Panel ID="PnlOa" runat="server" Width="900px" Font-Bold="True" BackColor="#EFEFEF">
- </asp:Panel>
- <br />
- <asp:Panel ID="PnlKm" runat="server" Width="900px" Font-Bold="True" BackColor="#EFEFEF">
- </asp:Panel>
- <br />
- <center>
- <asp:Button ID="BtnOk" runat="server" Text="儲存" OnClick="BtnOk_Click" OnClientClick="return sum()" />
- </center>
- </div>
- </form>
- </body>
- </html>