<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<%@ Register TagPrefix="IlgharUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="IlgharUC" TagName="LanguageMenu" Src="../../language_menu.dwt.ascx"%>
<!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>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ilghar:Get ID="ThisChannel" Object="Channel" InnerID="Request.QueryString['ID']" Validate="True" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑栏目</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<ilgharUC:Ime Ime="true" Eot="true" runat="server" />
<script language="c#" runat="server">
protected string CurrentModuleID
{
	get
	{
		object instanceID = ThisChannel[IlgharCMS.SystemModule.Alias.Channel.InstanceID];
		if (Guid.Equals(instanceID, Guid.Empty))
			return Guid.Empty.ToString();
		
		DataRow[] rows = Manager.Channels.Select(IlgharCMS.SystemModule.Alias.Instance.ID + "='" + instanceID + "'");
		return rows[0][IlgharCMS.SystemModule.Alias.Module.ID].ToString();
	}
}
</script>
<script type="text/javascript">
var _page = "channel_edit";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _id = "<%=Request.QueryString["ID"]%>";
var _templatePath = "<%=ThisChannel[TemplatePath]%>";
var _instanceID = "<%=ThisChannel[InstanceID]%>";
<%If Convert.IsDBNull(ThisChannel[TemplatePath])%>
	var _type = "OuterLink";
<%ElseIf Guid.Equals(ThisChannel[InstanceID], Guid.Empty)%>
	var _type = "NonFunctional";
<%Else%>
	var _type = "Functional";
<%EndIf%>
var _uploadLogo = false;
var _uploadLink = false;
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_start_upload_logo = "开始上传栏目Logo...";
var _lang_uploading_logo = "开始上传栏目Logo...";
var _lang_start_upload_link = "开始上传链接Logo...";
var _lang_uploading_link = "开始上传链接Logo...";
var _lang_logo_type_must_be = "栏目Logo类型应为：";
var _lang_link_type_must_be = "链接Logo类型应为：";
var _lang_name_empty = "名称不能空！";
var _lang_path_tip1 = "首页，则留空。其它必须以斜杠（/）结尾，路经不能重复！";
var _lang_path_tip2 = "必须以http://开头";
var _lang_path_incorrect = "路径格式不正确！";
var _lang_path_exist = "路径已经存在！";
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title"><a href="list.aspx?Lang=<%=ContentLang%>">栏目列表</a> → <span class="<%=ContentLang%>Font"><%=ThisChannel[Name]%></span></div>
	<div class="Right">
		<ilgharUC:LanguageMenu runat="server" />
		<img height="15" src="<%=ImagePath%>dropdown.gif" /> 语言：<%=CurrentLanguage%>
	</div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left Selected"></li>
		<li class="Middle Selected">编辑</li>
		<li class="Right Selected"></li>
		<%If !Convert.IsDBNull(ThisChannel[TemplatePath])%>
			<li class="Left"></li>
			<li class="Middle"><a href="change_template.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">更改模板</a></li>
			<li class="Right"></li>
			<li class="Left"></li>
			<li class="Middle"><a href="extra_instance.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">栏目邦定</a></li>
			<li class="Right"></li>
		<%EndIf%>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<form>
		<table border="0" cellpadding="4" cellspacing="1">
			<tfoot>
				<tr>
					<td colspan="2">
						<input type="submit" value="编辑" />
					</td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<th width="120">类型：</th>
					<td>
						<input type="radio" id="Functional" disabled="disabled" />功能栏目
						<input type="radio" id="NonFunctional" disabled="disabled" />非功能栏目
						<input type="radio" id="OuterLink" disabled="disabled" />外部链接
					</td>
				</tr>
				<%If !Guid.Equals(ThisChannel[InstanceID], Guid.Empty)%>
					<tr>
						<th>实例：</th>
						<td>
							<ilghar:List Object="Instance" Condition="ModuleID=CurrentModuleID">
								<select name="InstanceID" class="<%=ContentLang%>Font">
								<ilghar:Record>
									<%If Guid.Equals(ThisChannel[InstanceID], ID)%>
										<option value="<%=ID%>" selected="selected"><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Name%></option>
									<%EndIf%>
								</ilghar:Record>
								</select>
							</ilghar:List>
						</td>
					</tr>
				<%EndIf%>
				<tr>
					<th>父栏目：</th>
					<td>
						<select name="ParentID" class="<%=ContentLang%>Font">
							<option value="">未指定</option>
							<ilghar:Tree Object="Channel">
								<ilghar:Control>
									<ilghar:Space>&nbsp;&nbsp;</ilghar:Space>
									<ilghar:Line>│</ilghar:Line>
									<ilghar:TopOpen>┌</ilghar:TopOpen>
									<ilghar:Top>┌</ilghar:Top>
									<ilghar:MiddleOpen>├</ilghar:MiddleOpen>
									<ilghar:Middle>├</ilghar:Middle>
									<ilghar:BottomOpen>└</ilghar:BottomOpen>
									<ilghar:Bottom>└</ilghar:Bottom>
								</ilghar:Control>
								<ilghar:Record>
									<%If Guid.Equals(ID, ThisChannel[ParentID])%>
										<option value="<%=ID%>" selected="selected"><%=Control%><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Control%><%=Name%></option>
									<%EndIf%>
									<%=ChildRecords%>
								</ilghar:Record>
							</ilghar:Tree>
						</select>
					</td>
				</tr>
				<tr>
					<th>名称：</th>
					<td><input type="text" name="Name" value="<%=ThisChannel[Name]%>" maxlength="50" class="Text <%=ContentLang%>Font" /></td>
				</tr>
				<tr>
					<th>路径：</th>
					<td><input type="text" name="Path" value="<%=ThisChannel[Path]%>" size="40" maxlength="50" class="Text" /><br /><span id="PathTip"></span></td>
				</tr>
				<%If !Convert.IsDBNull(ThisChannel[TemplatePath])%>
					<tr>
						<th>是否动态模板：</th>
						<td>
							<%If Convert.ToBoolean(ThisChannel[IsDynamicTemplate])%>
								<input type="radio" name="IsDynamicTemplate" id="IsDynamicTemplateYes" checked="checked" /><label for="IsDynamicTemplateYes">是</label>
								<input type="radio" name="IsDynamicTemplate" id="IsDynamicTemplateNo" /><label for="IsDynamicTemplateNo">否</label>
								<br />
								<span id="DynamicTemplateID">标识：<input type="text" name="DynamicTemplateID" value="<%=ThisChannel[DynamicTemplateID]%>" size="50" />可以空。可以通过正则表达式从URL中抽取标识。匹配组名称为"ID"。</span>
							<%Else%>
								<input type="radio" name="IsDynamicTemplate" id="IsDynamicTemplateYes" /><label for="IsDynamicTemplateYes">是</label>
								<input type="radio" name="IsDynamicTemplate" id="IsDynamicTemplateNo" checked="checked" /><label for="IsDynamicTemplateNo">否</label>
								<br />
								<span id="DynamicTemplateID" style="display:none">标识：<input type="text" name="DynamicTemplateID" value="<%=ThisChannel[DynamicTemplateID]%>" size="50" />可以空。可以通过正则表达式从URL中抽取标识。匹配组名称为"ID"。</span>
							<%EndIf%>
						</td>
					</tr>
					<tr>
						<th>是否生成：</th>
						<td>
							<%If Convert.ToBoolean(ThisChannel[Generate])%>
								<input type="radio" name="Generate" id="GenerateYes" checked="checked" /><label for="GenerateYes">是</label>
								<input type="radio" name="Generate" id="GenerateNo" /><label for="GenerateNo">否</label>
							<%Else%>
								<input type="radio" name="Generate" id="GenerateYes" /><label for="GenerateYes">是</label>
								<input type="radio" name="Generate" id="GenerateNo" checked="checked" /><label for="GenerateNo">否</label>
							<%EndIf%>
						</td>
					</tr>
					<tr>
						<th>默认文档（首页）：</th>
						<td><input type="text" name="DefaultDocument" value="<%=ThisChannel[DefaultDocument]%>" size="15" maxlength="50" class="Text" /></td>
					</tr>
					<tr>
						<th>扩展名：</th>
						<td><input type="text" name="Extension" value="<%=ThisChannel[Extension]%>" size="10" maxlength="50" class="Text" /></td>
					</tr>
					<tr>
						<th>域名：</th>
						<td>
							<input type="text" name="Domain" value="<%=ThisChannel[Domain]%>" size="40" maxlength="50" class="Text" /><br />
							以http://开头，以斜杠（/）结束，可以包含子目录。可绑定多个域名，多域名用"|"隔开。
						</td>
					</tr>
					<tr>
						<th>公告：</th>
						<td><textarea type="text" name="Notice" cols="60" rows="4" wrap="off" class="Text <%=ContentLang%>Font"><%=ThisChannel[Notice]%></textarea></td>
					</tr>
					<tr>
						<th>脚注（版权信息）：</th>
						<td><textarea type="text" name="Footer" cols="60" rows="4" wrap="off" class="Text <%=ContentLang%>Font"><%=ThisChannel[Footer]%></textarea></td>
					</tr>
					<tr>
						<th>ICP备案号：</th>
						<td><input type="text" name="ICP" value="<%=ThisChannel[ICP]%>" size="40" class="Text" /></td>
					</tr>
					<tr>
						<th>统计代码：</th>
						<td><textarea type="text" name="StatisticsCode" cols="60" rows="2" wrap="off" class="Text"><%=ThisChannel[StatisticsCode]%></textarea></td>
					</tr>
					<tr>
						<th>栏目Logo：</th>
						<td>
							<input id="LogoTextbox" type="text" name="Logo" value="<%=ThisChannel[Logo]%>" size="60" class="Text" />
							<input id="LogoBrowse" type="button" value="浏览..." />
							<input type="hidden" name="LogoAllowedType" value="gif|jpg|jpeg|png|bmp|png" />
							<a href="<%=ThisChannel[Logo]%>" target="_blank"><img src="<%=ThisChannel[Logo]%>" height="22" id="LogoView" alt="栏目Logo" style="vertical-align:bottom" /></a>
						</td>
					</tr>
					<tr>
						<th>链接Logo：</th>
						<td>
							<input id="LinkTextbox" type="text" name="Link" value="<%=ThisChannel[Link]%>" size="60" class="Text" />
							<input id="LinkBrowse" type="button" value="浏览..." />
							<input type="hidden" name="LinkAllowedType" value="gif|jpg|jpeg|png|bmp|png" />
							<a href="<%=ThisChannel[Link]%>" target="_blank"><img src="<%=ThisChannel[Link]%>" height="22" id="LinkView" alt="链接Logo" style="vertical-align:bottom" /></a>
						</td>
					</tr>
					<tr>
						<th>Meta：</th>
						<td>
							Keywords：<input type="text" name="MetaKeywords" value="<%=ThisChannel[MetaKeywords]%>" size="20" maxlength="255" class="Text <%=ContentLang%>Font" />
							Description：<input type="text" name="MetaDescription" value="<%=ThisChannel[MetaDescription]%>" size="20" maxlength="255" class="Text <%=ContentLang%>Font" />
						</td>
					</tr>
				<%EndIf%>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>uploader.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=JsPath%>system.js"></script>
</body>
</html>