<%@ Page Inherits="Caicai.CMS.UI.Admin.Word" Table="C_Word" where="parentid=0" order="OrderNum 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_Word") %></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 isseo = ["#manage_Title","#manage_Keywords","#manage_Description"]
	$("#CB_IsSeo").myCheck({optName:isseo})

	$("#DDL_System").myValidator();
	$("#TB_Name").myValidator();
	$("#TB_Url").myValidator({type:"letter"});

	$("#TB_Url").myIsData({table:"c_word",field:"url",info:"Url地址已经重复，请输入其他地址！"});

	$("#TB_Content").after("<div class='linklist'></div>");
	$(".linklist").load("/default.aspx?name=sitekey");

	$("#TB_Link").after('<a href="#" title="" class="textbutton ">清空链接</a>')
	$("#TB_Link").after('<a href="#" title="$sublink$" class="textbutton ">插入子链接</a>')
	$("#TB_Link").after('<a href="#" title="$parentlink$" class="textbutton">插入父链接</a>')
	$(".textbutton").click(function()
	{
		$("#TB_Link").val($(this).attr("title"));
		return false;
	})

	$("#manage_Tree").hide();
})
</script>
</head>
<body id="C_Word">
<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_Word") %></a>
			<a href="?action=insert"><%= Caicai.Framework.Common.Language.Get("InsertData") %></a>
			
			
		</td>
		
	</tr>
  </thead>
</table>

<asp:Panel ID="PanelDefault" runat="server">
<table class="table" style="margin-top:8px;">
<thead>
	<tr>
		
		<th width="40"><%= Caicai.Framework.Common.Language.Get("ID") %></th>
		
		<td><%= Caicai.Framework.Common.Language.Get("C_Word_Name") %></td>
		
		<td width="50"><%= Caicai.Framework.Common.Language.Get("C_Word_IsHide") %></td>
		
		<td width="50"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %></td>
		
		<td width="120"><%= Caicai.Framework.Common.Language.Get("InputDate") %></td>
		<td width="200"><%= Caicai.Framework.Common.Language.Get("Manage") %></td>
	</tr>
</thead>

<%= Tree() %>
<asp:Repeater ID="RepeaterDefault" runat="server">
<ItemTemplate>
</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_ParentID">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_ParentID") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_Word_ParentID", "note") %></span>
	<Cai:CDropDownList ID="DDL_ParentID" runat="server" ControlType="Layer" Name="C_Word" Where="" Order="" TextName="" ValueName=""   />
	</td>
</tr>

<tr id="manage_System">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_System") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_Word_System", "note") %></span>
	<Cai:CDropDownList ID="DDL_System" runat="server" ControlType="FileName" Name="files/appsettings/system.xml" Where="" Order="" TextName="" ValueName=""   />
	</td>
</tr>

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

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

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

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

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

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

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

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

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

<tr id="manage_Keywords">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Keywords") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_Word_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_Word_Description") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_Word_Description", "note") %></span>
	<Cai:CTextBox ID="TB_Description" runat="server" ControlType="MultiLine"  />
	</td>
</tr>

<tr id="manage_OrderNum">
	<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td>
	<span class="note"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum", "note") %></span>
	<Cai:CTextBox ID="TB_OrderNum" runat="server" ControlType="OrderNum"  />
	</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_ParentID">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_ParentID") %></th>
		<td>
			<%#Eval("ParentID")%>
		</td>
	</tr>
	
	<tr id="show_System">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_System") %></th>
		<td>
			<%# GetFileName("files/appsettings/system.xml", Eval("System").ToString())%>
		</td>
	</tr>
	
	<tr id="show_Name">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Name") %></th>
		<td>
			<img src="images/ico_word.gif" />&nbsp;<strong><%#Eval("Name")%></strong><span class="gray"><%#Eval("Url")%></span>
		</td>
	</tr>
	
	<tr id="show_Url">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Url") %></th>
		<td>
			<%#Eval("Url")%>
		</td>
	</tr>
	
	<tr id="show_Content">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Content") %></th>
		<td>
			<%#Eval("Content")%>
		</td>
	</tr>
	
	<tr id="show_Link">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Link") %></th>
		<td>
			<%#Eval("Link")%>
		</td>
	</tr>
	
	<tr id="show_Tree">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Tree") %></th>
		<td>
			<%#Eval("Tree")%>
		</td>
	</tr>
	
	<tr id="show_IsHide">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_IsHide") %></th>
		<td>
			<img alt="<%# GetCheckBoxName(Eval("IsHide").ToString(), "True", "False")%>" src="images/ico_share_<%#Eval("IsHide")%>.gif" />
		</td>
	</tr>
	
	<tr id="show_IsTarget">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_IsTarget") %></th>
		<td>
			<%# GetCheckBoxName(Eval("IsTarget").ToString(), "True", "False")%>
		</td>
	</tr>
	
	<tr id="show_IsSeo">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_IsSeo") %></th>
		<td>
			<%# GetCheckBoxName(Eval("IsSeo").ToString(), "True", "False")%>
		</td>
	</tr>
	
	<tr id="show_Title">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Title") %></th>
		<td>
			<%#Eval("Title")%>
		</td>
	</tr>
	
	<tr id="show_Keywords">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Keywords") %></th>
		<td>
			<%#Eval("Keywords")%>
		</td>
	</tr>
	
	<tr id="show_Description">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_Description") %></th>
		<td>
			<%#Eval("Description")%>
		</td>
	</tr>
	
	<tr id="show_OrderNum">
		<th style="width:120px;"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %></th>
		<td>
			<a href="?action=up&isparentid=0&ordernum=<%#Eval("OrderNum")%>&id=<%#Eval("id")%>"><img alt="<%#Eval("OrderNum")%>" src="images/ico_up.gif" /></a><a href="?action=down&isparentid=0&ordernum=<%#Eval("OrderNum")%>&id=<%#Eval("id")%>"><img  alt="<%#Eval("OrderNum")%>" src="images/ico_down.gif" /></a>
		</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">[ParentID] as <%= Caicai.Framework.Common.Language.Get("C_Word_ParentID") %> ,[System] as <%= Caicai.Framework.Common.Language.Get("C_Word_System") %> ,[Name] as <%= Caicai.Framework.Common.Language.Get("C_Word_Name") %> ,[Url] as <%= Caicai.Framework.Common.Language.Get("C_Word_Url") %> ,[Content] as <%= Caicai.Framework.Common.Language.Get("C_Word_Content") %> ,[Link] as <%= Caicai.Framework.Common.Language.Get("C_Word_Link") %> ,[Tree] as <%= Caicai.Framework.Common.Language.Get("C_Word_Tree") %> ,[IsHide] as <%= Caicai.Framework.Common.Language.Get("C_Word_IsHide") %> ,[IsTarget] as <%= Caicai.Framework.Common.Language.Get("C_Word_IsTarget") %> ,[IsSeo] as <%= Caicai.Framework.Common.Language.Get("C_Word_IsSeo") %> ,[Title] as <%= Caicai.Framework.Common.Language.Get("C_Word_Title") %> ,[Keywords] as <%= Caicai.Framework.Common.Language.Get("C_Word_Keywords") %> ,[Description] as <%= Caicai.Framework.Common.Language.Get("C_Word_Description") %> ,[OrderNum] as <%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %> ,</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="ParentID" type="checkbox" name="CB_Fields" checked="checked" /><label for="ParentID"><%= Caicai.Framework.Common.Language.Get("C_Word_ParentID") %></label>
	
	<input id="System" type="checkbox" name="CB_Fields" checked="checked" /><label for="System"><%= Caicai.Framework.Common.Language.Get("C_Word_System") %></label>
	
	<input id="Name" type="checkbox" name="CB_Fields" checked="checked" /><label for="Name"><%= Caicai.Framework.Common.Language.Get("C_Word_Name") %></label>
	
	<input id="Url" type="checkbox" name="CB_Fields" checked="checked" /><label for="Url"><%= Caicai.Framework.Common.Language.Get("C_Word_Url") %></label>
	
	<input id="Content" type="checkbox" name="CB_Fields" checked="checked" /><label for="Content"><%= Caicai.Framework.Common.Language.Get("C_Word_Content") %></label>
	
	<input id="Link" type="checkbox" name="CB_Fields" checked="checked" /><label for="Link"><%= Caicai.Framework.Common.Language.Get("C_Word_Link") %></label>
	
	<input id="Tree" type="checkbox" name="CB_Fields" checked="checked" /><label for="Tree"><%= Caicai.Framework.Common.Language.Get("C_Word_Tree") %></label>
	
	<input id="IsHide" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsHide"><%= Caicai.Framework.Common.Language.Get("C_Word_IsHide") %></label>
	
	<input id="IsTarget" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsTarget"><%= Caicai.Framework.Common.Language.Get("C_Word_IsTarget") %></label>
	
	<input id="IsSeo" type="checkbox" name="CB_Fields" checked="checked" /><label for="IsSeo"><%= Caicai.Framework.Common.Language.Get("C_Word_IsSeo") %></label>
	
	<input id="Title" type="checkbox" name="CB_Fields" checked="checked" /><label for="Title"><%= Caicai.Framework.Common.Language.Get("C_Word_Title") %></label>
	
	<input id="Keywords" type="checkbox" name="CB_Fields" checked="checked" /><label for="Keywords"><%= Caicai.Framework.Common.Language.Get("C_Word_Keywords") %></label>
	
	<input id="Description" type="checkbox" name="CB_Fields" checked="checked" /><label for="Description"><%= Caicai.Framework.Common.Language.Get("C_Word_Description") %></label>
	
	<input id="OrderNum" type="checkbox" name="CB_Fields" checked="checked" /><label for="OrderNum"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %></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,ParentID,System,Name,Url,Content,Link,Tree,IsHide,IsTarget,IsSeo,Title,Keywords,Description,OrderNum,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="ParentID"><%= Caicai.Framework.Common.Language.Get("C_Word_ParentID") %></option>
		
		<option value="System"><%= Caicai.Framework.Common.Language.Get("C_Word_System") %></option>
		
		<option value="Name"><%= Caicai.Framework.Common.Language.Get("C_Word_Name") %></option>
		
		<option value="Url"><%= Caicai.Framework.Common.Language.Get("C_Word_Url") %></option>
		
		<option value="Content"><%= Caicai.Framework.Common.Language.Get("C_Word_Content") %></option>
		
		<option value="Link"><%= Caicai.Framework.Common.Language.Get("C_Word_Link") %></option>
		
		<option value="Tree"><%= Caicai.Framework.Common.Language.Get("C_Word_Tree") %></option>
		
		<option value="IsHide"><%= Caicai.Framework.Common.Language.Get("C_Word_IsHide") %></option>
		
		<option value="IsTarget"><%= Caicai.Framework.Common.Language.Get("C_Word_IsTarget") %></option>
		
		<option value="IsSeo"><%= Caicai.Framework.Common.Language.Get("C_Word_IsSeo") %></option>
		
		<option value="Title"><%= Caicai.Framework.Common.Language.Get("C_Word_Title") %></option>
		
		<option value="Keywords"><%= Caicai.Framework.Common.Language.Get("C_Word_Keywords") %></option>
		
		<option value="Description"><%= Caicai.Framework.Common.Language.Get("C_Word_Description") %></option>
		
		<option value="OrderNum"><%= Caicai.Framework.Common.Language.Get("C_Word_OrderNum") %></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>