<table width="100%" class="etable"> 
	<tr>
		<td width="100">分类</td>
		<td>
			<select name="pcid">
				<option value="0">一级分类</option>
			<{section name=c loop=$cats_list}>				
				<option value="<{$cats_list[c].cid}>" <{if $cats_list[c].cid == $row.pcid}>selected="selected"<{/if}>><{$cats_list[c].name}></option>
			<{/section}>					
			</select>
		</td>
	</tr> 
	<tr>
		<td>名称</td>
		<td><input name="name" type="text" size="38" value="<{$row.name}>"> </td>
	</tr>
	<tr>
		<td>关键字</td>
		<td><input name="keywords" type="text" size="38" value="<{$row.keywords}>"></td>
	</tr>
	<tr>
		<td valign="top" style="padding-top:10px;">描述</td>
		<td><textarea name="describe" cols="38" rows="3"><{$row.describe}></textarea></td>
	</tr> 
	<tr>
		<td>状态</td>
		<td>
			<label><input type="radio" value="1" name="status" <{if $row.status == '' || $row.status == '1'}>checked="checked"<{/if}>/>开启</label>
			<label><input type="radio" value="0" name="status" <{if $row.status == '0'}>checked="checked"<{/if}>/>关闭</label>
		</td>
	</tr>
</table>   
<script type="text/javascript">
function ajax_submit(){
	var pcid = $('select[name="pcid"]').val();
	var name = $('input[name="name"]').val();
	var keywords = $('input[name="keywords"]').val();
	var describe = $('textarea[name="describe"]').val(); 
	var status = $('input[name="status"]:checked').val();
	$.post('?m=article&a=category_save', {<{if $row.cid}>cid:<{$row.cid}>,<{/if}>pcid:pcid, name:name, keywords:keywords, describe:describe,status:status},function(result){ 
			data = jQuery.parseJSON(result); 
			if(data.error == '0'){ 
				parent.ajax_flush();
				parent.ajax_close(); 
			}else{
				alert(data.msg);
			} 
		});
}
</script>