<!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}"; var php_self='{PHP_SELF}'</script>
<script type="text/javascript" src="{$BASE}js/tools.js"></script>
<script type="text/javascript" src="{$BASE}js/calendar/jquery.min.js"></script>
<script type="text/javascript" src="{$Order_api}room.utf8.js"></script>
<link href="{$Order_api}/room.utf8.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--{template inc/header}-->
<div id="maincontent">
    <div class="index_content">

        <div class="list_nrttj">
            <div class="hty_nav"> <span>您所在位置：</span> <a href="/">首页</a> &gt;&nbsp;<a href="{PHP_SELF}?m=comment">酒店点评</a> </div>
            <div class="roomsyBox mtop">
                <div class="roomsy_head">
                    <h3>热门城市</h3>
                </div>
                <div class="fangxingnr">
                    <div class="chenglie">
                        <!--{model:lable getProvince() return=province_ary}-->
                        <!--{loop $province_ary $v}-->
                        <a href="{PHP_SELF}?m=comment&pid=$v[pid]&cityid=$v[cityid]">$v[pname]</a>
                        <!--{/loop}-->
                    </div>
                    {if !empty($city_ary)}
                    <div class="zx_city_list_son" style="padding:0px 0px 5px 10px;"> 
                        {loop $city_ary $v} 
                        <a style='color:#f30' href="{PHP_SELF}?m=comment&pid=$pid&cityid=$v[cityid]">$v[cityname]</a>&nbsp;&nbsp;
                        {/loop} 
                    </div>
                    {/if}
                </div>
            </div>              
            <div class="roomsyBox mtop">
                <div class="roomsy_head">
                    <H3>客人点评</H3>
                </div>
	            <div class="infost">
	                <div id="comment_body"><img align="absmiddle" src="{$BASE}js/loading.gif"/>最新酒店点评正在努力加载中...</div>
	            </div>   
	            <div class="page" style="text-align:center;">
	                <div class="page_list">  </div>
	            </div>	                         
            </div>
          

        </div>
        <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_history}-->
            <!--{template inc/why}-->
            <!--{template inc/help}-->
        </div>        
    </div>
    <!--{template inc/footer}-->
</div>
</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(){
if(!$("#tm1").val())$("#tm1").val(ZNDate.format(ZNDate.plus(ZNDate.today(),0)));
if(!$("#tm2").val())$("#tm2").val(ZNDate.format(ZNDate.plus(ZNDate.today(),3)));
getComment({$cityinfo[cityid]},0); 
});

function getComment(cityid,pg){
    var string = '';
    if(pg!=0){
        var url = "cityid="+cityid+"&page="+pg;
    } else {
        var url = "cityid="+cityid;
    }
    $.post("{PHP_SELF}?m=comment.ajaxGetComment&"+url,
        function(data){
            var obj=eval("("+data+")");//转换为json对象
            var page = obj.page;
            var nofind = obj.nofind;
            var rs = obj.rs;
            $.each(rs,function(j, n){
                var hotel_id = n.hotel_id;
                var hotelname = n.hotelname;
                var yonghu = n.yonghu;
                var addtime = n.addtime;
                var content = n.content;
                string += '<div class="dp_box"><div class="dp_box_r"><dl><dt><a href="{PHP_SELF}?m=hotelinfo&hotel_id='+hotel_id+'" title="'+hotelname+'" target="_blank">'+hotelname+'</a></dt><dd>'+yonghu+' 于 '+addtime+' 评价说：</dd><dd>'+content+'</dd></dl></div></div>';
            });
            string += nofind;
            $(".page_list").html(page);     
            $('#comment_body').html(string);
    }); 
}

function comment(cityid,pg){
    $('html').animate({scrollTop:$(".list_nrttj").offset().top}, 'slow');
    $('body').animate({scrollTop:$(".list_nrttj").offset().top}, 'slow'); 
    getComment(cityid,pg);
}


</script>
