<{if $row.id}><input type="hidden" name="id" value="<{$row.id}>"><{/if}>
<table class="etable"> 
	<tr>
		<td width="90">分类：</td>
		<td>
			<label><input type="radio" name="postion" value="1" <{if $row.postion == '1' || $smarty.get.id == ''}>checked="checked"<{/if}><{if $row.status == '1'}>checked="checked"<{/if}> class="status"/>PC端</label> 
			<label><input type="radio" name="postion" value="2" <{if $row.postion == '2'}>checked="checked"<{/if}> class="status"/>WAP端</label>
		</td>
	</tr>
	<tr>
		<td>名称：</td>
		<td><input type="text" name="name" id="name" size="38" value="<{$row.name}>"/></td>
	</tr> 
	<tr>
		<td>别名：</td>
		<td><input type="text" name="alias" id="alias" size="38" value="<{$row.alias}>"/></td>
	</tr> 
	<tr>
		<td>排序：</td>
		<td><input type="text" name="px" id="px" size="10" value="<{$row.px}>"/></td>
	</tr>
</table> 
<script type="text/javascript">
function ajax_submit(){
	name = $("#name").val();
	alias = $("#alias").val();
	px = $("#px").val(); 
	postion = $("input[name='postion']:checked").val();
	if(postion == undefined){
		$.alert('请选择分类'); return false;
	}
	$.post('<{$__ADMIN__}>ad/save',{<{if $row.id}>id:<{$row.id}>,<{/if}>name:name, alias:alias, postion:postion, px:px},function(result){
		data = jQuery.parseJSON(result); 
		if(data.error == '0'){
			parent.ajax_flush();
			parent.ajax_close();
		}else{
			alert(data.msg);
		} 
	});
}
</script>
 