<%@ Page language="c#" Codebehind="Subscriptions.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.Subscriptions" validateRequest="false"%>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>Subscriptions</title>
		<script type="text/javascript" src="../inc/overlib.js"></script>
        <script src="inc/Subscriptions.js" type="text/javascript"></script>
        <style type="text/css">
		    .c1{width:8%;}
            .c2{width:17%;}
            .c3{width:45%;}
            .c4{width:10%;}
            .c5{width:10%;}
			.c6{width:10%;}
			.OptionsColor{ background-color:#9CC;}
			.EmailsColor{ background-color:#9CF;}
		</style>
	</HEAD>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		    <%if (this.Request.QueryString["action"] != "Manage"){%>订阅类型添加<%}else{%>订阅类型列表<%}%>
	    </div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:label id="lbTitle" Runat="server">订阅类型添加</asp:label></div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="1" cellPadding="1" width="98%" align="center" border="0">
				        <tr>
					        <td class="forumRowHighlight">
						        <%if (this.Request.QueryString["action"] != "Manage"){%>
						        <table class="ptable" cellspacing="0" cellpadding="0">
							        <tr>
								        <th class="tl">订阅类型名称：</th>
								        <td class="tr"><asp:textbox id="txtName" runat="server" Width="250px" MaxLength="50"></asp:textbox></td>
							        </tr>
							        <tr>
								        <th class="tl">描述信息：
								        </th>
								        <td class="tr">
											<FTB:FREETEXTBOX id="ftbDescription" runat="Server" ImageGalleryPath="Upload/" ToolbarType="OfficeXP" ButtonPath="images/ftb/officeXP/" ButtonDownImage="True" ButtonOverImage="True" Width="520"></FTB:FREETEXTBOX>
										</td>
							        </tr>
							        <tr>
								        <th class="tl">&nbsp;</th>
									    <td class="tr">    <asp:button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:button>
									    <asp:button id="btnCancel" OnClick="btnCancel_Click" runat="server" Text="取消" CausesValidation="False" CssClass="inputbtn"></asp:button></td>
							        </tr>
						        </table>
						        <%}else{%>
						        <asp:datagrid id="dgList" runat="server" PageSize="15" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							        DataKeyField="SubscriptionsID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="ID">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "SubscriptionsID") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="类型名称">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "SubscriptionsName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="描述">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "Description") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
										<asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='Subscriptions.aspx?Action=Modify&SubscriptionsID=<%# DataBinder.Eval(Container.DataItem, "SubscriptionsID") %>'>
											        修改</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>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
                                
                                <div class="sub_container_listhead" style="padding:0px;">
                                    <table cellspacing="0" cellpadding="0" class="llist">
                                        <tr id="listhead"><%--id="listhead不能少"--%>
                                            <th class="c1">ID</th>
                                            <th class="c2">类型名称</th>
                                            <th class="c3">描述</th>
                                            <th class="c4">添加订阅选项</th>
                                            <th class="c5">修改</th>
                                            <th class="c6">删除</th>               
                                        </tr>
                                    </table>           
                                </div>
                                <div class="sub_container_content" style="padding:0px;">
                                    <table id="datas" cellspacing="0" cellpadding="0" class="llist">
                                        <tr id="template" style="display:none;"><%--id="template"不能少--%>
                                            <td id="SubscriptionsID" class="c1 ccenter"></td>
                                            <td id="SubscriptionsName" class="c2"></td>
                                            <td id="Description" class="c3"></td>
                                            <td id="Add" class="c4 ccenter"></td>
                                            <td id="Modify" class="c5 ccenter"></td>
                                            <td id="Delete" class="c6 ccenter"></td>
                                        </tr>
                                    </table>
                                </div>
                                
						        <%}%>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
			<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
