<html><head><title>系统用户列表</title>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<LINK href="../CSS/Base.css" rel=stylesheet>
<link href="../CSS/Common.css" rel="stylesheet" type="text/css"/>
<LINK href="../CSS/Window.css" type=text/css rel=stylesheet>
<link href="../CSS/Tab.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../JS/Common.js.php"></script>
<script type="text/javascript" src="../JS/Window.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.min.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.notification.js.php"></script>
<link type="text/css" rel="stylesheet" href="../CSS/Notification.css" />
<script type="text/javascript" src="../JS/Actions.js.php"></script>
<script type="text/javascript" src="../JS/CheckQuestion.js.php"></script>
   <style>
		.wrap {
			margin: 0px; text-align: left;
			width:100%;
		}
		#wrap {
			clear: both; border-right: #244d8f 0px solid; border-top: #244d8f 0px solid; min-height: 460px; padding-bottom: 10px; border-left: #244d8f 0px solid; border-bottom: #244d8f 0px solid; background-color: #fff
		}
    </style>
<script language="javascript"> 
function checkall(form) 
{
	if( form.all.checked)
	{
		for(var i = 0;i < form.elements.length-1; i++) 
		{
			var e = form.elements[i];
			if( ! e.disabled )	e.checked = true;
		}
	}
	else
	{
		for(var i = 0;i < form.elements.length-1; i++) 
		{
			var e = form.elements[i];
			if( ! e.disabled )	e.checked = false;
		}
    }
}
function refreshParent() {
   //self.location.replace(self.location.href);
   self.location.reload();
   parent.refreshNode();
}
function checkSelectUser()
{
	var strErr = "操作要求必须先选择一个或多个节点！";
	objField = document.Check_Form.userGroupID;
	if( typeof objField != 'undefined' )
	{
		if( objField.length == null )
		{
			if (! objField.disabled && objField.checked) return true;
			else
			{
				document.Check_Form.all.focus();
				$.notification(strErr);
				return false;
			}
		}
		else
		{
			for (i=0;i<objField.length;i++){
				if ( ! objField[i].disabled && objField[i].checked) return true;
			}
			document.Check_Form.all.focus();
			$.notification(strErr);
			return false;
		}
	}
	else
	{
		$.notification(strErr);
		return false;
	}
}
function checkUserAction( actionValue )
{
	if ( checkSelectUser()) 
	{
		gId('formAction').value = actionValue;
		gId('Check_Form').submit();
	}
}

function deleteUserSubmit()
{
	if( document.getElementById('tran_userGroupID') == null )
	{
		if ( checkSelectUser()) 
		{
			if( window.confirm('危险提示!!!您真的想删除选中的这些用户节点吗？操作将会删除该节点以及节点所属的全部用户信息，并将删除所属用户创建的所有问卷数据，而且不可恢复！') )
			{
				checkUserAction('DeleUsersSubmit');
			}
		}
	}
	else
	{
		gId('tran_userGroupID_container').innerHTML = "<input name=\"t_tran_userGroupID\" size=20>";
		gId('DeleUsersSubmit').value = '删除';
		gId('TranUsersSubmit').value = '检索';
	}
}

function tranUserSubmit()
{
	if( document.getElementById('tran_userGroupID') == null )
	{
		if(Trim(gId('t_tran_userGroupID').value) == '' )
		{
			$.notification("输入节点名中的关键字获得可选择的节点列表!");
			gId('t_tran_userGroupID').focus();
		}
		else
		{
			AjaxRequest("../System/AjaxSearchNodes.php?groupType={groupType}&t_name="+Trim(gId('t_tran_userGroupID').value));
		}
	}
	else
	{
		if ( checkSelectUser() && CheckListNoSelect(gId('tran_userGroupID'),"需要迁往的节点")) 
		{
			gId('formAction').value = 'TranUsersSubmit';
			gId('Check_Form').submit();
		}
	}
}
function AjaxRequest(url)
{
    var ajax=false; 
	try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch (e) { try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { ajax = false; } }
	if (!ajax && typeof XMLHttpRequest!='undefined') ajax = new XMLHttpRequest(); 

	ajax.onreadystatechange = function(){
	   if( ajax.readyState == 4 && ajax.status == 200)
	   {
		  var theRtnArray = ajax.responseText.split('######');
		  if( theRtnArray[0] == 'false' )
		  {
			  $.notification(theRtnArray[1]);
			  gId('t_tran_userGroupID').focus();
		  }
		  else
		  {
			  gId('tran_userGroupID_container').innerHTML = theRtnArray[1];
			  gId('DeleUsersSubmit').value = '清空';
			  gId('TranUsersSubmit').value = '开始';
		  }	
	   }
	};
	ajax.open('GET', url, true);
	ajax.send(null);
}
</script>
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<body oncontextmenu="return false" style="margin-top:0px;padding-top:0px;">
<div id="tabs1" style="margin-top:0px;padding-top:0px;"> 
    <ul> 
        <li><a href="{thisURL}"><span>节点用户</span></a></li>
        <li id="current"><a href="{thisNodeURL}"><span>子节点</span></a></li>
    </ul> 
</div> 

<div style="line-height:10px">&nbsp;</div>
<div class="wrap q_clear" id=wrap>
<div class=q_clear id=mysurvey><h1 style="font-size: 16px;">列出<span class=red title="{nodeAllName}"><u>{nodeName}</u></span>的子节点</h1><p class=surveynum>[ <span class=red>{recNum}</span> 节点 ]</p>&nbsp;<input class=stnsubmit name="createNew" type="button" id="createNew" value="新增节点" onclick="javascript:showPopWin('{addURL}', 630, 350, refreshParent, null,'新增用户节点')"><br/></div>
<div class="datalist" style="margin-top:7px">
<form name="Check_Form" id="Check_Form" style="margin:0;padding:0" method="POST" action="">
  <table class=datatable id="datatable" style="border-bottom:0px" cellspacing=0 cellpadding=0 width=100%>
		<tr><td colspan=6><span style="float:left;"><IMG SRC="../Images/search.gif">查找节点名包含：<input type="text" name="name" value="{name}" size=20>&nbsp;		<select name="t_userGroupLabel" id="t_userGroupLabel">
		    <option value='all'>请选择节点归类...</option>
            {userGroupLabel_list}
        </select>
		<input type="submit" class=inputsubmit name="Submit" value="查询"><input name="Action" type="hidden" id="Action" value="querySubmit"></span>	   
		</td></tr>
        <tr class=coltitle> 
             <td width=3% align=center noWrap><input name="all" type="checkbox" id="all" value="all" onclick="checkall(this.form)" style="BACKGROUND-COLOR:#f5f5f5"></td>
             <td width=* noWrap><strong>&nbsp;节点名</strong></td>
             <td width=10% noWrap align=center><strong>节点归类</strong></td>
             <td width=10% noWrap align=center><strong>子节点数</strong></td>
             <td width=10% noWrap align=center><strong>用户数</strong></td>
		     <td width=11% nowrap align=center><strong>操作</strong></td>
        </tr>

         <!-- BEGIN USER -->
         <tr onmouseover="this.style.backgroundColor='#DEEFFF'"  onmouseout="this.style.backgroundColor='#FFFFFF'"> 
              <td align=center><input name="userGroupID[]" type="checkbox" id="userGroupID" value="{userGroupID}"></td>
              <td title="{userAllGroupName}">&nbsp;<a href="{viewURL}" title="{userAllGroupName}">{userGroupName}</a></td>
              <td align=center>&nbsp;{userGroupLabel}</td>
              <td align=center>{userGroupNodeNum}</td>
              <td align=center>{userGroupUserNum}</td>
			  <td align=center nowrap><a href="{viewURL}">查看</a> <a href="javascript:void(0);" onclick="javascript:showPopWin('{editURL}', 630, 350, refreshParent, null,'编辑系统用户信息')">编辑</a> <a href="{deleteURL}" onclick="return window.confirm('危险提示!!!您真的想删除该用户节点吗？操作将会删除本节点以及本节点所属的全部用户信息，并将删除所属用户创建的所有问卷数据，而且不可恢复不可恢复！')">删除</a></td>
          </tr>
          <!-- END USER -->
		 <tr>
		    <td colspan=6 align=left valign=center>
		    <span style="float:left">选中的节点迁移至：<span id="tran_userGroupID_container"><input name="t_tran_userGroupID" size=20></span>&nbsp;<input name="TranUsersSubmit" class=inputsubmit type="button" id="TranUsersSubmit" value="检索" onclick="javascript:tranUserSubmit();" > 
            <input name="DeleUsersSubmit" class=inputsubmit type="button" id="DeleUsersSubmit" value="删除" onclick="javascript:deleteUserSubmit();"> 
			<input name="formAction" id="formAction" type="hidden"></span>
			<span style="float:right;display:{isTopNode};margin-top:4px"><img src="../Images/top.gif" align=absmiddle>&nbsp;<a href="{topURL}">回上级</a>&nbsp;</span>
            </td></tr>
	</table>
   </form>
</div>
<div class=pages>{pagesList}</div>
</div>
</body></html>
