<%@ Page CodeFileBaseClass="IlgharCMS.Lib.SystemModule.Privilege.List" %>
<%@ Register TagPrefix="IlgharUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<!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>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>特权设置</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<script type="text/javascript">
var _page = "privilege";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _addIndex = 0;
var _addList = new Array();
var _deleteIndex = 0;
var _deleteList = new Array();
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_no_changes = "没有任何变化！无需保存！";
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title">特权设置</div>
	<div class="LanguageFilter"></div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left"></li>
		<li class="Middle"><a href="list.aspx?Lang=<%=ContentLang%>">角色列表</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="add.aspx?Lang=<%=ContentLang%>">添加角色</a></li>
		<li class="Right"></li>
		<li class="Left Selected"></li>
		<li class="Middle Selected">特权设置</li>
		<li class="Right Selected"></li>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<div class="ToolBar">
		角色：<select id="RoleID" class="Text <%=ContentLang%>Font">
				<option value="">游客</option>
				<ilghar:List Object="Role">
					<ilghar:Record>
						<%If Guid.Equals(ID, CurrentRoleID)%>
							<option value="<%=ID%>" selected="selected"><%=Name%></option>
						<%Else%>
							<option value="<%=ID%>"><%=Name%></option>
						<%EndIf%>
					</ilghar:Record>
				</ilghar:List>
			</select>
		实例：
			<select id="InstanceID" class="Text <%=ContentLang%>Font">
				<ilghar:List Object="Instance">
					<ilghar:Record>
						<%If Guid.Equals(ID, CurrentInstanceID)%>
							<option value="<%=ID%>" ModuleID="<%=ModuleID%>" selected="selected"><%=Name%></option>
						<%Else%>
							<option value="<%=ID%>" ModuleID="<%=ModuleID%>"><%=Name%></option>
						<%EndIf%>
					</ilghar:Record>
				</ilghar:List>
			</select>
		语言：
			<select id="CurrentLang" class="Text <%=ContentLang%>Font">
				<ilghar:List Object="Language">
					<ilghar:Record>
						<%If Guid.Equals(ID, CurrentLang)%>
							<option value="<%=Ab%>" selected="selected"><%=Name%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=Name%></option>
						<%EndIf%>
					</ilghar:Record>
				</ilghar:List>
			</select>
			<input type="button" id="CheckAll" value="全选" />
			<input id="Save" type="button" value="保存" />
	</div>
	<div id="List">
		<table border="0" cellpadding="4" cellspacing="1">
			<thead>
				<tr>
					<th>对象</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<ilghar:List ID="ObjectTableID" Object="Module.Object" Source="ObjectTable">
					<ilghar:Record>
						<tr id="Row<%=InnerID%>" ItemID="<%=InnerID%>">
							<td style="white-space:nowrap">
								<input type="checkbox" name="ObjectID" id="Ob<%=InnerID%>" /><label for="Ob<%=InnerID%>"><%=["FullName"]%></label>
							</td>
							<td>
								<ilghar:List Object="Module.Object.Operation" Condition="ObjectID=ID">
									<ilghar:Record>
										<%If HasPrivilege(Record)%>
											<input type="checkbox" name="OperationID" id="Op<%=ObjectTableID[InnerID]%>_<%=Index%>" value="<%=ID%>" checked="checked" PrivilegeID="<%=GetPrivilegeID(Record)%>" ObjectID="<%=ObjectTableID[ID]%>" ObjectName="<%=ObjectTableID["FullName"]%>" OperationName="<%=Name%>" />
										<%Else%>
											<input type="checkbox" name="OperationID" id="Op<%=ObjectTableID[InnerID]%>_<%=Index%>" value="<%=ID%>" PrivilegeID="" ObjectID="<%=ObjectTableID[ID]%>" ObjectName="<%=ObjectTableID["FullName"]%>" OperationName="<%=Name%>" />
										<%EndIf%>
										<label for="Op<%=ObjectTableID[InnerID]%>_<%=Index%>"><%=Name%></label>
									</ilghar:Record>
								</ilghar:List>
							</td>
						</tr>
					</ilghar:Record>
				</ilghar:List>
			</tbody>
		</table>
	</div>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>tree_handler.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=JsPath%>system.js"></script>
</body>
</html>