{include file="inc/header.html"} 
<?php
$this->_var['storejs'][] = $this->_var['TMPL_REAL']."/js/store.js";
$this->_var['cpstorejs'][] = $this->_var['TMPL_REAL']."/js/store.js";
$this->_var['reviewcss'][] = $this->_var['TMPL_REAL']."/css/review.css";
$this->_var['reviewcss'][] = $this->_var['TMPL_REAL']."/css/review_form.css";
?>
<script type="text/javascript" src="{function name="parse_script" v="$storejs" c="$cpstorejs"}"></script>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$reviewcss"}" />
<div class="blank"></div>
<div class="long f_l">
	
	<div class="store_detail_box">
			<div class="store_info_logo f_l">
				<img src="{$store_info.preview}" alt="{$store_info.name}" class="clearfix" />
				<div class="clearfix image_count">
					<a href="{if $store_info.image_count >0}{url x="youhui" r="store#photos" p="id=$store_info.id"}{else}javascript:;{/if}" class="blue">共({$store_info.image_count})张图片</a>
				</div>
			</div>
			<div class="store_info_info f_r">
				 <b class="store_title_row">
				 	{$store_info.name}
					{if $store_info.is_verify eq 1}&nbsp;&nbsp;<font class="verify_store" title="认证商家"></font>{/if}
					
				</b> 				
				 <div class="blank"></div>
			 	<div class="store_info_item clearfix">
			 		<span class="starsBarBig f_l">
			 			<span class="s s<?php echo intval($this->_var['store_info']['avg_point']); ?>"></span>
			 		</span>
					<span class="sc_ori f_l"><?php echo round($this->_var['store_info']['avg_point'],1); ?></span>
			 		<div class="f_l">
			 		&nbsp;&nbsp;
					人均：<span class="ori_font"><?php echo round($this->_var['store_info']['ref_avg_price'],2); ?>元 </span>
					&nbsp;&nbsp;&nbsp;&nbsp;<a href="#store_dp" class="blue">{$store_info.dp_count}封点评</a>
					&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="join_store('{url x="biz" r="join#step2" p="location_id=$store_info.id"}');" class="blue">认领该店</a>
					</div>
				</div>
				<div class="blank"></div>
				{if $store_info.contact}
			 	联系人：<span class="tel_blue">{$store_info.contact}</span>
				<br />
				{/if}
				{if $store_info.tel}
			 	电话：<span class="tel_blue">{$store_info.tel}</span>
				<br />
				{/if}
				{if $store_info.address}
			 	地址：{$store_info.address}
				<br />
				{/if}
				<div class="blank"></div>
				<div class="clearfix">
					<div class="f_l" style="padding-top:8px;">
						<a href="javascript:;" onclick="store_send_form({$store_info.id});" id="store_send_sms" class="f_l store_sms blue" title="{function name="app_conf" value="SHOP_TITLE"}把地址、电话用短信免费发到你的手机，再也不怕找不到店哦，保证安全，请放心使用">免费发送到手机</a>
					</div>
					<div class="f_l" style="padding-top:8px; padding-right:20px;">
						<a href="javascript:void(0);" onclick="sign_location({$store_info.id});" class="blue store_sms" style="background:none;">签到</a>
					</div>
					<div class="f_l" style="padding-top:8px;">
						<!-- JiaThis Button BEGIN -->
						<div id="ckepop">
							<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt" target="_blank"><img src="http://v2.jiathis.com/code_mini/images/btn/v1/jiathis5.gif" border="0" /></a>
						</div>
						<script type="text/javascript" src="http://v2.jiathis.com/code_mini/jia.js" charset="utf-8"></script>
						<!-- JiaThis Button END -->		
					</div>
					
					<div class="f_r"><a href="#review_form"><img src="{$TMPL}/images/review/review.jpg"/></a></div>
				</div>
			</div>
			<div class="blank1"></div>
			
	</div>
	<div class="blank"></div>
	<style>
		#ckepop div{margin:0 0 0 0};
	</style>
	<div class="goods_detail_box" style="margin:0px;">
			<ul class="detail_nav">
				<li class="act">商户详情</li>
			</ul>
			<div class="blank"></div>
			<ul>
				<li class="act" id="store_info">
					{if $store_info.open_time}
					<div class="tag_info_item">
				 	营业时间：{$store_info.open_time}
					</div>
					{/if}
					{if $store_info.route}
					<div class="tag_info_item">
				 	交通线路：{$store_info.route}
					</div>
					{/if}
					{if $store_info.tags}
					<div class="tag_info_item">
					店铺标签：{foreach from="$store_info.tags_list" item="tag"}<a href="{url x="youhui" r="store" p="tag=$tag.code"}"><span class="tel_blue">{$tag.name}</span></a>&nbsp;{/foreach}
					</div>
					{/if}
					{foreach from="$store_info.tag_group" item=tag_group}
						{if $tag_group.tags}
							{if $tag_group.allow_vote}
								<div class="tag_info_item">
								{$tag_group.name}：
								{foreach from="$tag_group.tags" item=tag_item}
								<span class="tag_vote" onclick="vote_tag('{$tag_item.name}',{$tag_group.id},{$store_info.id},this);">{$tag_item.name}{if $tag_item.total_count gt 0}({$tag_item.total_count}){/if}</span>&nbsp;&nbsp;
								{/foreach}
								</div>
							{else}
								<div class="tag_info_item">
								{$tag_group.name}：
								{foreach from="$tag_group.tags" item=tag_item}
								<a href="{$tag_item.url}" target="_blank"><span class="tel_blue">{$tag_item.name}{if $tag_item.total_count gt 0}({$tag_item.total_count}){/if}</span></a>&nbsp;&nbsp;
								{/foreach}
								</div>
							{/if}
						{/if}
					{/foreach}
					{if $store_info.brief}
					<h3 class="pd10">店铺介绍</h2>
					<div class="tag_info_item">{$store_info.brief}</div>
					{/if}
				</li>
		
			</ul>
			<div class="blank"></div>
			<ul class="detail_nav ext_nav">
				{insert name="load_store_navs"}
			</ul>
			<div class="blank"></div>
			<ul class="detail_cnt">
				<li id="extra_info"></li>
			</ul>
		</div>
		
	<div class="blank"></div>
	<div class="blank"></div>
	<div id="store_dp" name="store_dp">
		<script type="text/javascript">
			load_store_dp({$store_info.id},1,"","");
		</script>
	</div>
	<div class="blank"></div>
	<div id="review_form">
		{insert name="get_reivew_form" id="$store_info.id" deal_cate_id="$store_info.deal_cate_id"}
	</div>
</div>
<div class="short f_r">
	<style type="text/css">
		#container{height:193px; width: 193px; border:#ccc solid 1px; }  
	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script> 
	<script type="text/javascript">
		function draw_map(xpoint,ypoint)
		{
			var map = new BMap.Map("container"); 
	        var opts = {type: BMAP_NAVIGATION_CONTROL_ZOOM }  
	        map.addControl(new BMap.NavigationControl());  
	        // map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);  
	        // 创建地理编码服务实例  
	        var point = new BMap.Point(xpoint,ypoint);
	        
	        // 将结果显示在地图上，并调整地图视野  
	        map.centerAndZoom(point, 16);  
	        map.addOverlay(new BMap.Marker(point));
		}
		
		$(document).ready(function(){
			draw_map('{$store_info.xpoint}','{$store_info.ypoint}');
			
		});
	</script>
	<div id="container"></div>	
	{insert name="load_recent_sign" id="$store_info.id"}
	{if $new_stores}
	<div class="blank"></div>
	<div class="inc">
		<div class="inc_top">最新加入</div>
		<div class="inc_main clearfix">
		
			{foreach from=$new_stores item=store key=key}
				<div class="new_store_row">
					<span><?php echo intval($this->_var['key']+1);?></span>
					<a href="{url x="youhui" r="store#view" p="id=$store.id"}" title="{$store.name}">{function name="msubstr" v=$store.name b=0 e=10}</a>
					<div class="blank1"></div>
					<div class="store_addr">{$store.address}</div>
				</div>
			
			{/foreach}
			
		</div>
	</div>
	{/if}

	{if $rec_stores}
	<div class="blank"></div>
	<div class="inc">
		<div class="inc_top">推荐商户</div>
		<div class="inc_main clearfix">
		
			{foreach from=$rec_stores item=store key=key}
				<div class="new_store_row">
					<span><?php echo intval($this->_var['key']+1);?></span>
					<a href="{url x="youhui" r="store#view" p="id=$store.id"}" title="{$store.name}">{function name="msubstr" v=$store.name b=0 e=10}</a>
					<div class="blank5"></div>
					<div class="avg_point_{function name="intval" v=$store.avg_point} f_l"></div>
					<div class="f_r store_addr">{$store.dp_count}条点评</div>
					<div class="blank1"></div>
				</div>
			
			{/foreach}
			
		</div>
	</div>
	{/if}
	
	
</div>
<div class="blank"></div>

{include file="inc/footer.html"}