<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.BackgroundRoleAdd" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<%@ Register TagPrefix="user" Namespace="UserCenter.Controls" Assembly="UserCenter.Pages" %>
<%@ Register TagPrefix="site" Namespace="SiteServer.Controls" Assembly="SiteServer.Controls" %>

<html>
<head>
<!--#include file="../inc/html_head.inc"-->
<user:custom type="style" runat="server"></user:custom>

<bairong:Code type="Prototype" runat="server" />
<bairong:Code type="Scriptaculous" runat="server" />

<meta http-equiv="content-type" content="text/html;charset=gb2312">
<script type="text/javascript" language="javascript">
function GeneralPermissions_CheckAll(chk){
	var oEvent = document.getElementById('GeneralPermissions');
	var chks = oEvent.getElementsByTagName("INPUT");
	for(var i=0; i<chks.length; i++)
	{
		if(chks[i].type=="checkbox") chks[i].checked=chk.checked;
	}
}
</script>
</head>
<body>
<form id="myForm" runat="server">
<bairong:Message runat="server"></bairong:Message>
<div class="column">
<div class="columntitle"><asp:Literal id="literalTitle" runat="server" />后台角色</div>
	 
	<table width="95%" align="center" cellpadding="3" cellspacing="3">
	<tr><td width="160" align="left">
		<bairong:help HelpText="唯一标识此角色的字符串" Text="角色名称：" runat="server" ></bairong:help>
			</td>
	  <td width="88%" align="left">
	  <asp:TextBox class="colorblur" onfocus="this.className='colorfocus';" onblur="this.className='colorblur';" Columns="25" MaxLength="50" id="RoleName" runat="server"/>
		<asp:RequiredFieldValidator
			ControlToValidate="RoleName"
			ErrorMessage="*"
			Display="Dynamic"
			runat="server"/>
		<asp:RegularExpressionValidator
			runat="server"
			ControlToValidate="RoleName"
			ValidationExpression="[^',]+"
			ErrorMessage="*"
			Display="Dynamic" />
	  </td>
	</tr>
	<tr><td width="160" align="left">
	<bairong:help HelpText="备注" Text="备注：" runat="server" ></bairong:help>
		
			</td>
	  <td align="left"><asp:TextBox class="colorblur" onfocus="this.className='colorfocus';" onblur="this.className='colorblur';" Columns="50" TextMode="MultiLine" id="Description" runat="server"/>
		<asp:RegularExpressionValidator
			runat="server"
			ControlToValidate="Description"
			ValidationExpression="[^']+"
			ErrorMessage="*"
			Display="Dynamic" />
		</td>
	</tr>
	<tr><td colspan="2" align="center">
	   
	</td></tr>
	</table>	
</DIV>
<br>

<asp:PlaceHolder ID="GeneralPermissionsPlaceHolder" runat="server">

<div class="column">
<div class="columntitle">通用权限设置</div>
	 
	<table width="100%" cellpadding="4" cellspacing="0" border="0">
	<tr><td align="left">
		<input type="checkbox" onClick="GeneralPermissions_CheckAll(this)" id="CheckAll" name="CheckAll"><label for="CheckAll">全选</label>
		<asp:CheckBoxList ID="GeneralPermissions" RepeatColumns="7" RepeatDirection="Horizontal" runat="server"></asp:CheckBoxList>
			</td>
	  </tr>
	</table>	
</DIV>
<br>
</asp:PlaceHolder>

<asp:PlaceHolder ID="PublishmentSystemPermissionsPlaceHolder" runat="server">
<div class="column">
<div class="columntitle">站点权限设置</div>
	<table width="100%" cellpadding="4" cellspacing="0" border="0">
	<tr><td align="left">
		<asp:Literal ID="PublishmentSystems" runat="server"></asp:Literal>
	</td>
	  </tr>
	<tr><td height="30" valign="bottom">
					注：点击网站选择需要管理的栏目&nbsp;&nbsp;<img src="../pic/canedit.gif" align="absmiddle"/>有权管理此网站&nbsp; <img src="../pic/cantedit.gif" align="absmiddle"/>无权管理此网站
	</td></tr>
	</table>	
</DIV>
</asp:PlaceHolder>

<table width="95%" align="center" cellspacing="0" cellpadding="0" >
  <tr>
    <td ></td>
    <td align="center" >
		<asp:Button class="button" id="Submit" text="添 加" onclick="Submit_OnClick" runat="server"/>
		<%if (Request.QueryString["RoleName"] != null){%>
		&nbsp;&nbsp;
		<input type="button" class="button" value="返 回" onClick="javascript:location.href='background_role.aspx';" />
		<%}%>
	</td>
    <td ></td>
  </tr>
</table>
</form>

</body>
</html>