<{import file="index/header.html"}>
<div class="nav"><span>卖家列表</span></div>
<div class="filter">
	<a href="<{$__ADMIN__}>shop/edit" class="add">添加店铺</a> 
	<a href="<{$__ADMIN__}>shop" class="<{if $smarty.get.type == ''}>option_ch<{else}>option<{/if}>">全部</a>
	<a href="<{$__ADMIN__}>shop?type=1" class="<{if $smarty.get.type == '1'}>option_ch<{else}>option<{/if}>">个人</a>
	<a href="<{$__ADMIN__}>shop?type=2" class="<{if $smarty.get.type == '2'}>option_ch<{else}>option<{/if}>">企业</a> 
</div> 
<style type="text/css">
img.avatar_img{ border-radius:30px; } 
.caozuo{ float:left; }
.caozuo a{ float:left; }
.caozuo span{ padding:0; float:left;}
.caozuo span p{ display:none; }
.caozuo span.more{ width:60px; position:relative; float: left; }
.caozuo span.more p.zd{ padding:3px 2px;}
.caozuo span.more:hover p{ display:block; position: relative; top:0; position:absolute; margin:-5px 0 0 0; border:1px solid #efefef; border-radius:5px; background:#fff; z-index:10;box-shadow:0 0 10px rgba(0, 204, 204, .5); float:left; }
.caozuo span.more:hover p a{ border:none; margin:3px 0; float:left;  } 
</style> 
<div class="main">
	<table class="ltable">
	  	<thead>
		  	<tr>
				<th width="130">店铺操作</th>
				<th width="120">账号</th> 
				<th>店铺名</td>
				<th width="100">余额</th> 
				<th width="50" class="center">热门</th>
				<th width="80" class="center">推荐</th>
				<th width="60">状态</th> 
				<th width="120">创店时间</th>	
		  	</tr>
	  	</thead>  
		<tbody>
		<{if $data.list}>
			<{foreach item=i from=$data.list}>
				<tr> 
					<td>
						<div class="caozuo"> 
							<a href="<{$__ADMIN__}>member/enter?spid=<{$i.id}>" target="_blank" class="view">登录</a> 
							<span class="more">
								<a href="javascript:;" class="edit">更多</a>
								<p class="zd">
									<a href="<{$__ADMIN__}>shop/edit?id=<{$i.id}>" class="edit">操作</a> 
									<a href="<{$__ADMIN__}>shop/score?id=<{$i.id}>" class="score">评分</a>
									<a href="javascript:;" data-id="<{$i.id}>" class="del2">删除</a> 
								</p>
							</span>
						</div>
					</td> 
					<td><{$i.account}></td> 
					<td><a href="<{$__URI__}>shop/<{$i.id}>" target="_blank"><{$i.name}></a></td> 
					<td><{$i.price}></td>  
					<td class="center"><a href="javascript:status('<{$i.id}>','px_hot')" id="px_hot_<{$i.id}>"><img src="<{$__APP__}>public/images/status_<{$i.px_hot}>.png"></a></td>
					<td class="center"><a href="javascript:status('<{$i.id}>','px_recommend')" id="px_recommend_<{$i.id}>"><img src="<{$__APP__}>public/images/status_<{$i.px_recommend}>.png"></a></td> 
					<td> 
						<{if $i.status == '1'}>
							正常
						<{elseif $i.status == '2'}>
							提交
						<{else}>
							<span style="color:#f00; font-weight:bold;">关闭</span>
						<{/if}> 
					</td> 
					<td><{$i.addtime}></td>
				</tr>
			<{/foreach}>
		<{else}>
			<tr><td colspan="8">还没有数据，赶快添加吧！</td></tr>
		<{/if}> 
		</tbody>  
	</table> 
	<{if $data.page}>
		<div class="page"><{$data.page}></div>
	<{/if}>
</div>
<{import file="index/footer.html"}> 
<script type="text/javascript"> 
_delete('<{$__ADMIN__}>shop/del');
function status(id,type){ 
	$.post(ADMIN+"shop/px_status?v="+new Date().getTime(), {id:id, type:type}, function(result){
		data = jQuery.parseJSON(result); 
 		if(data.error == '0'){
			$("#"+type+"_"+id+" img").attr('src', '<{$__APP__}>public/images/status_'+data+'.png');
		}else{ 
			$.alert('更新失败'); 
		} 
	});	
} 
</script>
