<%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
<%@ Page language="c#" Inherits="Discuz.ForumPage.Admin.medalgrid" Codebehind="global_medalgrid.aspx.cs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>表情列表</title>
		<LINK href="../styles/datagrid.css" type="text/css" rel="stylesheet">
		<link href="../styles/dntmanager.css" type="text/css" rel="stylesheet">   
		<script language="javascript" src="../js/common.js"></script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
		<script language="javascript">showhint(0, '请将您的勋章图片文件上传到 "论坛/images/medals" 目录下, 并对相应的勋章进行编辑即可');</script>
				<cc1:datagrid id="DataGrid1" runat="server" OnCancelCommand="DataGrid_Cancel" OnEditCommand="DataGrid_Edit"
				OnPageIndexChanged="DataGrid_PageIndexChanged" OnSortCommand="Sort_Grid" OnUpdateCommand="DataGrid_Update"
				OnDeleteCommand="DataGrid_Delete">
				<Columns>
				    <asp:TemplateColumn HeaderText="选择">
						<ItemTemplate>
							<INPUT id="medalid" onclick="javascript:SH_SelectOne(this)" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.medalid").ToString() %>"	name="medalid">							</asp:Label>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="medalid" SortExpression="medalid" HeaderText="勋章ID" Visible="false" ></asp:BoundColumn>
					<asp:BoundColumn DataField="name" SortExpression="name" HeaderText="名称" ></asp:BoundColumn>
					<asp:BoundColumn DataField="image" SortExpression="image" HeaderText="文件名" ></asp:BoundColumn>
								
					<asp:TemplateColumn HeaderText="是否有效" SortExpression="available">
						<ItemTemplate>
						   <%# DataBinder.Eval(Container, "DataItem.available").ToString()=="1"?"<img src=../images/ok.gif>" : "<img src=../images/cancel.gif>" %>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="图片" >
						<ItemTemplate>
						   <%# PicStr(DataBinder.Eval(Container, "DataItem.image").ToString())%>
						</ItemTemplate>
					</asp:TemplateColumn>
				</Columns>
			</cc1:datagrid>
			<div class="Navbutton"> 
				<table cellspacing="1" cellpadding="4" width="100%" align="center" class="table1">
					<TBODY>
						<tr>
							<td><input title="选中/取消选中 本页所有Case" onclick="CheckAll(this.form)" type="checkbox" name="chkall" id="chkall">全选/取消全选 
								&nbsp;
								<cc1:Button id="Available" runat="server" Text="置为有效"></cc1:Button>&nbsp;
								<cc1:Button id="UnAvailable" runat="server" Text="置为无效"></cc1:Button>&nbsp;
								<cc1:Button id="ImportMedal" runat="server" Text="导入已上传的勋章" />
								</td>
						</tr>
					</TBODY>
				</table>
			</div>
		</form>
		<%=footer%>
	</body>
</HTML>
