<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.User.UI_List"  CodePage="65001" PathLevel="1" PageFileFlag="AdminUser_List" PageFileTitle="后台管理员管理" DataBindingType="1" PageFlagId="1"  %>
<%@ Register TagPrefix="Site" TagName="Menu" Src="../WUC/Site_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "后台管理员管理" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs" PathLevel="1" />
<Site:Menu id="menu_headcss" runat="server" Flag="HeadCss" PathLevel="1" />


<script>
//编辑
function edit_Info(id)
{
//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="Update_Box.aspx?IsAdd=1";
_url="Update.aspx?IsAdd=1";
var _data = {"id":id};	
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑","SaveSub");	
//将本行设置为选中颜色
SetActive(id);

}

//修改密码
function edit_PassWord(id)
{
//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="Updatepass.aspx?IsAdd=1";
var _data = {"id":id};	
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>","SavePass");	
//将本行设置为选中颜色
SetActive(id);

}

//删除
function del_Info(id)
{
//弹出框ID,标题，内容，删除程序执行路径，参数表
if(<%=(SystemType==WinLibClass.Entity.Cache.AdminType.SystemAdmin?"true":"false")%>)
{
var _url =  "update.aspx?IsAdd=30";
var _data ={"id":id};
Common.ConfirmDelete2 ("POST",_url,_data,"<%=PageFileFlag%>","删除确认","");
}
else{AlertErr("不能删除自己");}
SetActive(id);		
}


</script>


</head>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  />
<div class1="wrap" id="wrap">
	<Site:Menu id="Wuc_LeftMenu" runat="server" Flag="LeftMenu" PageFileFlag="Menu_A_800_801" PathLevel="1" />	
	<div class1="mainbox" class="MainBox W1100 ">

		<div class="PGTitle LH30 ">
			<div class="W200 FL MGL10 FWB FS12"><%=PageFileTitle%></div>
			<div class="ChileMenu1 FL FS12">

			</div>
			<div class="Clear"></div>
		</div>

		<div class="ContBox MGT10 " >

<table class="Table FS12 ">

<tr style="height:30px;	font-weight: bold;">
<TH style="width:30px">序号</TH>
<TH >用户名</TH>
<TH style="width:150px">真实姓名</TH>
<TH style="width:100px">类型</TH>
<TH style="width:60px">状态</TH>
<TH style="width:150px">操作</TH>
</tr>

<asp:Repeater id="rpList" runat="server">
<ItemTemplate>

<tr  id="tr_<%#Eval("id")%>" class="<%#Eval("id").Equals(CurrentAdminUserId)?"BgOrange":""%>">
		<td><%=(++DtRowIndex)%></TD>
		<TD>
		<%#Eval("AdminName")%> <%#Eval("id").Equals(CurrentAdminUserId)?" [当前登陆者]":""%>
		</TD>
		<TD><%#Eval("AdminRealName")%></td>
		<td><%# (Eval("AdminType").ToString()=="1000"?"*系统管理员*":"网站管理员")%></td>
		<td ><%#Eval("IsChecked").Equals(1)?"<font color='green'>启用</font>":"<font color='red'>停用</font>"%></td>
		<!--		
		<td>
		<div style="width:200px;word-wrap: break-word;" >
		<%#Eval("AdminEmail")%>
		</div>
		</td>
		-->		
		<td>
				<a onclick="edit_Info('<%#Eval("id")%>')" >编辑</a>
<a onclick="edit_PassWord('<%#Eval("id")%>')" >重设密码</a>				
				<a style="display:<%#((Eval("id").Equals(1)==true||(SystemType!=WinLibClass.Entity.Cache.AdminType.SystemAdmin) )?"none":"")%>" onclick="del_Info('<%#Eval("id")%>')" >删除</a><%#((Eval("id").Equals(1)==true||(SystemType!=WinLibClass.Entity.Cache.AdminType.SystemAdmin) )?"<a class='Red'>保留</a>":"")%>
		</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>


		</div>
		<div class="ContBox" >
			
			<%
			if(SystemType!=WinLibClass.Entity.Cache.AdminType.SystemAdmin)
			{}
			else
			{
			%>
			<div class="page" style="margin-left:-13px;"><%=strPageInfo%> -  <a href="#"onclick="edit_Info(0);return false;"  class="A_Add">添加</a> </div>		
			<%}%>
		</div>

	</div>
</div>


<div class="clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>


