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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Template</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
	</HEAD>
<body leftmargin="0" rightmargin="0" topmargin="0">
		<form id="Form1" method="post" runat="server">
<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="3%" height="34" class="tl"></td>
		<td width="91%" class="tm"><span class="tt">专题活动管理 &gt;&gt; <asp:label id="lblAction" runat="server"></asp:label>&nbsp;<span
                style="color: #ff0033"></span></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  class="mm" align="left" valign="top">
<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"){%><span style="color: #ff0033">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                            (说明:默认模板是内置模板,不能修改和删除)</span>
			                <table  cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
                              <tr>
					<td width="100%" height="23" class="forumRowHighlight"><asp:datagrid id="dgTemplate" runat="server" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							Width="100%" DataKeyField="TemplateID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" BorderColor="#E0E0E0" BorderWidth="1px" BorderStyle="Solid" >
							<HeaderStyle Font-Bold="False" 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="30px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "TemplateID") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="文件夹名称">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Folder") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="模板名称">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Name") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="是否当前模板">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
									<ItemTemplate>
										<%# IsCurrentTemplate(DataBinder.Eval(Container.DataItem, "Folder").ToString()) %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:ButtonColumn Visible="False" Text="预览" CommandName="Preview">
                                    <ItemStyle Width="30px" />
                                </asp:ButtonColumn>
								<asp:ButtonColumn Text="选择" CommandName="Choose">
                                    <ItemStyle Width="30px" />
                                </asp:ButtonColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<a href='Template.aspx?Action=Modify&TemplateID=<%# DataBinder.Eval(Container.DataItem, "TemplateID") %>'>
											<%# DataBinder.Eval(Container.DataItem, "Folder").ToString() == "fmod" ? "" : "修改"%></a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<a href='Template.aspx?Action=del&TemplateID=<%# DataBinder.Eval(Container.DataItem, "TemplateID") %>' onclick="return confirm('确认要删除吗？');">
											<%# DataBinder.Eval(Container.DataItem, "Folder").ToString() == "fmod" ? "" : "删除"%></a>
									</ItemTemplate>
								</asp:TemplateColumn>
							
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                        <ItemStyle Height="26px" BackColor="White" BorderColor="White" BorderWidth="1px" />
						</asp:datagrid></td>
				</tr>
			</table>
			<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			                <table cellSpacing="0" cellPadding="0" width="961" align="center" border="0">
                              <tr>
					<td height="23">
						<table cellSpacing="1" cellPadding="4" width="95%" align="center" border="0"
							valign="top">
                                    <tr> 
                                      <td width="124" height="29" align="left" style="width: 132px"> 
                                        <div align="right">存放模板的文件夹：</div></td>
                                      <td width="770"> &nbsp; <asp:textbox id="txtFolder" CssClass="input" runat="server"></asp:textbox> 
                                        &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </td>
                                    </tr>
                                    <tr> 
                                      <td height="16" align="left" style="width: 132px"><div align="right">模板名称：</div></td>
                                      <td>&nbsp; <asp:textbox id="txtTName" CssClass="input" runat="server"></asp:textbox> 
                                        <br /> </td>
                                    </tr>
                                    <tr bgcolor="#CCFF66"> 
                                      <td height="54" colspan="2" align="left" bgcolor="#FFFFFF" > 
                                        <div align="left"><strong>说明：</strong><br>
                                          <br>
                                          1、制作的模板文件页面文件名一定为index.html,并且把相关的模板图片等文件放在一个文件夹内,上传到TopicTemp文件夹内,上面存放模板的文件夹就填写你存放所有相<br>
                                          <br>
                                          关模板文件的文件夹名称 </div>
                                        <p>2、模板制作以本站制作的样品为参考，模板中的标签有：<br>
                                          <strong><br>
                                          $tite---$zm</strong> 表示专题活动名称----站点名称 
                                          <strong>$logo</strong> 表示站点LOGO图片<strong> 
                                          </strong><span class="topNav"><strong>$dh</strong></span> 
                                          主导航菜单薄 <strong>$hdnr</strong> 表示活动详细内容</p>
                                        <p> <strong>$hdjj </strong>表示活动简介 <strong>$tp 
                                          </strong>表示活动宣传图片<strong> $prolist</strong> 
                                          表示评论列表<strong> $page </strong>表示分页内容 
                                          <font color="#FF0000"> <strong>$dd</strong> 
                                          <font color="#000000">表示活动主题ID <strong>$zm </strong>表示站名</font></font></p>
                                        <p><font color="#FF0000">在制作模板的时候请不要忘记把以上标签放上 
                                          ;<font color="#006600">再就是别忘了把评论框也放进你自己制作的专题活动模版当中,评论显示CSS文件是：<span style="color: #000000">grs_100303.css</span></font></font></p></td>
                                    </tr>
                                  </table>
						
							        <TABLE  cellSpacing="0" cellPadding="1" width="95%" align="center" border="0"
								valign="top">
                                      <TR> 
                                        <TD width="163" align="left" vAlign="top" style="width: 121px"> 
                                        </TD>
                                        <TD vAlign="top" width="12"> </TD>
                                        <TD width="427" align="left" vAlign="top"> 
                                        </TD>
                                      </TR>
                                      <TR> 
                                        <TD align="center" colSpan="3"><BR> <asp:button id="btnSave" CssClass="btn" runat="server" Text="保存"></asp:button>
                                          &nbsp;&nbsp; <asp:button id="btnCancel" runat="server" CssClass="btn" CausesValidation="False" Text="取消"></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>
