<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="NewsCateAdd.aspx.cs" Inherits="web.admin.NewsCateAdd" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>NewsCategory</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="6%" height="30" class="tl"></td>
		<td width="89%" class="tm"><span class="tt">信息管理 &gt;&gt; 文章类别管理&nbsp; <span style="color: #ff0033">说明：如果增加、删除、修改了文章类别，请到生成HTML模块批量生成文章HTML页更新文章页里面的类别显示</span></span></td>
		      <td width="0%" 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="95%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td width="1" class="ml1"></td>
		<td width="841" class="mm1" style="width: 100%">
			<% if(this.Request.QueryString["Action"] == "Manage"){%>
			                <table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
                              <tr height="35">
					            <td style="width: 100%"> <font color="FF0000"> 请勾选后进行批量删除、生成HTML操作</font> 
                                  <strong><br/>
                                  <asp:Button ID="btnDeleteUp" CssClass="btn1" Runat="server" Text="删除选定类别"></asp:Button>
                                  <asp:Button ID="btnModifyUp" CssClass="btn" Runat="server" Text="修改"></asp:Button>
                                  <asp:Button ID="btcre" CssClass="btn1" Runat="server" Text="生成HTML"></asp:Button>&nbsp;</font></strong><font color="#006600">&nbsp;
                                  </font>
                                  </td>
				</tr>
				<tr>
					<td class="forumRowHighlight" height="23" style="width: 100%">
					
					<asp:datagrid id="dgCategoryList" runat="server" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							Width="100%" DataKeyField="CategoryID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" BorderColor="#E0E0E0" BorderWidth="1px">
							<HeaderStyle Font-Bold="False" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn>
									<HeaderTemplate>
										<asp:CheckBox id="chkAll" runat="server" AutoPostBack="True" OnCheckedChanged="chkAll_CheckedChanged"></asp:CheckBox>
									</HeaderTemplate>
									<ItemTemplate>
										<asp:CheckBox id="chkItem" runat="server"></asp:CheckBox>
									</ItemTemplate>
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="分类ID">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="40px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="排序">
									<ItemTemplate>
										<img src="../img/empty.gif" width='<%#10*(int)DataBinder.Eval(Container.DataItem,"Depth")%>' height="1" align="absmiddle">
										<asp:textbox id="txtSort" runat="server" Width="20px" Text='<%# DataBinder.Eval(Container.DataItem, "Sort") %>'>
										</asp:textbox>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="类别名称(文章数)">
									<ItemTemplate>
										<img src="../img/empty.gif" width='<%#10*(int)DataBinder.Eval(Container.DataItem,"Depth")%>' height="1" align="absmiddle">├
										<asp:textbox id="categoryName" runat="server" Width="200px" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>'>
										</asp:textbox>
										(<%# DataBinder.Eval(Container.DataItem, "ArticleNum") %>)
									</ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                    <ItemStyle HorizontalAlign="Left" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="是否首页调用">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<asp:CheckBox id="checksy" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "IsSy") %>'>
										</asp:CheckBox>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="120px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="是否发布">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<asp:CheckBox id="isActive" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "IsActive") %>'>
										</asp:CheckBox>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="新闻">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='News.aspx?Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'>
											查看</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn Visible="False">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='NewsCateAdd.aspx?Action=Add&CategoryID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'>
											添加类别</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='NewsCateAdd.aspx?Action=Modify&CategoryID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'>
											修改</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</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" />
                                </asp:ButtonColumn>
                                <asp:TemplateColumn HeaderText="生成HTML">
                                <ItemTemplate>
										<a href='CreateNewlist.aspx?CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'>
											生成HTML</a>
									</ItemTemplate>
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                    <ItemStyle Font-Bold="False" Width="80px" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                </asp:TemplateColumn>
							</Columns>
                        <PagerStyle Mode="NumericPages" />
                        <ItemStyle Height="26px" />
						</asp:datagrid></td>
				</tr>
				<tr height="35">
					<td style="width: 683px"><asp:Button ID="btnDeleteDn" CssClass="btn1" Runat="server" Text="删除选定类别"></asp:Button>
						<asp:Button ID="btnModifyDn" Runat="server" CssClass="btn" Text="修改"></asp:Button></td>
				</tr>
			</table>
			<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			<table  cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
				<tr>
					<td height="23">
						<table cellSpacing="0" cellPadding="5" width="95%" align="center" border="0"
							>
                                    <tr> 
                                      <td align="right" width="150">栏目名称： </td>
                                      <td><asp:textbox id="txtCategoryName" CssClass="input" runat="server" Width="200px"></asp:textbox> 
                                        <font color="red">*</font></td>
                                    </tr>
                                    <tr> 
                                      <td align="right" width="150">栏目说明： </td>
                                      <td><asp:textbox id="txtCategoryDesc" CssClass="input" runat="server" Width="300px" Height="60px" TextMode="MultiLine"></asp:textbox> 
                                        <font color="red">*</font></td>
                                    </tr>
                                    <!--
							<tr>
								<td align="right" width="150">所属类别：
								</td>
								<td><asp:dropdownlist id="ddlNewsCategories" runat="server"></asp:dropdownlist></td>
							</tr>
							//-->
                                    <tr> 
                                      <td width="150" align="right" style="height: 30px">是否有效： 
                                      </td>
                                      <td style="height: 30px"> <asp:CheckBox id="cbxActive" runat="server" Checked="True"></asp:CheckBox></td>
                                    </tr>
                                    <tr> 
                                      <td width="150" align="right">是否首页调用：</td>
                                      <td> <asp:CheckBox ID="checksy" runat="server" /></td>
                                    </tr>
                                    <tr> 
                                      <td align="right">分类页左边广告(宽<font face="宋体">150px)：</font></td>
                                      <td><FCKeditorV2:FCKeditor id="ftblad" runat ="server" ToolbarSet="Default" Height="300px" Width="98%"></FCKeditorV2:FCKeditor></td>
                                    </tr>
                                    <tr> 
                                      <td align="right">分类页右边广告(宽<font face="宋体">230px)：</font></td>
                                      <td><FCKeditorV2:FCKeditor id="ftbrad" runat ="server" ToolbarSet="Default" Height="300px" Width="98%"></FCKeditorV2:FCKeditor></td>
                                    </tr>
                                    <tr height="35"> 
                                      <td align="center" colSpan="2"><asp:button id="btnSave" CssClass="btn" runat="server" Text="保存"></asp:button> 
                                        <FONT face="宋体">&nbsp;</FONT>&nbsp; <asp:Button id="btnBack" CssClass="btn" runat="server" Text="返回"></asp:Button></td>
                                    </tr>
                                  </table>
					</td>
				</tr>
			</table>
			<%}%>
		</td>
		<td width="9" 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>
