<{include file="index/header.html"}>
<div class="nav"><span>店铺评分</span></div>
<div class="filter"> 
	<a href="?m=member&a=edit&shop=1" class="add">添加商户</a>
	<a href="?m=shop" class="<{if $smarty.get.type == ''}>option_ch<{else}>option<{/if}>">全部</a>
	<a href="?m=shop&type=1" class="<{if $smarty.get.type == '1'}>option_ch<{else}>option<{/if}>">个人</a>
	<a href="?m=shop&type=2" class="<{if $smarty.get.type == '2'}>option_ch<{else}>option<{/if}>">企业</a>
	<a href="?m=shop&type=3" class="<{if $smarty.get.type == '3'}>option_ch<{else}>option<{/if}>">自营</a> 
</div> 
<div class="main">
	<table width="100%" class="ltable">
	  	<thead>
		  	<tr> 
				<th width="80">类型</th> 
				<th width="200">店铺名</td> 
				<th width="100">联系电话</th> 
				<th width="60">账户</th>  
				<th width="60">状态</th> 
				<th width="60">认证状态</th>
				<th width="40" class="center">热门</th>
				<th width="40" class="center">推荐</th>
				<th width="255">店铺操作</th>
				<th width="120">创建时间</th>
				<th></th>
		  	</tr>
	  	</thead>  
		<tbody>
		<{if $data.list}>
			<{foreach item=i from=$data.list}>
				<tr>
					<td>
						<{if $i.type == '1'}>
							个人
						<{elseif $i.type == '2'}>
							企业
						<{elseif $i.type == '3'}>
							<span style="color:#FF0000; font-weight:bold;">自营</span>
						<{/if}>
					</td> 
					<td><a href="?m=shop&a=enter&id=<{$i.id}>" target="_blank"><{$i.name}></a></td>
					<td><{$i.mobile}></td> 
					<td><{$i.price}></td>  
					<td><{if $i.status}>正常<{else}><span style="color:#FF0000; font-weight:bold;">关闭</span><{/if}></td> 
					<td>
						<a href="?m=shop&a=auth&id=<{$i.id}>">
						<{if $i.status == '1'}>
							已认证
						<{elseif $i.status == '2'}>
							已提交
						<{else}>
							<span style="color:#FF0000; font-weight:bold;">待审核</span>
						<{/if}>
						</a>
					</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>
						<a href="?m=shop&a=edit&id=<{$i.id}>" class="edit">操作</a>
						<a href="?m=shop&a=score&id=<{$i.id}>" class="edit">评分</a>
						<a href="?m=shop&a=enter_shop&id=<{$i.id}>" target="_blank" class="view">进入</a> 
						<a href="?m=shop&a=del&id=<{$i.id}>" class="del">删除</a> 
					</td>
					<td><{$i.addtime}></td>
					<td></td>
				</tr>
			<{/foreach}>
		<{else}>
			<tr><td colspan="9">还没有数据，赶快添加吧！</td></tr>
		<{/if}> 
		</tbody>  
	</table> 
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript"> 
function status(id,type){ 
	$.post("?m=shop&a=px_status&jq_time="+new Date().getTime(), {id:id, type:type}, function(data){
 		if(data == '0' || data == '1'){
			$("#"+type+"_"+id+" img").attr('src','<{$__APP__}>public/images/status_'+data+'.png');
		}else{ alert('更新失败'); } 
	});	
} 
</script>
