<%@ page language="C#" autoeventwireup="true" inherits="admin_N25_quanxian, App_Web_sfvup29m" %>
<!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>
<link href="../css/main.css" rel="stylesheet" />
<link href="../css/GridView.css" rel="stylesheet" />
<link href="../css/pager.css" rel="stylesheet" type="text/css" />
<script src="../jquery-1.5.js" type="text/javascript">
</script>
<link href="../window/_css/window.css" rel="stylesheet" type="text/css" />
<script src="../js/ajaxdroplist.js" type="text/javascript">
</script>
<script type="text/javascript" >
function ll_show(t)
{
var div_show= document.getElementById (t);
div_show.style.display="block";
var show=document.getElementById ("show_"+t);
var hide=document.getElementById ("hide_"+t);
show.style.display="none";
hide.style.display="block";
}
function ll_hide(t)
{
var div_show= document.getElementById (t);
var show=document.getElementById ("show_"+t);
var hide=document.getElementById ("hide_"+t);
show.style.display="block";
hide.style.display="none";
div_show.style.display="none";
}
function selectCheckBoxes(domId,value,p) { 
if (p.checked==true)
{
p.value=true;
var div_show= document.getElementById (domId);
div_show.style.display="block";
}
else
{
p.value=false;
}
var inputs = document.getElementById(domId).getElementsByTagName("input");
for(var i = 0; i < inputs.length; i++) { 
if (inputs[i].type == 'checkbox') { 
inputs[i].checked=value; 
inputs[i].value=value;
}
}
}
function list_chick(p,id)
{
if (p.checked==true)
{
p.value=true;
var div_show= document.getElementById (id);
div_show.style.display="block";
var ckb = document.getElementsByName("ck_"+id);
for(var i=0;i<ckb.length;i++){
ckb[i].checked = true;
}
var ckc = document.getElementsByName("child_"+id);
for(var i=0;i<ckc.length;i++){
ckc[i].checked = true;
}
}
else
{
var ckb = document.getElementsByName("ck_"+id);
for(var i=0;i<ckb.length;i++){
ckb[i].checked = false;
}
var ckc = document.getElementsByName("child_"+id);
for(var i=0;i<ckc.length;i++){
ckc[i].checked = false;
}
p.value=false;
}
}
function list_chick_1(p,partid,mainid)
{
if (p.checked==true)
{
p.value=true;
var zoor_ck=document.getElementById ("zoor_"+partid);
zoor_ck.checked=true;
zoor_ck.value=true;
var inputs = document.getElementById(partid).getElementsByTagName("input"); 
for(var i = 0; i < inputs.length; i++)
{
if (inputs[i].type == 'checkbox') { 
if (inputs[i].id=="child_"+mainid )
{
inputs[i].checked=true;
inputs[i].value=true;
}
}
}
}
else
{
var inputs = document.getElementById(partid).getElementsByTagName("input"); 
for(var i = 0; i < inputs.length; i++) 
{ 
if (inputs[i].type == 'checkbox') { 
if (inputs[i].id=="child_"+mainid )
{
inputs[i].checked=false;
inputs[i].value=false;
}
}
}
var flage=0;
var inputs1 = document.getElementById(partid).getElementsByTagName("input"); 
for(var i = 0; i < inputs1.length; i++) 
{
if (inputs1[i].type == 'checkbox') {
if (inputs1[i].checked==true)
{
flage=1;
break;
}
else
{
flage=0;
}
}
}
if (flage==0)
{
var zoor_ck=document.getElementById ("zoor_"+partid);
zoor_ck.checked=false;
zoor_ck.value=false;
}
p.value=false;
}
}
function child_check(p,partid,mainid)
{
if (p.checked==true)
{
p.value=true;
var zoor_ck=document.getElementById ("zoor_"+partid);
zoor_ck.checked=true;
zoor_ck.value=true;
var ck=document.getElementById ("ck_"+mainid);
ck.checked=true;
ck.value=true;
}
else
{
p.value=false;
var k=0;
var inputs = document.getElementById(partid).getElementsByTagName("input"); 
for(var i = 0; i < inputs.length; i++) 
{
if (inputs[i].type == 'checkbox') { 
if (inputs[i].id=="child_"+mainid &&  inputs[i].checked==true)
{
k=1;
break;
}
else
{
k=0;
}
}
}
if (k==0)//未选中状态
{
var ck=document.getElementById ("ck_"+mainid);
ck.checked=false;
ck.value=false;
}
var flage=0;
var inputs1 = document.getElementById(partid).getElementsByTagName("input"); 
for(var i = 0; i < inputs1.length; i++) 
{
if (inputs1[i].type == 'checkbox') { 
if (inputs1[i].checked==true)
{
flage=1;
break;
}
else
{
flage=0;
}
}
}
if (flage==0)
{
var zoor_ck=document.getElementById ("zoor_"+partid);
zoor_ck.checked=false;
zoor_ck.value=false;
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="title">
个人权限管理
</div>
<div class="panel">
选择教师：<asp:DropDownList ID="Tea" runat="server" onchange="get_quanxian()" Width="180px">
</asp:DropDownList>
</div>
<div id="div_1" style=" text-align:left "> 
</div>
<div style="text-align:center" id="btn" style=" display:none ">
<asp:Button ID="Button1" runat="server" Text="保存"  CssClass="btn" OnClick="Button1_Click"  />
</div>
<div id="message" class="window_message" style="position: absolute; left: 42%; top: 35%;display: none">
<img alt="正在处理请稍等...." src="../images/loading.gif">正在处理请稍等....
</div>
</form>
<asp:Label ID="l2" runat="server" ></asp:Label>
</body>
</html>

