<{import file="index/header_shop.html" title="快递编辑"}> 
<style type="text/css">
.area{ width:100%; float:left; }
.area a{ border:1px solid #eee; margin:0 10px 10px 0; padding:3px 6px 2px; float:left; }
.area a.ck{ border:1px solid #f00; color:#f00; }
</style>
<div class="tab_name"><a class="back" href="member.php?m=express">运费管理</a></div>
<div class="lbox">
	<form action="?m=express&a=save" method="post" id="form">
		<{if $row.id}><input type="hidden" name="id" value="<{$row.id}>"/><{/if}>
		<table class="etable">
			<tr>
				<td width="100">模板名称： </td>
				<td><input type="text" name="name" size="30" id="text" value="<{$row.name}>"/></td>
			</tr>
			<!--tr>
				<td valign="top" style="padding-top:12px;">地区列表： </td>
				<td><div class="area">
						<{foreach item=i from=$area}>
							<a href="javascript:;" data-id="<{$i.id}>"><{$i.name}></a>
						<{/foreach}>
					</div>
					<div class="area_ck"> </div> 
				</td>
			</tr-->
			<tr>
				<td>快递费用： </td>
				<td><input type="text" name="price" size="30" id="text" value="<{$row.price}>"/></td>
			</tr>
			<tr>
				<td>启用状态： </td>
				<td>
					<label><input type="radio" name="status" value="1" checked="checked"/> 启用</label>
					<label><input type="radio" name="status" value="0"/> 关闭</label>
				</td>
			</tr>  
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" class="submit" value="保 存"/></td>
			</tr>  
		</table>
	</form> 
</div>
<{include file="index/footer.html"}>
<script type="text/javascript">
$(function(){
	$(".area a").click(function(){
		$this = $(this);
		id = $this.attr('data-id');
		name = $this.html();
		if($this.hasClass('ck')){
			$this.removeClass("ck");
			$(".area_ck").find('.area_'+id).remove();
		}else{
			$this.addClass("ck");
			if($(".area_ck input").length > 0){
				$(".area_ck").append('<input type="hidden" class="area_'+id+'" name="area[]" value="'+id+'"/>'); 
			}else{
				$(".area_ck").html('<input type="hidden" class="area_'+id+'" name="area[]" value="'+id+'"/>'); 
			} 
		}
	});
});
</script>