<{import file="header.html" title="品牌管理"}> 
<style type="text/css">
/*图片头像*/
.gs_img{ width:100%; padding:0 0 0 10px; float:left; }
.gs_img img{ max-width:35px; max-height:35px; float:left; }
.gs_img a{ padding:6px 0 0 10px; float:left; } 
</style>
<link rel="stylesheet" type="text/css" href="<{$__APP__}>public/css/upload_album.css?v=<{$js_version}>">
<div class="tab2"><a class="back" href="<{$__SELLER__}>goods/brand">品牌编辑</a></div> 
<div class="baseBox">
	<{uqcms m="goods" v="row" c="shop_brand_one:id=smarty.get.id"}>
	<form action="<{$__SELLER__}>goods/brand_save" method="post" id="form"> 
		<{if $row.id}><input type="hidden" name="id" id="id" value="<{$row.id}>"/><{/if}>
		<input type="hidden" name="gid" id="gid" value="<{$row.gid}>"/>
		<table class="etable">
			<tr>
				<td width="100">品牌名称：</td>
				<td><input type="text" name="name" id="name" value="<{$row.name}>" size="50"/></td>
			</tr> 
			<tr>
				<td>品牌描述： </td>
				<td><textarea name="desc" cols="52" rows="3"><{$row.desc}></textarea></td>
			</tr>
			<tr>
				<td valign="top" style="padding-top:10px;">品牌图片：</td>
				<td>
					<div class="upload_box">
						<{if $row.images != ''}>
							<div class="upload_one">
								<div class="img"><img src="<{$__IMG__}><{$row.images|img_size:100x100}>"/></div>
								<a href="javascript:;" class="unchimg">选择图片</a> 
								<input type="hidden" name="images" value="<{$row.images}>"/> 	
							</div>
						<{else}>
							<div class="upload_one" style="display:none;">
								<div class="img"><img src=""/></div>
								<a href="javascript:;" class="unchimg">选择图片</a> 
								<input type="hidden" name="images" value="<{$row.images}>"/> 	
							</div>
							<div class="upload_a">
								<a class="file" href="javascript:;"><em></em><span>上传图片</span></a>
							</div> 
						<{/if}>
					</div>
				</td>
			</tr> 
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" class="submit" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
<{import file="footer.html"}>
<script type="text/javascript" src="<{$__APP__}>public/js/upload_album.js?v=<{$js_version}>"></script> 
<script type="text/javascript"> 
function goods_edit(name,url)
{
	ajax_dialog(name, url, 800, 500); 
}

$(function(){
	$(".upload_a a,a.unchimg").click(function(){
		upload_manage('brand', '', 0);
	});
}); 

function upload_insert(postion, file_id)
{
	ck_img_url = $(".uimg_ck_value").attr('data-url');
	ck_img_name = $(".uimg_ck_value").attr('data-name');
	if(ck_img_url){
		$(".upload_one").show().find("img").attr('src', ck_img_url);
		$(".upload_one").find('input').val(ck_img_name);	
		$(".upload_a").remove();
		img_close();
	}else{
		$.alert('没有选中图片');
	} 
}
</script>