<%@ Page CodeBehind="admin_style.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.admin_style" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<% @ Import Namespace="Webdisk" %>
		<link href="img/main.css" rel="stylesheet" type="text/css">
		<style type="text/css">
		.style2 { COLOR: #ffffff }
		</style>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb"
				height="27">
				<tr>
					<td colSpan="3" class="td_title">所有样式
					</td>
				</tr>
			</table>
			<div align="center"><asp:datagrid id="DataGrid" runat="server" CssClass="GridBody" GridLines="None"
					AutoGenerateColumns="False" Width="100%" PageSize="20" 
					AllowSorting="True">
				<AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
				<ItemStyle CssClass="GridItem"></ItemStyle>
				<HeaderStyle CssClass="GridHead"></HeaderStyle>
					<Columns>
						<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
						<asp:TemplateColumn HeaderText="缩略图">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.pic") %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn DataField="title" HeaderText="样式名称">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="path" HeaderText="文件路径">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="show" HeaderText="前台可见">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="mr" HeaderText="是否缺省">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:HyperLinkColumn Text="编辑" DataNavigateUrlField="id" DataNavigateUrlFormatString="admin_style_edit.aspx?id={0}"
							HeaderText="编辑">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:HyperLinkColumn>
						<asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:ButtonColumn>
					</Columns>
					<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
				</asp:datagrid>
			</div>
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb" height="27">
				<tr>
					<td colSpan="3" class="td_title">添加样式
					</td>
				</tr>
				<tr class="tableTd">
					<td><FONT face="宋体">缩略图：
							<asp:TextBox id="pic" runat="server"></asp:TextBox>名称：
							<asp:TextBox id="title" runat="server"></asp:TextBox>文件相对路径：
							<asp:TextBox id="path" runat="server"></asp:TextBox><BR>
							<asp:CheckBox id="show" runat="server" Text="前台可见" Checked="True"></asp:CheckBox>&nbsp;
							<asp:CheckBox id="mr" runat="server" Text="设为默认"></asp:CheckBox>&nbsp;
							<asp:Button id="Button1" runat="server" Text=" 添 加 " CssClass="formbutton" onclick="Button1_Click"></asp:Button></FONT></td>
				</tr>
			</table>
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb" height="27">
				<tr>
					<td colSpan="3" class="td_title">批量导入样式
					</td>
				</tr>
				<tr class="tableTd">
					<td><FONT face="宋体">
							<asp:Button id="Button2" runat="server" Text="批量导入style目录下的样式" CssClass="formbutton" onclick="Button2_Click"></asp:Button>（此项检查并导入样式下的所有目录，并会替换原样式库）</FONT></td>
				</tr>
			</table>
	</form>
		</body>
</HTML>
