<table class="etable"> 
	<tr>
		<td width="80">名称：</td>
		<td><input type="text" name="name" value="<{$row.name}>" id="name" size="30"/></td>
	</tr>
	<tr>	
		<td>代码：</td>
		<td><input type="text" name="code" value="<{$row.code}>" id="code" size="30"/></td>
	</tr> 
	<tr>
		<td>排序：</td>
		<td><input type="text" name="px" value="<{$row.px}>" id="px" size="10"/></td>
	</tr> 
</table> 
<script type="text/javascript">
function ajax_submit(){
	var code = $("#code").val();
	if(code != '0'){
		var name = $("#name").val();
		var px = $("#px").val(); 
		$.post('<{$__ADMIN__}>admin/func_mod_save',{
			<{if $row.id}>id:<{$row.id}>,<{/if}>
			<{if $smarty.get.pid}>pid:'<{$smarty.get.pid}>'<{else}>pid:'0'<{/if}>, 
			name:name,
			code:code,
			px:px
		},function(result){ 
			data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				parent.$.alert('保存成功', function(){
					parent.ajax_flush();
					parent.ajax_close();
				});
			}else{
				parent.$.alert(data.msg);
			} 
		});	
	}else{
		alert('请选择模块');
	}
}
</script>