<script type="text/javascript" src="{$_config[siteurl]}include/javascript/favorite.js"></script>
<div id="body">
<div class="link_path"><a href="{$_config[siteurl]}">首页</a>&nbsp;&raquo;&nbsp;<a href="{$_modules[shop][url]}search.php">搜索</a></div>
{template shop_search_part_google}
<div class="mainrail rail-border-1">
<h1 class="rail-h-1 rail-h-bg-1">本地搜索</h1>
	<!--{if $searchsubmit}-->
    <table class="maintable" border="0" cellspacing="0" cellpadding="0">
		<tr class="tblth">
			<th width="25%">名称</th>
			<th width="25%">所属板块</th>
			<th width="15%" class="num">点评量</th>
			<th width="15%" class="num">浏览量</th>
			<th width="10%">点评</th>
			<th width="10%">收藏</th>
		</tr>
		<!--{loop $shops $shop}-->
		<tr>
			<td><a href="{$_modules[shop][url]}shop.php?shopid=$shop[sid]" target="_blank">$shop[shopname]</a></td>
			<td><a href="{$_modules[shop][url]}cate.php?cd=$shop[panelcode]">$shop[panelname]</a> &gt; <a href="{$_modules['shop']['url']}cate.php?cd=$shop[classcode]">$shop[classname]</a></td>
			<td class="num">$shop[reviews]</td>
			<td class="num">$shop[pageviews]</td>
			<td><a href="{$_modules[shop][url]}post.php?action=newreview&shopid=$shop[sid]">点评</a></td>
			<td><a href="javascript:addfavorite($shop[sid]);">收藏</a></td>
		</tr>
		<!--{/loop}-->
    </table>
	<!--{else}-->
	<form method="post" action="{$_modules['shop']['url']}search.php?" id="form_search">
	<table class="maintable" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="160">关键字</td>
			<td><input type="text" name="keyword" size="50" class="t_input" /><br />
                关键字中可使用通配符 "<span class="font_2">*</span>"<br />
                匹配多个关键字全部，可用空格或 "AND" 连接。如 modoer <span class="font_2">AND</span> php<br />
                匹配多个关键字其中部分，可用 "|" 或 "OR" 连接。如 modoer <span class="font_2">OR</span> modoer<br />
            </td>
		</tr>
		<tr>
			<td>搜索类型</td>
			<td><input type="radio" name="searchsort" value="shop" checked="checked" onclick="select_searchsort(this);" /> 商铺&nbsp;&nbsp;<input type="radio" name="searchsort" value="tag" onclick="select_searchsort(this);" /> Tag 标签</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><button type="submit" name="searchsubmit" value="true">&nbsp;搜&nbsp;索&nbsp;</button></td>
		</tr>
	</table>
	<table class="maintable" border="0" cellspacing="0" cellpadding="0" id="option">
		<tr>
			<td colspan="2" style="background:#f5f5f5;"><span class="font_3">搜索选项</span></td>
		</tr>
		<tr>
			<td width="160">搜索方式</td>
			<td><input type="radio" name="searchtype" value="name" checked="checked" /> 商铺名&nbsp;&nbsp;<input type="radio" name="searchtype" value="tel" /> 电话号码&nbsp;&nbsp;<input type="radio" name="searchtype" value="address" /> 联系地址</td>
		</tr>
		<tr>
			<td>搜索范围</td>
			<td><select name="panel">
				<option value="all">全部板块</option>
				<!--{loop $_panels $key $val}-->
				<option value="$key">$val</option>
				<!--{/loop}-->
			</select></td>
		</tr>
		<tr>
			<td>搜索地区</td>
			<td><select name="area">
				<option value="all">全部地区</option>
				$_areacode_option[$city]
			</select></td>
		</tr>
		<tr>
			<td>排序类型</td>
			<td><select name="ordersort">
				<option value="addtime">登记时间</option>
				<option value="review">点评量</option>
				<option value="browse">浏览量</option>
				<option value="grade">会员评分</option>
			</select>&nbsp;&nbsp;<input type="radio" name="ordertype" value="asc" checked="checked" /> 升序&nbsp;&nbsp;<input type="radio" name="ordertype" value="desc" /> 降序</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><button type="submit" name="searchsubmit" value="true">&nbsp;搜&nbsp;索&nbsp;</button></td>
		</tr>
	</table>
	</form>
	<script type="text/javascript">
	function select_searchsort (obj) {
		document.getElementById('option').style.display = obj.value == 'shop' ? "block" : "none";
	}	
	</script>
	<!--{/if}-->
</div>
<div class="multipage">$multipage</div>
</div>
