<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<%@ Register TagPrefix="alicmsUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="alicmsUC" TagName="LanguageMenu" Src="../../language_menu.dwt.ascx"%>
<!doctype html>
<html>
<head>
<ali:List ID="Module" Object="Module" />
<meta charset="utf-8">
<title>添加栏目</title>
<link rel="stylesheet"  href="<%=CommonPath%>jquery/themes/lightness/all.css">
<ali:Comment><link rel="stylesheet" href="../../S01/CHS/css/common.css"></ali:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" >
<alicmsUC:Ime Ime="true" Eot="true" runat="server" />
<script language="c#" runat="server">
protected string GetModuleNamespace(object moduleID)
{
	DataRow[] rows = Module.Select(Alias.Module.ID + "='" + moduleID + "'");
	if (rows.Length == 0)
		return String.Empty;
	else
		return rows[0][Alias.Module.Namespace].ToString();
}
</script>
<script>
var _page = 'channel_add',
    _lang = '<%=ContentLang%>',
    _webPath = '<%=WebPath%>',
    _imagePath = '<%=ImagePath%>',
    _channelLang = _lang,
    _xmlChannel,
    _xmlTemplate,
    _xmlSkin,
    _uploadLogo = false,
    _uploadLink = false,
    _lang_working = '正在操作...',
    _lang_operation_fail = '操作失败！',
    _lang_operation_success = '操作成功！',
    _lang_start_upload_logo = '开始上传栏目Logo...',
    _lang_uploading_logo = '开始上传栏目Logo...',
    _lang_start_upload_link = '开始上传链接Logo...',
    _lang_uploading_link = '开始上传链接Logo...',
    _lang_name_empty = '名称不能空！',
    _lang_logo_type_must_be = '栏目Logo类型应为：',
    _lang_link_type_must_be = '链接Logo类型应为：',
    _lang_path_incorrect = '路径格式不正确！',
    _lang_innerid_fail = '获取InnerID失败！',
    _lang_path_tip1 = '首页，则留空。其它必须以斜杠（/）结尾，路经不能重复！',
    _lang_path_tip2 = ',必须以http://开头',
    _lang_loading_template_list = '正在获取模板列表...',
    _lang_loading_skin_list = '正在获取皮肤列表...',
    _lang_loading_channel_list = '正在获取栏目列表...',
    _lang_uyl = '维吾尔拉丁文',
    _lang_uyc = '维吾尔西里尔文',
    _lang_kgc = '柯尔克孜西里尔文',
    _lang_cht = '繁体中文',
    _lang_name_empty = '请输入名称！',
    _lang_select_template = '请选择模板！',
    _lang_select_skin = '请选择皮肤！',
    _lang_select_instance = '请选择实例！',
    _lang_loading_innerid = '正在获取InnerID...',
    _lang_path_exist = '路径已经存在！',
    _lang_path_incorrect = '路径格式不正确！';
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" ></div>
	<div class="Title">添加栏目</div>
	<div class="Right">
		<alicmsUC:LanguageMenu runat="server" />
		<img height="15" src="<%=ImagePath%>dropdown.gif" > 语言：<%=CurrentLanguage%>
	</div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left"></li>
		<li class="Middle"><a href="../channel/list.aspx?Lang=<%=ContentLang%>">栏目列表</a></li>
		<li class="Right"></li>
		<li class="Left Selected"></li>
		<li class="Middle Selected">添加栏目</li>
		<li class="Right Selected"></li>
	</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" name="Type" id="FunctionalChannel" checked="checked" ><label for="FunctionalChannel">功能栏目</label>
						<input type="radio" name="Type" id="NonFunctionalChannel" ><label for="NonFunctionalChannel">非功能栏目</label>
						<input type="radio" name="Type" id="OuterLink" ><label for="OuterLink">外部链接</label>
					</td>
				</tr>
				<tr>
					<th>实例：</th>
					<td>
						<ali:List Object="Instance" Sort="InnerID DESC">
							<select name="InstanceID" class="<%=ContentLang%>Font">
								<ali:Record>
									<option value="<%=ID%>" ModuleID="<%=GetModuleNamespace(ModuleID)%>"><%=Name%></option>
								</ali:Record>
							</select>
						</ali:List>
					</td>
				</tr>
				<tr>
					<th>父栏目：</th>
					<td>
						<select name="ParentID" class="<%=ContentLang%>Font">
							<option value="">未指定</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>名称：</th>
					<td><input type="text" name="Name" maxlength="50" class="Text <%=ContentLang%>Font"></td>
				</tr>
				<tr>
					<th>路径：</th>
					<td><input type="text" name="Path" size="40" maxlength="50" class="Text" ><br /><span id="PathTip">首页，则留空。其它必须以斜杠（/）结尾，路经不能重复！<br />可以包含正则表达式，格式：{名称:正则表达式}</span></td>
				</tr>
				<tr>
					<th>模板：</th>
					<td>
						<img id="Thumbnail" width="50" height="50" alt="预览" style="float:left;margin-right:5px">
						<select name="TemplatePath" class="Text" style="width:150px"></select><br /><br />
						<select name="SkinPath" class="Text" style="width:150px"></select>
						<input type="hidden" name="TemplateLang" value="<%=ContentLang%>" >
					</td>
				</tr>
				<tr>
					<th>是否动态模板：</th>
					<td>
						<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 />
						<ol style="display:none">
							<li>如果是动态模板，并且栏目路径中没有正则表达式，则设置name为ID，value为栏目路径后的第一个目录名称。</li>
							<li>如果是动态模板，并且栏目路径中包含正则表达式，则设置name为正则名称，value为正则匹配值。</li>
							<li>栏目所属的模块的InstanceConfig对象必须包含GetDynamicTemplate的函数，它接受name和value的两个参数，并且返回皮肤路径。</li>
						</ol>
					</td>
				</tr>
				<tr>
					<th>智能翻译成：</th>
					<td>
						<select name="TranslateLang">
							<option value="">未指定</option>
						</select>
						<span id="MatchSpan" style="display:none"><input type="checkbox" id="Match" ><label for="Match">匹配</label></span>
					</td>
				</tr>
				<tr>
					<th>是否生成：</th>
					<td>
						<input type="radio" name="Generate" id="GenerateYes" ><label for="GenerateYes">是</label>
						<input type="radio" name="Generate" id="GenerateNo" checked="checked"><label for="GenerateNo">否</label>
					</td>
				</tr>
				<tr>
					<th>默认文档（首页）：</th>
					<td><input type="text" name="DefaultDocument" value="index" size="15" maxlength="50" class="Text" ></td>
				</tr>
				<tr>
					<th>扩展名：</th>
					<td><input type="text" name="Extension" value=".aspx" size="10" maxlength="50" class="Text"></td>
				</tr>
				<tr>
					<th>域名：</th>
					<td>
						<input type="text" name="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"></textarea></td>
				</tr>
				<tr>
					<th>脚注（版权信息）：</th>
					<td><textarea type="text" name="Footer" cols="60" rows="4" wrap="off" class="Text <%=ContentLang%>Font"></textarea></td>
				</tr>
				<tr>
					<th>ICP备案号：</th>
					<td><input type="text" name="ICP" size="40" class="Text" ></td>
				</tr>
				<tr>
					<th>统计代码：</th>
					<td><textarea type="text" name="StatisticsCode" cols="60" rows="2" wrap="off" class="Text"></textarea></td>
				</tr>
				<tr>
					<th>栏目Logo：</th>
					<td>
						<input id="LogoTextbox" type="text" name="Logo" size="60" class="Text" >
						<input id="LogoBrowse" type="button" value="浏览..." >
						<input type="hidden" name="LogoAllowedType" value="gif|jpg|jpeg|png|bmp|png" >
						<img height="22" id="LogoView" alt="栏目Logo" style="vertical-align:bottom" >
					</td>
				</tr>
				<tr>
					<th>链接Logo：</th>
					<td>
						<input id="LinkTextbox" type="text" name="Link" size="60" class="Text" >
						<input id="LinkBrowse" type="button" value="浏览..." >
						<input type="hidden" name="LinkAllowedType" value="gif|jpg|jpeg|png|bmp|png" >
						<img height="22" id="LinkView" alt="链接Logo" style="vertical-align:bottom" >
					</td>
				</tr>
				<tr>
					<th>启用可视编辑：</th>
					<td>
						<input type="radio" name="VisualEdit" id="VisualEdit0" value="0" checked="checked" ><label for="VisualEdit0">禁用</label>
						<input type="radio" name="VisualEdit" id="VisualEdit1" value="1" ><label for="VisualEdit1">静态</label>
						<input type="radio" name="VisualEdit" id="VisualEdit2" value="2" ><label for="VisualEdit2">动态</label>
						<ol>
							<li>如果是动态，并且栏目路径中不包含正则表达式，则设置name为ID，value为栏目路径后的第一个目录名称。</li>
							<li>如果是动态，并且栏目路径中包含正则表达式，则设置name为正则名称，value为正则匹配值。</li>
							<li>栏目所属的模块的InstanceConfig对象必须包含GetVisualEditFolder(name, value, checkRight)的函数，它返回可视编辑目录路径。</li>
						</ol>
					</td>
				</tr>
				<tr>
					<th>栏目菜单：</th>
					<td>
						<label><input type="radio" name="EnableMenu" value="true" >启用</label>
						<label><input type="radio" name="EnableMenu" value="false" checked="checked" >禁用</label>
					</td>
				</tr>
				<tr style="display:none">
					<th>导航位置：</th>
					<td>
						<label><input type="radio" name="NavPosition" value="Top" checked="checked" >顶部</label>
						<label><input type="radio" name="NavPosition" value="Left" >左侧</label>
					</td>
				</tr>
				<tr style="display:none">
					<th>侧栏导航样式：</th>
					<td>
						<label><input type="radio" name="SideNavStyle" value="Tree" checked="checked" >树型</label>
						<label><input type="radio" name="SideNavStyle" value="Accordion" >折叠型</label>
					</td>
				</tr>
				<tr style="display:none">
					<th>管理员角色：</th>
					<td><input type="text" name="AdminRole" size="30" class="Text" ></td>
				</tr>
				<tr style="display:none">
					<th>附加登陆路径：</th>
					<td><input type="text" name="LoginPath" size="30" class="Text" /></td>
				</tr>
				<tr>
					<th>Meta：</th>
					<td>
						Keywords：<input type="text" name="MetaKeywords" size="20" maxlength="255" class="Text <%=ContentLang%>Font" >
						Description：<input type="text" name="MetaDescription" size="20" maxlength="255" class="Text <%=ContentLang%>Font" >
					</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</div>
<script src="<%=CommonPath%>jquery/core.js"></script>
<script src="<%=CommonPath%>jquery/ui.js"></script>
<script src="<%=Manager.GetModulePath(null)%><%=Instance[AliCMS.SystemModule.Alias.Module.Namespace]%>/alias.js"></script>
<script src="<%=CommonPath%>uploader.js"></script>
<script src="<%=CommonPath%>xmldom.js"></script>
<script src="<%=CommonPath%>utility.js"></script>
<script src="<%=JsPath%>global.js"></script>
<script src="<%=ModuleJsPath%>module.js"></script>
</body>
</html>