<!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>
    <script type="text/javascript" src="{$BASE_V}js/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="{$BASE_V}js/jquery.KinSlideshow-1.2.1.min.js"></script>
</head>

<body>
<!--{template inc/header}-->
<div id="maincontent">
<div class="index_content">
    <div class="index_list">
        <DIV id=soso_17u>
        <H3>酒店搜索</H3>
        <DIV class=search_right>
            <DIV class=search_content>
            <form id="form_hotel" name="form_hotel" method="post" action="{PHP_SELF}?m=hotellist" onSubmit="return checkindex();">
            <TABLE id=tab_top_hotel cellSpacing=0 cellPadding=0>
              <TBODY>
              <TR>
                <TD width=54 height=30><label for="txtCity">入住城市</label> </TD>
                <TD><input name="cityid" id="cityid" type="hidden" value="$uncityinfo[0]" />
                                <input name="txtCity" id="txtCity" onClick="suggestH.display(this,'',event);" autocomplete="off"  class="input02" type="text" value="$uncityinfo[1]" readonly="readonly" value="中文/拼音">
                  <DIV class=errMasBorder id=hotelCityErr style="DISPLAY: none"><SPAN 
                  class=lefSpan></SPAN><SPAN class=rgtSpan>请输入城市名称</SPAN> </DIV></TD></TR>
              <TR>
                <TD width=54 height=30><label for="tm1">入住日期</label> </TD>
                <TD><input type="text" onClick="javascript:event.cancelBubble=true;showCalendar('tm1',false,'tm1','tm2','tm2',''+ZNDate.format(ZNDate.today())+'',''+ZNDate.format(ZNDate.plus(ZNDate.today(),60))+'','','','','SWeek','')" class="input02" onBlur="javascript:this.value=this.value.replace(/[^\d\-]/g,'');" id="tm1" value="" name="tm1" /> 
                  <DIV id=input_date1></DIV></TD></TR>
              <TR>
                <TD width=54 height=30><label for="tm2">离店日期</label> </TD>
                <TD><input type="text" onClick="javascript:SelHotelCalMethod(event,'out','tm1','tm2',''+ZNDate.format(ZNDate.plus(ZNDate.today(),60))+'');" onBlur="javascript:this.value=this.value.replace(/[^\d\-]/g,'');" class="input02" id="tm2" value="" name="tm2"></TD>
              </TR>
              <TR>
                <TD width=54 height=30><label for="hn">酒店名称</label> </TD>
                <TD><input name="hn" type="text" class="input02" id="hn" onclick="value=''" value="酒店名"/> 
                  <DIV id=hotelInfo_list>
                  <DIV class=hotel_sou_xinxi id=hotelInfo 
                style="DISPLAY: none"></DIV></DIV></TD></TR>
              <TR>
              <TR>
                <TD width=54 height=30><label for="hs">附件地标</label> </TD>
                <TD><input name="key" type="text" class="input02" id="hs" onclick="value=''" value="地标/位置"/></TD></TR>
              <TR>
                <TD height=30>&nbsp; </TD>
                <TD><input class="btn01" id="hotelSubmit"  type="submit" value="搜索"></TR>
                </TBODY></TABLE>
                </form>
            </DIV>
        </DIV>
    </DIV>
    <DIV class="ht_blue_230 mtop">
        <DIV class=ht_blue_head>
        <H3>最新酒店订单</H3></DIV>
        <DIV class=ht_blue_main style="overflow:hidden;height:208px;">
            <DIV class="new_dd" id="divNewOrder">
              <!--{model:index getOderList(5) return=order}-->
              <!--{loop $order $v}-->            
                <DL class="downbord">
                    <DT>$v[tel]<SPAN class=gray_bs>$v[time]</SPAN>预订： </DT>
                    <DD><A title=$v[hotelname] href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotelid]">$v[hotelname]</A> 
                    <SPAN class=moy><SPAN class=nobd>￥</SPAN>$v[jiang]</SPAN> </DD>
                </DL>
              <!--{/loop}-->              
            </DIV>
        </DIV>
    </DIV>
    <!-- 热门品牌 start -->
    <DIV class="ht_blue_230 mtop">
        <DIV class=ht_blue_head>
            <H3><A href="{PHP_SELF}?m=liansuo">查看所有酒店品牌&gt;&gt;</A> 热门品牌</H3>
        </DIV>
        <div class="liansuo_pinpai">
            <!--{model:liansuo getchain(0, 9) return=start_chain_array}-->
            <!--{loop $start_chain_array $k $v}-->
            <a href="javascript:cityHotel('chain_e_$v[chain_id]',$v[chain_id])" title="$v[chain_name]" {if ($k+1)%3 == 0} style="border-right:none;" {/if}><img id="chain_e_$v[chain_id]" src="{$ZNpicurl}{$v[picture]}" alt="$v[chain_name]"/>$v[chain_name]</a>
            <!--{/loop}-->
        </div>
        <div id="chain_city" class="xianshi" style="top: 277px; left: 351px; display:none;">
            <h3>城市品牌连锁<img onclick="closeT();" style="cursor:pointer;" src="{$BASE_V}images/c_close.gif"></h3>
            <ul>
                <li></li>
            </ul>
        </div>  
    </DIV>
<div class="ht_blue_230 mtop">
    <div class="ht_blue_head">
      <h3>热门出行资讯</h3>
    </div>
    <div class="ht_blue_main">
      <div class="zixun">
                <div class="zixun_nr" style="_padding-top:2px;">
                    <!--{model:hotelLeft getNewsView(0,'',1,3) return=article_side_rs}-->
                    <!--{loop $article_side_rs $k $v}-->
                    <dl>
                        <dt><a href="{PHP_SELF}?m=newsinfo&aid=$v[aid]" target="_blank" title="$v[title]" broder="0"><img src="$v[img]" width="92" height="70" /></a></dt>
                        <dd>
                            <ul>
                                <li><a href="{PHP_SELF}?m=newsinfo&aid=$v[aid]" target="_blank" title="$v[title]">${echo Functions::cut_str($v[title], 6);}</a></li>
                                <li>${echo  Functions::cut_str(str_replace('　　','',strip_tags($v[content])),20);}</li>
                            </ul>
                        </dd>
                    </dl>
                    <!--{/loop}-->
            </div>
                <div class="zixun_list">
                    <ul>
                        <!--{model:hotelLeft getNewsView(0,'',4,3) return=article_side_rs}-->
                        <!--{loop $article_side_rs $k $v}-->
                        <li><a href="{PHP_SELF}?m=newsinfo&aid=$v[aid]" target="_blank" title="$v[title]">${echo Functions::cut_str($v[title], 16);}</a></li>
                        <!--{/loop}-->
                  </ul>
                </div>
          </div>
    </div>
  </div>	
  </div>
<div class="index_cnttj">
        <DIV class="slide_img" id="comImgList">
{show:common ShowAD('index_focus_1')} {show:common ShowAD('index_focus_2')}{show:common ShowAD('index_focus_3')}  
        </DIV>
        <DIV class="slCiands mtop">
            <DIV class=sl_menu>
              <H3>热门城市</H3>
              <UL class="sl_tab" total="${echo count($uncityinfo_array)}">
              <!--{loop $uncityinfo_array $k $v}-->
              <LI <!--{if $k==0}--> class="at" <!--{else}--> class="not" <!--{/if}--> id="hotcity$k"><SPAN><A href="javascript:loadcs($k,$v[cityid])">$v[cityname]</A></SPAN> </LI>
              <!--{/loop}-->
              </UL>
              <A class=oteCity href="{PHP_SELF}?m=city" target=_blank>所有城市&gt;&gt;</A> 
              </DIV>
            <div class="spe_cont"><DIV class=special_list>
            <DIV class=special_top>
            <H3>经济型酒店</H3><A class="moe_city" href="{PHP_SELF}?m=hotellist&rank=2&cityid=$uncityinfo[0]" id="ecomomy_hotel_more">更多&gt;&gt;</A></DIV>
            <UL class="con_list_info" id="enconomylist">
              <!--{model:index getIndexHotelArray($uncityinfo[0], 'liansuo') return=liansuo_array}-->
              <!--{loop $liansuo_array $v}-->
              <LI>
                  <DIV class=lef>
                    <a href='{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]' title='$v[hotelname]&#10;最低价格：$v[min_price]元起订 &#10;商圈：$v[cbd_name]' target="_blank">$v[hotelname]</a>
                  </DIV>
                  <DIV class=rgt><SPAN class=span01>￥<LABEL class=lbel01>$v[min_price]</LABEL></SPAN></DIV>
              </LI>
              <!--{/loop}-->
             </UL>
             </DIV>
  <div class="special_list">
    <div class="special_top" id="hoteltabs">
      <h3>星级酒店</h3>
      <a class="moe_city" href="{PHP_SELF}?m=hotellist&rank=5&px=1" id="star_hotel_more" cityid="$uncityinfo[0]">更多&gt;&gt;</a>
      <ul class="title_type">
        <li id="tabs001" class="li01"><a href="#starTab1" class="selected">五星</a> </li>
        <li id="tabs002" class="li01"><a href="#starTab2" class="li01">四星 </a></li>
        <li id="tabs003" class="li01"><a href="#starTab3" class="li01">三星</a></li>
      </ul>
    <div id="starTab1">
        <ul class="con_list_info" >
          <!--{model:hotellist getHotelByRank(5,$uncityinfo[0]) return=lable_ary_index}-->          
          <!--{loop $lable_ary_index $v}-->
          <li>
            <div class="lef"><a title="$v[hotelname]" href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]" target="_blank">$v[hotelname]</a> </div>
            <div class="rgt">
              <span class="span01">￥<label class="lbel01">$v[min_price]</label></span>
            </div>
          </li>
          <!--{/loop}-->
        </ul>
    </div>
    <div id="starTab2">
        <ul class="con_list_info">
          <!--{model:hotellist getHotelByRank(4,$uncityinfo[0]) return=lable_ary_index}-->          
          <!--{loop $lable_ary_index $v}-->
          <li>
            <div class="lef"><a title="$v[hotelname]" href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]" target="_blank">$v[hotelname]</a> </div>
            <div class="rgt">
              <span class="span01">￥<label class="lbel01">$v[min_price]</label></span>
            </div>
          </li>
          <!--{/loop}-->
        </ul>
    </div>
    <div id="starTab3">
        <ul class="con_list_info">
          <!--{model:hotellist getHotelByRank(3,$uncityinfo[0]) return=lable_ary_index}-->          
          <!--{loop $lable_ary_index $v}--> 
          <li>
            <div class="lef"><a title="$v[hotelname]" href="{PHP_SELF}?m=hotelinfo&hotel_id=$v[hotel_id]" target="_blank">$v[hotelname]</a> </div>
            <div class="rgt">
              <span class="span01">&yen;
                <label class="lbel01">$v[min_price]</label>
              </span>
            </div>
          </li>
          <!--{/loop}-->
        </ul>
    </div>  
    </div>

  </div>
  <div class="special_list">
    <div class="special_top222">
      <h3>热门地区</h3>
    </div>
    <div class="redi">
        <div class="area_list">
            <dl>
              <dd>
           <!--{model:hotelLeft point_info_list($uncityinfo[0], 42) return=lable_ary_index}-->          
           <!--{loop $lable_ary_index $v}-->              
              <ul>
				<li><a title="$v[key]" href="{PHP_SELF}?m=hotellist&cityid=$v[cityid]&key=$v[key_urlencode]">$v[key]</a></li>
		   </ul>           
           <!--{/loop}-->               
              </dd>
            </dl>
          </div>
    </div>
  </div>
</div>
</div>
    <div class="ind_shang">
        <div class="special_head">
            <h3>热门商圈</h3>
        </div>
        <div class="remengdb">
          <!--{model:hotelLeft cbdList($cityinfo[cityid], 42) return=cbd_rs}-->
          <!--{loop $cbd_rs $v}-->
          <a href='{PHP_SELF}?m=hotellist&cityid=$v[cityid]&cbd_id=$v[cbd_id]'>$v[cbd_name]</a>
          <!--{/loop}-->
        </div>
    </div>  
  </div>
</div>
<div class="hezuowang2">
        <!--{model:index getFlink('text',46) return=flink_text_array}-->                      
        <!--{loop $flink_text_array $v}-->
        <a href="$v[flink_link]" target="_blank">$v[flink_title]</a>      
        <!--{/loop}-->
</div>
<!--{template inc/footer}-->
</div>
</body>
</html>
<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","{$BASE}js/zhuna-js/mapbar31.2.js");
j.includecss("{$BASE}js/calendar/city_menu.css","{$BASE}js/zhuna-js/nyroModal.css");
$(function(){
$("#hoteltabs ul").idTabs(
    function(id){
        var cityid = $("#star_hotel_more").attr("cityid");
        switch (id){
            case '#starTab1' :
            $("#star_hotel_more").attr("href","{PHP_SELF}?m=hotellist&cityid="+cityid+"&rank=5&px=1");
            break;
            case '#starTab2' :
            $("#star_hotel_more").attr("href","{PHP_SELF}?m=hotellist&cityid="+cityid+"&rank=4&px=1");
            break;
            case '#starTab3' :
            $("#star_hotel_more").attr("href","{PHP_SELF}?m=hotellist&cityid="+cityid+"&rank=3&px=1");
            break;
        }
        return true;
    }
);
if(!$("#tm1").val())$("#tm1").val(ZNDate.format(ZNDate.plus(ZNDate.today(),0)));
if(!$("#tm2").val())$("#tm2").val(ZNDate.format(ZNDate.plus(ZNDate.today(),3)));

$("#hotelSubmit").click(function(){
    var hn = $("#hn");
    var keyword = $("#hs");
    if (hn.val() === "酒店名") {
        hn.attr("value","");
    }
    if (keyword.val() === "地标/位置") {
        keyword.attr("value","");
    }    
});


$("#comImgList").KinSlideshow({
    moveStyle:"right",
    intervalTime:3,
    isHasTitleBar:false,
    isHasTitleFont:false,
    titleBar:{titleBar_height:44,titleBar_bgColor:"#000000",titleBar_alpha:0.5},
    titleFont:{TitleFont_size:12,TitleFont_color:"#ffffff",TitleFont_weight:"normal"},
    btn:{
        btn_bgColor:"#FFFFFF",
        btn_bgHoverColor:"#1072aa",
        btn_fontColor:"#000000",
        btn_fontHoverColor:"#FFFFFF",
        btn_borderColor:"#cccccc",
        btn_borderHoverColor:"#1188c0",
        btn_borderWidth:1}
});

var scrtime;
$("#divNewOrder").hover(
	function()
	{
	    clearInterval(scrtime);
	},
	function()
	{
		scrtime = setInterval(function(){
	    var ul = $("#divNewOrder");
	    var liHeight = ul.find("dl:last").height();
	    ul.animate({marginTop : liHeight+40 +"px"},1000,function(){
		    ul.find("dl:last").prependTo(ul)
		    ul.find("dl:first").hide();
		    ul.css({marginTop:0});
		    ul.find("dl:first").fadeIn(400);
		    }); 
	    },2500);

}).trigger("mouseleave");

});
function rollchain(val){
    var box=$(".index_ls");
    box.find(".box_tit ul").each(function(){$(this).find("li").eq(''+val+'').attr("id","bt_current").siblings().removeAttr("id");});
    box.find(".index_box ul").eq(''+val+'').show().siblings().hide();
} 
function loadcs(current,cityid)
{
    var citycount = $(".sl_tab").attr("total");
    for(var i=0;i<=citycount;i++)
    {
        var obj = $("#hotcity"+i+"");
        if(current == i)
            obj.attr("class","at");
        else
            obj.attr("class","not");
    }
    $.ajax({
    url : "{PHP_SELF}?m=ajkeyword.getIndexData",
    type : 'POST',
    data: ({cityid:cityid,limit:10,rank:5}),
    dataType: "html",
    beforeSend : function(data){$("#enconomylist ul li").html("查询中...........");},
    success : 
        function(data)
        {
            if( data.length == 0 ){
                 alert("木有数据");
            }
            var dataObj=eval('('+ data +')'); 
            $(".area_list dl dd").html("");
            $(".remengdb").html("");
            $("#enconomylist").html("");
            $("#starTab1 ul").html("");
            $("#starTab2 ul").html("");
            $("#starTab3 ul").html("");
            //经济型
            $.each( dataObj.economy,function(idx, items){
                cityhtml = "<li> <DIV class=lef>"
                 + "<a href=\"{PHP_SELF}?m=hotelinfo&hotel_id="+items.hotel_id+"\">"+items.hotelname+"<\/a><\/div>"
                 + "<DIV class=rgt><SPAN class=\"span01\">￥<LABEL class=\"lbel01\">"+items.min_price+"<\/LABEL><\/SPAN><\/DIV><\/li>";
                $("#enconomylist").append(cityhtml);
            }); 
            //星级酒店
            $.each( dataObj.five,function(idx, items){
                fivehtml = "<li> <DIV class=lef>"
                 + "<a href=\"{PHP_SELF}?m=hotelinfo&hotel_id="+items.hotel_id+"\">"+items.hotelname+"<\/a><\/div>"
                 + "<DIV class=rgt><SPAN class=\"span01\">￥<LABEL class=\"lbel01\">"+items.min_price+"<\/LABEL><\/SPAN><\/DIV><\/li>";
                $("#starTab1 ul").append(fivehtml);
            }); 
            
            $.each( dataObj.four,function(idx, items){
                fourhtml = "<li> <DIV class=lef>"
                 + "<a href=\"{PHP_SELF}?m=hotelinfo&hotel_id="+items.hotel_id+"\">"+items.hotelname+"<\/a><\/div>"
                 + "<DIV class=rgt><SPAN class=\"span01\">￥<LABEL class=\"lbel01\">"+items.min_price+"<\/LABEL><\/SPAN><\/DIV><\/li>";
                $("#starTab2 ul").append(fourhtml);
            }); 
            
            $.each( dataObj.three,function(idx, items){
                threehtml = "<li> <DIV class=lef>"
                 + "<a href=\"{PHP_SELF}?m=hotelinfo&hotel_id="+items.hotel_id+"\">"+items.hotelname+"<\/a><\/div>"
                 + "<DIV class=rgt><SPAN class=\"span01\">￥<LABEL class=\"lbel01\">"+items.min_price+"<\/LABEL><\/SPAN><\/DIV><\/li>";
                $("#starTab3 ul").append(threehtml);
            });                         
                    
            //热门地标          
            $.each( dataObj.lable,function(idx, items){
                hothtml = "<ul><li><a href=\"{PHP_SELF}?m=hotellist&cityid="+items.cityid+"&key="+items.key_urlencode+"\">"+items.key+"<\/a><\/li><\/ul>";
                $(".area_list dl dd ").append(hothtml);
            });

            //热门商圈          
            $.each( dataObj.cbd,function(idx, items){
                hothtml = "<a href=\"{PHP_SELF}?m=hotellist&cityid="+items.cityid+"&cbd_id="+items.cbd_id+"\">"+items.cbd_name+"<\/a>";
                $(".remengdb").append(hothtml);
            });            
            
            $("#ecomomy_hotel_more").attr("href","{PHP_SELF}?m=hotellist&cityid="+cityid);
            $("#star_hotel_more").attr("href","{PHP_SELF}?m=hotellist&cityid="+cityid+"&rank=5&px=1");
            $("#star_hotel_more").attr("cityid",cityid);
        }
    ,
    timeout:5000,
    error: 
        function () {
            alert("请求超时请重试!");
        }
    });
}


function cityHotel(obj,chain_id)
{
        
    $.ajax({
    url : "{PHP_SELF}?m=ajkeyword.getCityHotel",
    type : 'POST',
    data: ({chain_id:chain_id}),
    dataType: "html",
    beforeSend : function(data){$("#chain_city ul").html("查询中...........").show();},
    success : 
        function(data)
        {
            if( data.length == 0 ){
                 alert("木有数据");
            }
            $("#chain_city ul").html("");
            var dataObj=eval('('+ data +')'); 
            var top = $("#"+obj+"").position().top + 90;
            var left = $("#"+obj+"").position().left;
            if ((top + 200) > document.body.clientHeight) {
                 top = top - 180;
            }           
            $.each( dataObj,function(idx, items){
                cityhtml = "<li><a href=\"{PHP_SELF}?m=hotellist&chain_id="+chain_id+"&cityid="+items.cityid+"\">"+items.cityname+"<\/a><\/li>";
                $("#chain_city ul").append(cityhtml);
            });
            $("#chain_city").css({
                        "top": top  + 'px',
                        "left": left  + 'px'
                    });         
            $("#chain_city").fadeIn("slow");
        }
    ,
    timeout:5000,
    error: 
        function () {
            alert("请求超时请重试!");
        }
    });
}

function closeT()
{
    $("#chain_city").fadeOut("slow");
}
</script>
