<tourex:pagecode name="HotelReviews(10)"/>
<%
Dim CategoryPic As String = WebCache.Category.Read("HotelCategory").Select("t_id=" & Dr("H_CategoryId"))(0)("t_pic")
%>
<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>{$Dr("H_Name")$}点评 - {$Dr("H_Name")$}预订 - {$WebSet.Name$}</title>
<meta name="keywords" content="{$Dr("H_Name")$}点评,{$Dr("H_Name")$}评价,{$Dr("H_Name")$}评论">
<meta name="description" content="{$Dr("H_Name")$}点评，{$WebSet.Name$}酒店评论是完全由客人入住以后发表的，绝对真实可靠，能在您预订{$Dr("H_Name")$}前提供帮助，让您在预订前了解这家酒店。在{$WebSet.Name$}发表点评均可获得{$Dr("H_MinBonus")$}-{$Dr("H_MaxBonus")$}{$WebSet.BonusUnits$}每间房不等的点评{$WebSet.BonusName$}。">
<link  type="text/css" rel="Stylesheet" href="{$WebPath$}Css/Style.css"/>
<link  type="text/css" rel="Stylesheet" href="{$WebPath$}Css/Hotel.css"/>
<script type="text/javascript" src="{$WebPath$}Sys/Js/jquery.js"></script>
<script type="text/javascript" src="{$WebPath$}Sys/Js/AlertWindow.js"></script>
<script type="text/javascript" src="{$WebPath$}Sys/Js/Date.js"></script>
<script type="text/javascript" src="{$WebPath$}Sys/Js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="{$WebPath$}js/Hotel.js"></script>
<tourex:mytag name="default_head"/>
<script language="javascript">
document.getElementById('index').className='sk2';
document.getElementById('hotel').className='sk1';
</script>
<tourex:mytag name="default_hotel_subnav"/>
<ul class="path"><li>当前位置</li><li><a href="{$WebPath$}">首页</a></li><li><a href="{$WebPath$}Hotel/">{$WebSet.LocalName$}酒店</a></li><li><tourex:category type="本级" name="city" id="{$Dr("H_CityId")$}" ><a href="{$WebPath$}Hotel/List.aspx?cid={${@t_id@}$}">{${@t_name@}$}酒店</a></tourex:category></li><li class="none">{$Dr("H_Name")$}点评</li></ul>
<div class="box">
	<tourex:mytag name="default_hotel_left"/>
	<div class="hotel_right_750">
	    <tourex:mytag name="default_hotel_description"/>
		<ul class="hotelShNav">
			<li class="sk2"><span><a href="{$WebPath$}Hotel/Show.aspx?id={$Dr("H_id")$}">概括及房价</a></span></li>
			<li class="sk2"><span><a href="{$WebPath$}Hotel/Pic.aspx?id={$Dr("H_id")$}">酒店图片</a></span></li>
            <li class="sk2"><span><a href="{$WebPath$}Hotel/Video.aspx?id={$Dr("H_id")$}">酒店视频</a></span></li>
			<li class="sk2"><span><a href="{$WebPath$}Hotel/Map.aspx?id={$Dr("H_id")$}">交通地图</a></span></li>
			<li class="sk1"><span>客人点评</span></li>
			<li class="sk2"><span><a href="{$WebPath$}Hotel/Questions.aspx?id={$Dr("H_id")$}">酒店咨询
</a></span></li>
		</ul>
		<div class="hotelTextSk3">
		<div class="hReviewsTit"><span><a href="/UserCenter/HotelOrderList.aspx?Status=3">我入住过，要点评>></a></span>客人满意度：{$IIF(Dr("H_Reviewss")=0,100,Math.Round((Dr("H_HaoPing")+Dr("H_ZhongPing"))/Dr("H_Reviewss")*100))$}%  [{$Dr("H_HaoPing")$}个好评,{$Dr("H_ZhongPing")$}个中评,{$Dr("H_ChaPing")$}个差评]</div>
		<%
		If RecordCount>0 Then
			While Dr1.Read
			%>
			<div class="hReviews">
				<div class="hReviewsL"><span>{$Dr1("O_BonusCount")$}</span>{$WebSet.BonusUnits$}</div>
				<div class="hReviewsR">
					<div class="titex">{$Dr1("U_Name")$} 于 {$CDate(Dr1("O_R_Date")).ToString("yyyy年MM月dd日")$} 对 <a href="{$WebPath$}Hotel/Booking.aspx?id={$Dr1("O_RoomId")$}">{$Dr1("R_Name")$}</a> 发表　<b>{$HotelReviewsStatus(Dr1("O_R_Count"))$}</b><br /><span>{$Dr1("O_R_Text")$}</span></div>
					<ul class="impression">
						<tourex:category type="批量" name="HotelImpression" id="{$Dr1("O_R_Impression")$}"><li>{${@t_name@}$}</li></tourex:category>
					</ul>
					<tourex:datalist sql="select P_Pic,P_Title,P_Date From [{$TablePrefix$}HotelPic] Where P_O_Id={$Dr1("O_Id")$} And P_Mark=1 Order By P_OrderId,P_ID Desc">
					<Header>
					<div class="picText">共拍摄<b>{$Dr1("O_R_Pics")$}</b>张图片,获得图片点评{$WebSet.BonusName$}<b>{$Dr1("O_R_PicBonusCount")$}</b>{$WebSet.BonusUnits$}</div>
					<ul class="pic">					
					</Header>
					<item>
						<li date="{${@P_Date@}$}"><img src="{$UpFolder$}{$FormatPic({@P_Pic@},"a")$}" width="80" height="60" alt="{${@P_Title@}$}" /></</li>
					</item>
					<Footer></ul></Footer>
					</tourex:datalist>
				</div>
			</div>
			<%
			End While
			Dr1.Close()
		Else
			TourExStr.AppendLine("<li>暂无</li>")
		End If
		%>
		</div>
		<tourex:mytag name="page"/>
    </div>
	<div class="clearit"></div>
</div>
<div class="picsPop" id="promptWindow"></div>
<script language="javascript">
(function(){
	$('.impression').each(function(){
		if($(this).find('li').length!=0)
		{
			$(this).prepend('<li class="t0">客户印象：</li>');
			$(this).find('li').each(function(i){
				$(this).addClass('t'+(i+1));
			});
		}
	});
})();

var pic=$('li[date]');
$(function(){
	pic.each(function(i){ 
		$(this).click(function(){
			ShowPic(i);
			ShowWindow();
		});
	});
});
function ShowPic(o)
{
	var p=$(pic[o]).find('img');
	var P=p.attr('src'),T=p.attr('alt'),D=$(pic[o]).attr('date');
	var maxW=800,maxH=600;
	var H,W,img = new Image();//构造JS的Image对象
	P=P.substring(0,P.lastIndexOf('/')+1) + P.substring(P.lastIndexOf('/') + 2);
	if($.browser.msie)
	{
		img.onreadystatechange = function(){imghtml();};
	}else{
		img.onload = function(){imghtml();};
	}
	img.src = P;//将本地图片赋给image对象
	function imghtml()
	{
		var tmp='<div style="position:relative;"><img id="img1" src="'+P+'"';
		if(img.width>maxW){if(img.height*(maxW/img.width)>maxH){tmp+=' height="'+maxH+'"';}else{tmp+=' width="'+maxW+'"';}}else if(img.height>maxH){tmp+=' height="'+maxH+'"';}
		$('#promptWindow').html(tmp+' /><div class="back" title="点击查看上一张" style="CURSOR:url({$WebPath$}Images/back.cur);"></div><div class="next" title="点击查看下一张" style="CURSOR:url({$WebPath$}Images/next.cur);"></div></div><div class="title"><div class="titleL">{$Dr("H_Name")$} '+T+'<em>上传日期：'+D+'</em></div><div class="titleR" onclick="HideWindow();" title="Close">关闭</div></div>');
		$('.back').css("opacity",0).click(function(){if(o==0){alert('以到第一张!');}else{ShowPic(o-1);}});
		$('.next').css("opacity",0).click(function(){if(pic.length-1==o){alert('以到最后张!');}else{ShowPic(o+1);}});
		$('#promptWindow').width(img.width);
	}
}
</script>
<%
Dr = NoThing
%>
<tourex:mytag name="default_foot"/>