<table width="100%" class="topmenu">
	<tr><td>
		<a href="cate.php"><em>文章分类</em></a><span>|</span>
		<a href="?action=batch" class="on"><em>批量修改</em></a><span>|</span>
		<a href="javascript:doDialog('{?$saxue_url?}/article/admin/cate.php?action=add','添加分类','550','450')"><em>添加分类</em></a><span>|</span>
		<a href="?action=spider"><em>采集器对应关系</em></a><span>|</span>
		<a href="?action=cache"><em>重建分类缓存</em></a>
	</td></tr>
</table>
<form id="formAdd" name="formAdd" method="post">
<input type="hidden" name="dosubmit" value="1">
<table width="100%" class="grid">
	<tr>
		<th width="300">选择分类</th>
		<th></th>
		<th>填写修改项</th>
	</tr>
	<tr>
		<td rowspan="6">
			<select name="catids[]" id="catids" multiple="multiple" style="height:300px;" title="按住“Ctrl”或“Shift”键可以多选，按住“Ctrl”可取消选择">{?$cates?}</select>
		</td>
		<td class="tdleft" width="100">列表每页显示：</td>
		<td><input type="text" class="text" name="pnum" id="pnum" size="20" value="" />&nbsp;<span class="gray">留空不修改</span></td>
	</tr>
	<tr> 
		<td class="tdleft">自定义频道页：</td>
		<td>
			<select name="showchannel" onchange="tempchange(this.value)">
				<option value="-1">不修改</option>
				<option value="0">否</option>
				<option value="1">是</option>
			</select>
		</td>
    </tr>
	<tr>
		<td class="tdleft">频道/列表模版：</td>
		<td><select name="templist" id="templist"><option value='-1'>不修改</option><option value="">默认模版</option>{?section name=i loop=$temps['channel']?}<option value="{?$i['value']?}">{?$i['value']?}</option>{?/section?}{?section name=i loop=$temps['list']?}<option value="{?$i['value']?}">{?$i['value']?}</option>{?/section?}</select></td>
	</tr>
	<tr>
		<td class="tdleft">内容页模版：</td>
		<td><select name="tempdetail"><option value='-1'>不修改</option><option value="">默认模版</option>{?section name=i loop=$temps['detail']?}<option value="{?$i['value']?}">{?$i['value']?}</option>{?/section?}</select></td>
	</tr>
	<tr>
		<td class="tdleft">目录页模版：</td>
		<td><select name="tempcatalog"><option value='-1'>不修改</option><option value="">默认模版</option>{?section name=i loop=$temps['catalog']?}<option value="{?$i['value']?}">{?$i['value']?}</option>{?/section?}</select></td>
	</tr>
	<tr>
		<td class="tdleft">章节页模版：</td>
		<td><select name="tempchapter"><option value='-1'>不修改</option><option value="">默认模版</option>{?section name=i loop=$temps['chapter']?}<option value="{?$i['value']?}">{?$i['value']?}</option>{?/section?}</select></td>
	</tr>
	<tr>
		<td colspan="3" class="foot">
			<input type="submit" value="提交修改" class="button">
		</td>
	</tr>
</table>
</form>
<script type="text/javascript">
function tempchange(ischannel){
	var temp = "<option value='-1'>不修改</option><option value=''>默认模版</option>";
	if (ischannel==1) {
		temp += "{?section name=i loop=$temps['channel']?}<option value='{?$i['value']?}'>{?$i['value']?}</option>{?/section?}";
	} else if (ischannel==0) {
		temp += "{?section name=i loop=$temps['list']?}<option value='{?$i['value']?}'>{?$i['value']?}</option>{?/section?}";
	} else {
		temp += "{?section name=i loop=$temps['channel']?}<option value='{?$i['value']?}'>{?$i['value']?}</option>{?/section?}{?section name=i loop=$temps['list']?}<option value='{?$i['value']?}'>{?$i['value']?}</option>{?/section?}";
	}
	$("#templist").html(temp)
}
</script>