<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$keywords_array[k_title]</title>
<meta name="keywords" content="$keywords_array[k_keywords]" />
<meta name="description" content="$keywords_array[k_description]" />
<link href="{$BASE_V}style.css" rel="stylesheet" type="text/css" />
<script language="javascript">var webpath="{$BASE}";</script>
<script type="text/javascript" src="{$BASE}js/calendar/jquery.min.js"></script>
<link href="{$Order_api}room.utf8.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{$Order_api}room.utf8.js"></script>
</head>
<body>
<!--{template inc/header}-->
<div id="maincontent">
    <div class="index_content">
        <div class="leibiao_list">
            <DIV id=soso_17u>
                <H3>酒店搜索</H3>
                <DIV class=search_right>
                    <DIV class="search_content search_ba">
                        <!--{template inc/hotel_search}-->
                    </DIV>
                </DIV>
            </DIV>
            <!--{template inc/hotel_welcome}-->
            <!--{template inc/lable}-->
            <!--{template inc/hotel_train}-->
            <!--{template inc/hotel_school}-->
            <!--{template inc/hotel_news}-->
            <!--{template inc/help}-->
            <!--{template inc/why}-->
            <!--{template inc/hotel_history}-->
        </div>
        <div class="list_nrttj">
            <div class="hty_nav"> <span>您所在位置：</span> <a href="/">首页</a> &gt;&nbsp;<a href="{PHP_SELF}?m=allcity">全国酒店</a> &gt; <a href="{PHP_SELF}?m=city&cityid=$city[cityid]">$city[cityname]酒店</a> &gt;&nbsp;酒店宾馆预订 </div>
            <div class="hotelSeach_box" id="list_filter">
                <h3 class="shai_tit">筛选条件<span class="gongyou">共有<strong>$totalrecord</strong>家酒店符合要求</span></h3>
                <div class="hs_boxmini">
      				<!--{model:subway subway_line($sk_array['cityid']) return=subway_rs}-->
					{if count($subway_rs['rs']) > 1}
                    <dl class="more_dl">
                        <dt> $sk_array[cityname]地铁： </dt>
                        <dd class="dd02" id="subway" {if $subwayid > 5} style="height:auto;" {/if}><a href="#"><em class="more">更多</em></a><span {if $subwayid == 0}class="sx_curr"{/if}><a t="ls" href="{$url_cbd_id}">不限</a></span>
                            <ul>
                                <!--{loop $subway_rs['rs'] $k $v}-->
                                <li><span id="line$k" total="${echo count($subway_rs['rs'])}" title="$v['line_title']" {if $subwayid == $v['line_id']} class="sx_curr" {/if}><a href="javascript:loadstation($k,$sk_array['cityid'],$v['line_id'])">$v['line_title']</a></span></li>
                                <!--{/loop}-->
                            </ul>
                        </dd>						
                    </dl>
  
					<div {if $subwayid != 0} class="subwaySite subwaySite2" {/if} id="search_metroAll_line" style="padding-left: 90px;padding-top:0px;">
						<div class="sbmain" id="subway_station" {if $subwayid == 0} style="display:none; "{/if}>
						   <!--{model:subway getsubway($sk_array['cityid'],$subwayid) return=subwayname}-->  
							<p class="p01" id="currentsubway">$sk_array[cityname] {$subwayname}</p>
							<span id="station">
                            {if $subwayid != 0}
                            <!--{model:subway getsubwaystation($sk_array['cityid'],$subwayid) return=subway_rs}-->  							
							      <!--{loop $subway_rs['rs'] $k $v}-->
							      <a  href="{PHP_SELF}?m=hotellist&key=$v['stationname']&subwayid=$subwayid&stationid=$v['stationid']" {if $stationid == $v['stationid']} class="sx_currccc" {/if}>$v['stationname']</a>
							     <!--{/loop}-->
							     {/if}   
							</span>
						</div>
					</div>

					{/if}											
                    <dl class="more_dl">
                        <dt> 酒店价格： </dt>
                        <dd class="dd02"><span {if empty($maxprice)}class="sx_curr"{/if}><a t="ls" href="{$url_price}">不限</a></span>
                            <ul>
                                <!--{loop $price_ary $k $v}-->
                                ${$price_array = explode('-', $k);}
                                <li><span {if $minprice==$price_array[0] && $maxprice==$price_array[1]} class="sx_curr"{/if}><a href="{$url_price}&minprice=$price_array[0]&maxprice=$price_array[1]">$v</a></span></li>
                                <!--{/loop}-->
                            </ul>
                        </dd>
                        </dd>
                    </dl>
                    <!--{if empty($key)}-->
                    <dl class="more_dl">
                        <dt> 著名商圈： </dt>
                        <dd class="dd02" {if $cbd_id!=0} style="height:auto;"{/if}><a href="#"><em class="more">更多</em></a><span {if empty($cbd_id)}class="sx_curr"{/if}><a t="ls" href="{$url_cbd_id}">不限</a></span>
                            <ul>
                                <!--{model:hotellist getSearchCbd($city[cityid], $cbd_id, 38) return=cbd_rs}-->
                                <!--{loop $cbd_rs $v}-->
                                <li><span {if $cbd_id == $v[cbd_id]} class="sx_curr"{/if}><a href="{$url_cbd_id}&cbd_id=$v[cbd_id]" title="$v[cbd_name]">$v[cbd_name]</a></span></li>
                                <!--{/loop}-->
                            </ul>
                        </dd>
                        </dd>
                    </dl>
                    <!--{/if}-->
                    <!--{if $chain_id<1}-->
                    <dl class="more_dl">
                        <dt> 酒店星级： </dt>
                        <dd class="dd02"><span {if empty($rank)}class="sx_curr"{/if}><a t="ls" href="{$url_rank}">不限</a></span>
                            <ul>
                                <!--{loop $rank_ary $k $v}-->
                                <li><span {if $rank == $k} class="sx_curr"{/if}><a href="{$url_rank}&rank=$k">$v</a></span></li>
                                <!--{/loop}-->
                            </ul>
                        </dd>
                        </dd>
                    </dl>
                    <!--{/if}-->
                    <dl class="more_dl">
                        <dt> 酒店品牌： </dt>
                        <dd class="dd02"><a href="#"><em class="more">更多</em></a><span  {if empty($chain_id)}class="sx_curr"{/if}><a class="sx_curr filter_all" t="ls" href="{$url_chain_id}">不限</a></span>
                            <ul>
                                <!--{model:hotellist getSearchLiansuo($city[cityid], $chain_id, 20) return=chain_array}-->
                                <!--{loop $chain_array $v}-->
                                <li><span {if $v[chain_id] == $chain_id} class="sx_curr"{/if}><a href="{$url_chain_id}&chain_id=$v[chain_id]" title="$v[chain_name]">$v[chain_name]</a></span></li>
                                <!--{/loop}-->
                            </ul>
                        </dd>
                        </dd>
                    </dl>
                </div>
            </div>
            <div class="hview_head">
                <h3><span class="view_chakan">查看方式</span>
                    <div class="vck_al">
                        <ul class="view_memu">
                            <li class="vm01"><span class="at" id="looktype1">酒店列表</span></li>
                            <li class="vm02"><span class="not" id="looktype2">电子地图</span></li>
                        </ul>
                        <span class="view_sort"><span class="sort">排序方式：</span>
                        <select id="sel_orderby" class="slt01">
                            <option {if $px == 1} selected="selected" {/if} value="1">默认排序</option>
                            <option {if $px == 2} selected="selected" {/if}value="2">价格排序</option>
                            <option {if $px == 3} selected="selected" {/if}value="3">星级排序</option>
                            <option {if $px == 4} selected="selected" {/if}value="4">人气排序</option>
							{if !empty($key)}
                            <option value="5" {if $px == 5} selected="selected" {/if}>距离排序</option>
							{/if}
                        </select>
                        </span></div>
                </h3>
            </div>
            <div class="MapNewCss" id="divmap" style="margin-bottom:10px;display:none;">
                <iframe width="760px;" height="340px;" frameborder="no" scrolling="no" name="ifrMapURL" id="ifrMapURL"></iframe>
            </div>
            <!--list begin-->
            <!--{loop $hotel_slist $k $v}-->
            <div class="liebiao_hot">
                <div class=box_tit>
                    <h3><a href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]" target="_blank">$v[hotelname]</a> <img src="{$BASE_V}images/star/star{if $v[star]>9}9{else}$v[star]{/if}.gif" height="16" align="absmiddle"/> </h3>
                </div>
                <div class=listcon01>
                    <div class=fleft2>
                        <P><A title="$v[hotelname]" href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]"><img src="{$picurl}{$v[picture]}" width="112" height="84" /></A> <SPAN class=down><A href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]" target=_blank>更多图片</A></SPAN></P>
                    </DIV>
                    <DIV class=listcon02>
                        <UL class=hnews>
                            {if !empty($key)}
                            <li style='color:red;'>当前酒店距离<strong>"$key"</strong>$v[juli]公里</li>
                            {/if}
                            {if $v[cbd_name] != ''}
                            <LI>商业区：<a href="{PHP_SELF}?m=hotellist&cityid=$v[cityid]&cbd_id=$v[cbd_id]">$v[cbd_name]</a> </LI>
                            {/if}
                            <LI>酒店简介：{if $v[content] == ''}暂无简介{else}${echo  Functions::cut_str(str_replace('　　','',strip_tags($v[content])),75);}{/if}</LI>
                            {if !empty($v[address])}
                            <LI>地址：$v[address]</LI>
                            {/if}
                            <li>地标：             
                                {if $v[nearbypoints] != ''}
                                ${$dibiao = explode(',', $v[nearbypoints]); shuffle($dibiao);}
                                {loop $dibiao $kk $vv}
                                ${$dibiao_ary = explode(':', $vv)} <a href="{PHP_SELF}?m=hotellist&cityid=$v[cityid]&key=${echo urlencode($dibiao_ary[0])}">$dibiao_ary[0]</a> {if $kk==4}<a href="{PHP_SELF}?m=lable" target="_blank">更多</a>${break;}{/if}
                                {/loop}
                                {/if} </li>
                        </UL>
                        <DIV id=h6448 style="TEXT-ALIGN: center"></DIV>
                    </DIV>
                </DIV>
                <DIV class=keylist>
                    <DIV class="fang_news" id="h$v[hotel_id]" align="center"> <img src="{$BASE_V}images/loadprice.gif"/> </DIV>
                </DIV>
            </div>
            <!--{/loop}-->
            <!--list end-->
            <DIV id=pages>
                <div class="page02">{$page} </div>
            </div>
        </DIV>
    </div><!--{template inc/footer}-->
</div>

</div>
<form action="{PHP_SELF}" method="get" target="_blank" name="doBook" id="doBook" >
    <input name="m" type="hidden" value="ebook"/>
    <input name="hid" type="hidden"/>
    <input name="rid" type="hidden" />
    <input name="pid" type="hidden" />
    <input name="tm1" type="hidden" value="$tm1" />
    <input name="tm2" type="hidden" value="$tm2" />
</form>
</body>
</html>
<script  language="javascript" >loadPrice('$hid','$tm1','$tm2');</script>
<script type="text/javascript">
j.include("{$BASE}js/calendar/Date.js","{$BASE}js/calendar/calendar.js","{$BASE}js/calendar/citys.js","{$BASE}js/calendar/city_menu.js");
j.includecss("{$BASE}js/calendar/city_menu.css");


$(function(){
if(!$("#tm1").val())$("#tm1").val(ZNDate.format(ZNDate.plus(ZNDate.today(),0)));
if(!$("#tm2").val())$("#tm2").val(ZNDate.format(ZNDate.plus(ZNDate.today(),3)));
//alert(ZNDate.getDateTip(ZNDate.format(ZNDate.plus(ZNDate.today(),3))));
tooltip();

$.get("{PHP_SELF}?m=ajkeyword.saveSearchCondition&cbd_id={$cbd_id}&rank={$rank}&chain_id={$chain_id}&px={$px}&key=$sk_array[key]&hn=$sk_array[hn]&maxprice=$maxprice&minprice=$minprice");
$("#sel_orderby").change(
	function(){
		window.location.href = "{PHP_SELF}?m=hotellist&px="+$("#sel_orderby").val();
	});
});
$("#list_filter dl dd a em[class!='more'][class!='more1']").click(function(){$(this).loading({div:"#mainContent"})});
$("#list_filter dl dd a em").click(function(){
	var s=($(this).attr("class")=="more1")?"more":"more1";
	if(s=="more1"){
	$(this).parent().parent().attr("style","height:auto");}else{$(this).parent().parent().css("height","20px");}
	$(this).attr("class",s);
});
function tooltip(){
$(".liebiao_hot .listcon01 .fleft2 p img").each(function(){$(this).simpletooltip({html:'<img src="' + $(this).attr("src").replace(/160x120_/i,'500x375_') + '" width="318" height="238"/>',br:false});});
}
$("#looktype2").click(function(){
    if(($("#divmap").css('display')=="none")){
        $("#divmap").css({"display":""});
        $("#ifrMapURL").attr("src","{PHP_SELF}?m=hotel_map&hotels={$hid}&h=340&w=760&juli=&cityid=$city[cityid]");
        $("#looktype2").attr("class","at");
        $("#looktype1").attr("class","not");
    }else{
        $("#divmap").attr("style","display:none");
    }
});

$("#looktype1").click(function(){
        $("#looktype1").attr("class","at");
        $("#looktype2").attr("class","not");
        $("#divmap").attr("style","display:none");
});

function rollhotel(n){
	setColor(".list_con div.list_box.div"+n+"",5,"#CDEDF8",160);
	if($(".list_con div.list_box").length<2)return;
	$(".list_con div.list_box").each(function(){$(this).removeAttr("style")});
	var s=$(".list_con div.list_box.div"+n+"");
	s.remove();
	s.insertBefore(".list_con div.list_box:eq(0)");
	$('html').animate({scrollTop:$("#divmap").offset().top}, 'fast');
    $('body').animate({scrollTop:$("#divmap").offset().top}, 'fast');
	tooltip();
}

function loadstation(k,cityid,line)
{
 $.ajax({
    url : "{PHP_SELF}?m=ajkeyword.getsubway",
    type : 'POST',
    data: ({cityid:cityid,line:line}),
    dataType: "html",
    success : 
        function(data)
        {
			var total = $("#line"+k).attr("total");
			$("#subway span").attr("class","");
			$("#search_metroAll_line").attr("class","subwaySite subwaySite2");
			for(var i=0;i<=total;i++)
			{
				var obj = $("#line"+i+"");
				if(k == i)
					obj.attr("class","sx_curr");
				else
					obj.attr("class","");
			}
			$("#currentsubway").html('$sk_array[cityname]'+$("#line"+k).attr("title"));
            $("#station").html("");
            var dataObj=eval('('+ data +')'); 
        
            $.each( dataObj,function(idx, items){
				if( data.length < 5  || data == null){
					 $("#currentsubway").html("");
					 $("#station").html("加载失败请重试");
					 return;
				}			
                html = "<a href=\"{PHP_SELF}?m=hotellist&key="+items.stationname+"&subwayid="+line+"&stationid="+items.stationid+"\">"+items.stationname+"<\/a>";
                $("#station").append(html);
            });
       
            $("#subway_station").fadeIn("slow");
        }
    ,
    timeout:5000,
    error: 
        function () {
            alert("请求超时请重试!");
        }
    });	
}
</script>
