<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="Mast.aspx.cs" Inherits="web.admin.Mast" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Manager</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
				<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
	</HEAD>
		<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form2" method="post" runat="server" onsubmit="Window_Load(0);">
<table width="100%" height="550"  cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td width="7%" height="33" class="tl"></td>
		<td width="87%" class="tm"><span class="tt">平台基础设置管理 &gt;&gt; <asp:Label id="lblAction" runat="server"></asp:Label></span></td>
		      <td width="1%" class="tm2"><span class="tt"></span></td>
		<td width="5%" class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
              <td align="left" valign="top" bgcolor="#FFFFFF"  class="mm"> 
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" ><br>
                      <table width="90%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
<% if(this.Request.QueryString["Action"] == "Manage"){%>
			<table  cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<tr>
					<td height="23" class="forumRowHighlight">
						<asp:datagrid id="dgAdmin" runat="server" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							DataKeyField="AdminID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title" BorderColor="#E0E0E0" BorderWidth="1px">
							<HeaderStyle Font-Bold="True" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="序号">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="60px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "AdminID") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="会员帐号">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									<ItemTemplate>
										<%# GetMemberAccount(DataBinder.Eval(Container.DataItem, "MemberID").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="级别">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Flag").ToString() == "3" ? "超级管理员" : "普通管理员" %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="权限">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
									<ItemTemplate>
										<a href='ManagerPower.aspx?AdminID=<%# DataBinder.Eval(Container.DataItem, "AdminID") %>'>管理</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="所管理食单">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									<ItemTemplate>
										<a href='OrderBulete.aspx?AdminMemberID=<%# DataBinder.Eval(Container.DataItem, "MemberID") %>'>查看所管理食单</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									CommandName="Delete">
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" />
								</asp:ButtonColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                            <ItemStyle Height="26px" />
						</asp:datagrid>
					</td>
				</tr>
			</table>
<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			                <table width="96%" border="0" align="center" cellPadding="0" cellSpacing="0" bgcolor="#FFFFFF" >
                              <tr>
					<td height="23">
						<table cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
							<tr>
								<td align="right">
									会员名：
								</td>
								<td>
									<asp:TextBox id="txtMemberAccount" CssClass="input" runat="server"></asp:TextBox>
                                        <font color="red">*请输入系统会员名称</font> (添加新的管理员请先注册一个会员,然后在这里输入会员的用户名添加即可)	
                                      </td>
							</tr>
							<tr>
								<td align="center" colspan="2"><br>
									<asp:Button id="btnSave" CssClass="btn" runat="server" Text="保存"></asp:Button>&nbsp;&nbsp;
									<asp:Button id="btnCancel" runat="server" CssClass="btn" Text="取消" CausesValidation="False"></asp:Button></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<%}%>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
        </form>
	</body>
</HTML>
