<table width="100%" class="topmenu">
	<tr><td>
		<a href="column.php"><em>栏目管理</em></a><span>|</span>
		<a href="column.php?action=langset"><em>多语言显示设置</em></a><span>|</span>
		<a href="column.php?action=add"><em>添加栏目</em></a><span>|</span>
		<a href="javascript:doDialog('{?$saxue_admin_url?}/column.php?action=addlink','添加外部链接','500','160')"><em>添加外部链接</em></a><span>|</span>
		<a href="column.php?action=cache"><em>更新栏目缓存</em></a><span>|</span>
		<a href="batch.php" class="on"><em>批量编辑</em></a>
	</td></tr>
</table>
<form id="formAdd" name="formAdd" method="post">
<input type="hidden" name="dosubmit" value="1">
<table width="{?$width?}" class="grid">
	<thead><tr>{?section name=i loop=$cats?}<th width="280">{?$cats[i].catname?}（catid:<span class="red">{?$cats[i].catid?}</span>）</th>{?/section?}</tr></thead>
	<tbody>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td><b>栏目名称：</b><br><input type="text" class="text" name="cats[{?$i['key']?}][catname]" value="{?$cats[i].catname?}" style="width:260px"></td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td><b>英文目录：</b><br><input type="text" class="text" name="cats[{?$i['key']?}][catdir]" value="{?$cats[i].catdir?}" style="width:260px"></td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td><b>栏目图片：</b><br><input type="text" class="text" name="cats[{?$i['key']?}][image]" id="image{?$i['key']?}" value="{?$cats[i].image?}" style="width:180px">&nbsp;<input type="button" class="button" id="butimage{?$i['key']?}" value="选择图片" /></td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>1?}<b>显示模式：</b><br><input type="radio" name="cats[{?$i['key']?}][display]" value="0"{?if $cats[i].display==0?} checked{?/if?}> 栏目列表&nbsp;&nbsp;<input type="radio" name="cats[{?$i['key']?}][display]" value="1"{?if $cats[i].display==1?} checked{?/if?}> 栏目首页{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>0?}<b>列表页URL规则：</b><br><select name="cats[{?$i['key']?}][setting][list_ruleid]" style="width:260px">{?section name=j loop=$urlrule[$cats[i].modid]['list']?}<option value="{?$j['key']?}"{?if $cats[i]['setting'].list_ruleid==$j['key']?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype!=1?}<b>内容页URL规则：</b><br><select name="cats[{?$i['key']?}][setting][show_ruleid]" style="width:260px">{?section name=j loop=$urlrule[$cats[i].modid]['show']?}<option value="{?$j['key']?}"{?if $cats[i]['setting'].show_ruleid==$j['key']?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	{?section name=l loop=$language?}
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype!=1?}<span class="blue">{?$language[l].name?}</span><b>内容页模板：</b><br><select name="cats[{?$i['key']?}][setting][{?$l.key?}][show_template]" style="width:260px"><option value="show.html">默认模版</option>{?section name=j loop=$template[$cats[i].modid][$l.key]['show']?}<option value="{?$j['value']?}"{?if $j['value']==$cats[i]['setting'][$l.key].show_template?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>1?}<span class="blue">{?$language[l].name?}</span><b>栏目首页模板：</b><br><select name="cats[{?$i['key']?}][setting][{?$l.key?}][column_template]" style="width:260px"><option value="column.html">默认模版</option>{?section name=j loop=$template[$cats[i].modid][$l.key]['column']?}<option value="{?$j['value']?}"{?if $j['value']==$cats[i]['setting'][$l.key].column_template?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>0?}<span class="blue">{?$language[l].name?}</span><b>列表页模板：</b><br><select name="cats[{?$i['key']?}][setting][{?$l.key?}][list_template]" style="width:260px"><option value="list.html">默认模版</option>{?section name=j loop=$template[$cats[i].modid][$l.key]['list']?}<option value="{?$j['value']?}"{?if $j['value']==$cats[i]['setting'][$l.key].list_template?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>0?}<span class="blue">{?$language[l].name?}</span><b>列表每页显示：</b><input type="text" class="text" name="cats[{?$i['key']?}][setting][{?$l.key?}][list_pnum]" value="{?$cats[i]['setting'][$l.key].list_pnum?}" style="width:80px" onkeyup="value=value.replace(/[^0-9]/g,'');">{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>1?}<span class="blue">{?$language[l].name?}</span><b>搜索页模板：</b><br><select name="cats[{?$i['key']?}][setting][{?$l.key?}][search_template]" style="width:260px"><option value="search.html">默认模版</option>{?section name=j loop=$template[$cats[i].modid][$l.key]['search']?}<option value="{?$j['value']?}"{?if $j['value']==$cats[i]['setting'][$l.key].search_template?} selected{?/if?}>{?$j['value']?}</option>{?/section?}</select>{?/if?}</td>{?/section?}</tr>
	<tr class='rowbg'>{?section name=i loop=$cats?}<td>{?if $cats[i].modtype>1?}<span class="blue">{?$language[l].name?}</span><b>搜索每页显示：</b><input type="text" class="text" name="cats[{?$i['key']?}][setting][{?$l.key?}][search_pnum]" value="{?$cats[i]['setting'][$l.key].search_pnum?}" style="width:80px" onkeyup="value=value.replace(/[^0-9]/g,'');">{?/if?}</td>{?/section?}</tr>
	{?/section?}
	<tr><td colspan="99"><input type="submit" name="submit" id="submit" class="button" value="提 交"/></td></tr>
	</tbody>
</table>
</form>
<script type="text/javascript" src="{?$saxue_skin_server?}/editor/kindeditor-min.js"></script>
<script type="text/javascript" src="{?$saxue_skin_server?}/editor/lang/zh_CN.js"></script>
<link type="text/css" rel="stylesheet" href="{?$saxue_skin_server?}/editor/themes/default/default.css" />
<script type="text/javascript">
KindEditor.ready(function(K) {
	var editor = K.editor({
		langType : 'zh_CN',
		urlType  : 'domain',
		uploadJson : '{?$saxue_url?}/api/upload_json.php',
		fileManagerJson : '{?$saxue_url?}/api/file_manager_json.php',
		allowFileManager : true
	});
	{?section name=i loop=$cats?}K('#butimage{?$i['key']?}').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				imageUrl : K('#image{?$i['key']?}').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#image{?$i['key']?}').val(url);
					editor.hideDialog();
				}
			});
		});
	});{?/section?}
});
</script>