<%@ Page Inherits="Caicai.Framework.UI.Admin.Manage" Table="C_News"  order="IsTop, InputDate desc, id desc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= Caicai.Framework.Common.Language.Get("C_News") %></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="style.css" rel="stylesheet" rev="stylesheet" media="all" />
<script type="text/javascript" src="../files/common/jquery.js"></script>
<script type="text/javascript" src="../files/xheditor/xheditor-zh-cn.min.js"></script>
<script type="text/javascript" src="include/xheditor.js"></script>
<script type="text/javascript" src="include/common.js"></script>
<script type="text/javascript">
$(function()
{
	var ispic = ["#manage_Pic"]
	$("#CB_IsPic").myCheck({optName:ispic})

	var isseo = ["#manage_Keywords","#manage_Description"]
	$("#CB_IsSeo").myCheck({optName:isseo})

	$("#DDL_ClassID").myValidator();
	$("#TB_Title").myValidator();
	
	$("#TB_Content").after("<div class='linklist'></div>");
	$(".linklist").load("/default.aspx?name=sitekey");
})
</script>
</head>
<body id="C_News">
<form id="form1" runat="server">
<table class="table subsubmenu">
	<thead>
	<tr>
		<td>
			<a href="?action=manage">&gt;&gt;&nbsp;<%= Caicai.Framework.Common.Language.Get("C_News") %></a>
			<a href="?action=insert"><%= Caicai.Framework.Common.Language.Get("InsertData") %></a>
			<a href="?action=import"><%= Caicai.Framework.Common.Language.Get("ImportData") %></a>
			<a href="?action=export"><%= Caicai.Framework.Common.Language.Get("ExportData") %></a>
		</td>
		
		<td style="text-align:right"><input type="text" name="0" title="title" id="searchtext" ><input class="search" type="button" value="<%= Caicai.Framework.Common.Language.Get("Search") %>"></td>
	</tr>
  </thead>
</table>

<asp:Panel ID="PanelDefault" runat="server">
<table class="table" style="margin-top:8px;">
<thead>
	<tr>
		
		<th width="50"><a href="#" class="deleteall" title="<%= Caicai.Framework.Common.Language.Get("DataDeleteInTitle") %>"><%= Caicai.Framework.Common.Language.Get("Delete") %></a><input type="checkbox" class="checkall"></th>
		
		<th width="40"><%= Caicai.Framework.Common.Language.Get("ID") %></th>
		
		<td width="80"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %></td>
		
		<td><%= Caicai.Framework.Common.Language.Get("C_News_Title") %></td>
		
		<td width="120"><%= Caicai.Framework.Common.Language.Get("InputDate") %></td>
		<td width="200"><%= Caicai.Framework.Common.Language.Get("Manage") %></td>
	</tr>
</thead>

<asp:Repeater ID="RepeaterDefault" runat="server">
<ItemTemplate>
	<tr>
		
		<th><input type="checkbox" value="<%#Eval("ID")%>" class="checkdelete"></th>
		
		<th><%#Eval("ID")%></th>
		
		<td class="repeater_ClassID">
			<strong><a href="?search=true&type=int&field=classid&keyword=<%#Eval("ClassID")%>"><%# GetTableName("C_Word", "", Eval("ClassID").ToString())%></a></strong>
		</td>
		
		<td class="repeater_Title">
			<a href="?action=show&id=<%#Eval("id")%>" class="show"><%#Eval("Title")%></a>
		</td>
		
		<td><%#Eval("InputDate")%></td>
		<td class="manage">
			<a href="?action=show&id=<%#Eval("ID")%>" class="show"><%= Caicai.Framework.Common.Language.Get("Show") %></a>
			<a href="?action=update&id=<%#Eval("ID")%>" class="update"><%= Caicai.Framework.Common.Language.Get("Update") %></a>
			<a href="?action=copy&id=<%#Eval("ID")%>" class="copy"><%= Caicai.Framework.Common.Language.Get("Copy") %></a>
			<a href="?action=delete&id=<%#Eval("ID")%>" class="delete" title="<%= Caicai.Framework.Common.Language.Get("DataDeleteTitle") %>"><%= Caicai.Framework.Common.Language.Get("Delete") %></a>
		</td>
	</tr>
	
</ItemTemplate>
</asp:Repeater>

</table>
<table class="table">
<tr>
	<td class="page"><Caicai:CPageSql ID="PageDefault" runat="server" PageSize="15" /></td>
</tr>
</table>
<br />
</asp:Panel>

<asp:Panel ID="PanelManage" runat="server">
<table class="table" style="margin-top:8px;">
<thead>
<tr>
	<td colspan="2"><%= Caicai.Framework.Common.Language.Get("ManageData") %>&nbsp;<a href="#" class="helpall">[?]</a></td>
</tr>
</thead>

<tr id="manage_ClassID">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID", "note") %></span>
	<Cai:CDropDownList ID="DDL_ClassID" runat="server" ControlType="TableName" Name="C_Word" Where="system like 'news%'" Order="OrderNum desc, id desc" TextName="" ValueName=""   />
	</td>
</tr>

<tr id="manage_Title">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Title") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_Title", "note") %></span>
	<Cai:CTextBox ID="TB_Title" runat="server" ControlType="Default"  />
	</td>
</tr>

<tr id="manage_Content">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Content") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_Content", "note") %></span>
	<Cai:CTextBox ID="TB_Content" runat="server" ControlType="MultiLine" class="Editor" />
	</td>
</tr>

<tr id="manage_IsTop">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsTop") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_IsTop", "note") %></span>
	<Cai:CCheckBox ID="CB_IsTop" runat="server"  />
	</td>
</tr>

<tr id="manage_IsPic">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsPic") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_IsPic", "note") %></span>
	<Cai:CCheckBox ID="CB_IsPic" runat="server"  />
	</td>
</tr>

<tr id="manage_Pic">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Pic") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_Pic", "note") %></span>
	<Cai:CTextBox ID="TB_Pic" runat="server" /><a href="#" class="uploadpic xheditorupload"><%= Caicai.Framework.Common.Language.Get("Upload") %></a><a href="TB_Pic" class="showpic"><%= Caicai.Framework.Common.Language.Get("ShowPic") %></a>
	</td>
</tr>

<tr id="manage_IsSeo">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsSeo") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_IsSeo", "note") %></span>
	<Cai:CCheckBox ID="CB_IsSeo" runat="server"  />
	</td>
</tr>

<tr id="manage_Keywords">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Keywords") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_Keywords", "note") %></span>
	<Cai:CTextBox ID="TB_Keywords" runat="server" ControlType="MultiLine"  />
	</td>
</tr>

<tr id="manage_Description">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Description") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_News_Description", "note") %></span>
	<Cai:CTextBox ID="TB_Description" runat="server" ControlType="MultiLine"  />
	</td>
</tr>

<tr id="manage_InputDate">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("InputDate") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("InputDate", "note") %></span>
	<Cai:CTextBox ID="TB_InputDate" runat="server" ControlType="DateTime" /><a href="#" class="datetime"><%= Caicai.Framework.Common.Language.Get("NowDateTime") %></a>
	</td>
</tr>
<tr>
	<th>&nbsp;</th>
	<td><asp:Button ID="ButtonManage" runat="server" CssClass="button" onclick="Manage_Click" /><input type="reset" class="button" value='<%= Caicai.Framework.Common.Language.Get("Reset") %>' /></td>
</tr>
</table>
</asp:Panel>

<asp:Panel runat="server" ID="PanelShow">
<table class="table" style="margin-top:8px;">
<asp:Repeater ID="RepeaterShow" runat="server">
<ItemTemplate>
	<thead>
	<tr>
		<td colspan="2"><%= Caicai.Framework.Common.Language.Get("ShowData") %></td>
	</tr>
	</thead>
	<tr>
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("ID") %></th>
		<td><%# Eval("ID")%></td>
	</tr>
	
	<tr id="show_ClassID">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %></th>
		<td>
			<strong><a href="?search=true&type=int&field=classid&keyword=<%#Eval("ClassID")%>"><%# GetTableName("C_Word", "", Eval("ClassID").ToString())%></a></strong>
		</td>
	</tr>
	
	<tr id="show_Title">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Title") %></th>
		<td>
			<a href="?action=show&id=<%#Eval("id")%>" class="show"><%#Eval("Title")%></a>
		</td>
	</tr>
	
	<tr id="show_Content">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Content") %></th>
		<td>
			<div class="content"><%#Eval("Content")%></div>
		</td>
	</tr>
	
	<tr id="show_IsTop">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsTop") %></th>
		<td>
			<%# GetCheckBoxName(Eval("IsTop").ToString(), "True", "False")%>
		</td>
	</tr>
	
	<tr id="show_IsPic">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsPic") %></th>
		<td>
			<%# GetCheckBoxName(Eval("IsPic").ToString(), "True", "False")%>
		</td>
	</tr>
	
	<tr id="show_Pic">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Pic") %></th>
		<td>
			<%#Eval("Pic")%>
		</td>
	</tr>
	
	<tr id="show_IsSeo">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_IsSeo") %></th>
		<td>
			<%# GetCheckBoxName(Eval("IsSeo").ToString(), "True", "False")%>
		</td>
	</tr>
	
	<tr id="show_Keywords">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Keywords") %></th>
		<td>
			<%#Eval("Keywords")%>
		</td>
	</tr>
	
	<tr id="show_Description">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_Description") %></th>
		<td>
			<%#Eval("Description")%>
		</td>
	</tr>
	
	<tr id="show_ClickNum">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_News_ClickNum") %></th>
		<td>
			<%#Eval("ClickNum")%>
		</td>
	</tr>
	
	<tr>
		<th><%= Caicai.Framework.Common.Language.Get("InputDate") %></th>
		<td><%# Eval("InputDate")%></td>
	</tr>
</ItemTemplate>
</asp:Repeater>
<tr>
	<td>&nbsp;</td>
	<td colspan="2" class="manage"><a href="javascript:history.back()"><% =Caicai.Framework.Common.Language.Get("ReturnBack") %></a></td>
</tr>
</table>
</div>
</asp:Panel>

<asp:Panel runat="server" ID="PanelImport">
<table class="table" style="margin-top:8px;">
<thead>
<tr>
	<td colspan="2"><%= Caicai.Framework.Common.Language.Get("ImportData") %></td>
</tr>
</thead>
<tr class="noeffect">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("Import") %></th>
	<td>
	<div class="faq"><img src="images/import.png" /><%= Caicai.Framework.Common.Language.Get("ImportData", "note") %></div>
	&nbsp;<asp:Button ID="DownExcel" runat="server" CssClass="button" onclick="DownExcel_Click" />
	<div style="display:none;">
	<div id="ImportFields">[ClassID] as <%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %> ,[Title] as <%= Caicai.Framework.Common.Language.Get("C_News_Title") %> ,[Content] as <%= Caicai.Framework.Common.Language.Get("C_News_Content") %> ,[IsTop] as <%= Caicai.Framework.Common.Language.Get("C_News_IsTop") %> ,[IsPic] as <%= Caicai.Framework.Common.Language.Get("C_News_IsPic") %> ,[Pic] as <%= Caicai.Framework.Common.Language.Get("C_News_Pic") %> ,[IsSeo] as <%= Caicai.Framework.Common.Language.Get("C_News_IsSeo") %> ,[Keywords] as <%= Caicai.Framework.Common.Language.Get("C_News_Keywords") %> ,[Description] as <%= Caicai.Framework.Common.Language.Get("C_News_Description") %> ,[ClickNum] as <%= Caicai.Framework.Common.Language.Get("C_News_ClickNum") %> ,</div>
	<textarea ID="TB_ImportFields" name="TB_ImportFields"></textarea></div></td>
</tr>
<tr>
	<th style="width:120px;"></th>
	<td><asp:FileUpload ID="FileUploadImport" runat="server" style="width:60%;" /></td>
</tr>
<tr>
	<th>&nbsp;</th>
	<td>&nbsp;<asp:Button ID="ButtonImport" runat="server" CssClass="button" onclick="Import_Click" /></td>
</tr>
</table>
</asp:Panel>
<asp:Panel runat="server" ID="PanelExport">
<table class="table" style="margin-top:8px;">
<thead>
<tr>
	<td colspan="2"><%= Caicai.Framework.Common.Language.Get("ExportData") %></td>
</tr>
</thead>
</table>
<table class="table">
<tr class="noeffect">
	<td>
		<div class="faq"><img src="images/export.png" /><%= Caicai.Framework.Common.Language.Get("ExportData", "note") %></div>
	</td>
</tr>
<tr>
	<td id="FieldsAll" align="right">
	<input id="ID" type="checkbox" name="CB_Fields" checked="checked" /><label for="ID"><%= Caicai.Framework.Common.Language.Get("ID") %></label>
	
	<input id="ClassID" type="checkbox" name="CB_Fields" checked="checked" /><label for="ClassID"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %></label>
	
	<input id="Title" type="checkbox" name="CB_Fields" checked="checked" /><label for="Title"><%= Caicai.Framework.Common.Language.Get("C_News_Title") %></label>
	
	<input id="Content" type="checkbox" name="CB_Fields" checked="checked" /><label for="Content"><%= Caicai.Framework.Common.Language.Get("C_News_Content") %></label>
	
	<input id="IsTop" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsTop"><%= Caicai.Framework.Common.Language.Get("C_News_IsTop") %></label>
	
	<input id="IsPic" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsPic"><%= Caicai.Framework.Common.Language.Get("C_News_IsPic") %></label>
	
	<input id="Pic" type="checkbox" name="CB_Fields" checked="checked" /><label for="Pic"><%= Caicai.Framework.Common.Language.Get("C_News_Pic") %></label>
	
	<input id="IsSeo" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsSeo"><%= Caicai.Framework.Common.Language.Get("C_News_IsSeo") %></label>
	
	<input id="Keywords" type="checkbox" name="CB_Fields" checked="checked" /><label for="Keywords"><%= Caicai.Framework.Common.Language.Get("C_News_Keywords") %></label>
	
	<input id="Description" type="checkbox" name="CB_Fields" checked="checked" /><label for="Description"><%= Caicai.Framework.Common.Language.Get("C_News_Description") %></label>
	
	<input id="ClickNum" type="checkbox" name="CB_Fields" checked="checked" /><label for="ClickNum"><%= Caicai.Framework.Common.Language.Get("C_News_ClickNum") %></label>
	
	<input id="InputDate" type="checkbox" name="CB_Fields" checked="checked" /><label for="InputDate"><%= Caicai.Framework.Common.Language.Get("InputDate") %></label>
	</td>
</tr>
<tr align="right">
	<td>
		<div style="display:none;"><asp:TextBox ID="TB_Field" runat="server" /><asp:TextBox ID="checked_Fields" runat="server" width="80%">ID,ClassID,Title,Content,IsTop,IsPic,Pic,IsSeo,Keywords,Description,ClickNum,InputDate</asp:TextBox><asp:TextBox ID="TB_Fields" runat="server" width="80%"></asp:TextBox></div>
		<asp:TextBox ID="TB_Keyword" runat="server" />
		<select name="DDL_Fields" id="DDL_Fields">
		
		<option value="ClassID"><%= Caicai.Framework.Common.Language.Get("C_News_ClassID") %></option>
		
		<option value="Title"><%= Caicai.Framework.Common.Language.Get("C_News_Title") %></option>
		
		<option value="Content"><%= Caicai.Framework.Common.Language.Get("C_News_Content") %></option>
		
		<option value="IsTop"><%= Caicai.Framework.Common.Language.Get("C_News_IsTop") %></option>
		
		<option value="IsPic"><%= Caicai.Framework.Common.Language.Get("C_News_IsPic") %></option>
		
		<option value="Pic"><%= Caicai.Framework.Common.Language.Get("C_News_Pic") %></option>
		
		<option value="IsSeo"><%= Caicai.Framework.Common.Language.Get("C_News_IsSeo") %></option>
		
		<option value="Keywords"><%= Caicai.Framework.Common.Language.Get("C_News_Keywords") %></option>
		
		<option value="Description"><%= Caicai.Framework.Common.Language.Get("C_News_Description") %></option>
		
		<option value="ClickNum"><%= Caicai.Framework.Common.Language.Get("C_News_ClickNum") %></option>
		
		<option value="InputDate"><%= Caicai.Framework.Common.Language.Get("InputDate") %></option>
		</select>
		<asp:Button ID="ButtonSearch" runat="server" CssClass="button" onclick="Search_Click" /></td>
</tr>
<tr class="noeffect">
	<td class="gridview">
	<asp:GridView ID="GridViewDefault" runat="server"></asp:GridView>
	</td>
</tr>
</table>
<table class="table">
</tr>
<tr>
	<th>&nbsp;</th>
	<td><asp:Button ID="ButtonExport" runat="server" CssClass="button" onclick="Export_Click" /></td>
</tr>
</table>
</asp:Panel>
</form>
</body>
</html>