<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Admin_Hotel.aspx.vb" Inherits="TourEx.Web.Admin_Hotel" %>
<%@ Import Namespace="TourEx.BLL" %>
<!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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="Css/Style.css"/>
<script type="text/javascript" src="../Sys/Js/jquery.js"></script>
<script type="text/javascript" src="../Sys/Js/AlertWindow.js"></script>
<script type="text/javascript" src="../Sys/Js/CreateSelect.js"></script>
<script type="text/javascript" src="../Sys/Js/jquery.validate.js"></script>
<script type="text/javascript" src="../Sys/Js/jquery.validate.check.js"></script>
<script type="text/javascript" src="../Sys/WebEdit/xheditor-zh-cn.min.js"></script>
<script type="text/javascript" src="../Sys/WebEdit/xheditor_plugins/ubb.js"></script>
<script type="text/javascript" src="http://union.mapbar.com/apis/maps/free?f=mapi&v=31.2&k=<%=WebSet.MapbarKey %>"></script> 
</head>
<body>
    <div id="promptWindow" class="promptWindow" align="center">
        <div class="titleBar">
        <span>地图标注</span><span onclick="HideWindow()" style="float: right;"><img src="Images/popclose.gif" /></span></div>
        <div class="mainContent" style="padding:20px 0;">
            <div id="mapbar" style="width:500px;height:300px;border:1px #C0CFED solid;"></div>
        </div>
    </div>
<ul class="navLocation">
	<li>当前位置：<a href="Admin_Main.aspx">首页</a> &gt; <a href="Admin_HotelList.aspx">酒店管理</a> &gt; <asp:Label ID="navIgation" runat="server" Text=""></asp:Label></li>
</ul>
<form runat="server" id="TourExForm">
<asp:HiddenField ID="RanNum" runat="server" />
<div class="infoBox">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="infoBoxTd">酒店名称：</td>
		<td>
			<asp:TextBox ID="H_Name" runat="server" MaxLength="30" Width="300px" CssClass="formTitle"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">所属品牌：</td>
		<td>
            <asp:DropDownList ID="H_BrandId" runat="server">
            </asp:DropDownList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">酒店类型：</td>
		<td>
            <asp:DropDownList ID="H_CategoryId" runat="server">
            </asp:DropDownList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">所属地区：</td>
		<td>
            <asp:DropDownList ID="H_CityId" runat="server">
            </asp:DropDownList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">酒店介绍：</td>
		<td>
			<asp:TextBox ID="H_Text" runat="server" TextMode="MultiLine"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">开业时间：</td>
		<td>
			<asp:TextBox ID="H_OpeningDate" runat="server" MaxLength="30" CssClass="formTitle"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">酒店地址：</td>
		<td>
			<asp:TextBox ID="H_Add" runat="server" MaxLength="50" Width="300px" CssClass="formTitle"></asp:TextBox>
			<asp:HiddenField ID="H_Nid" runat="server" />
			<a href="javascript:;" onclick="ShowWindow();">地址标注</a>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">视频地址：</td>
		<td>
			<asp:TextBox ID="H_Video" runat="server" MaxLength="300" Width="300px" CssClass="formTitle"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">位置距离：</td>
		<td>
			<asp:TextBox ID="H_Distance" runat="server" TextMode="MultiLine" Width="500px" Height="60px" CssClass="formTextarea"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">交通指南：</td>
		<td>
			<asp:TextBox ID="H_Traffic" runat="server" TextMode="MultiLine" Width="500px" Height="60px" CssClass="formTextarea"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">周围环境：</td>
		<td>
			<asp:TextBox ID="H_Environment" runat="server" TextMode="MultiLine" Width="500px" Height="60px" CssClass="formTextarea"></asp:TextBox>
		</td>
	</tr>
	 <tr>
		<td class="infoBoxTd">附加服务：</td>
		<td>
			<asp:TextBox ID="H_AdditionalServices" runat="server" TextMode="MultiLine" Width="500px" Height="60px" CssClass="formTextarea"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">酒店特别提示：</td>
		<td>
			<asp:TextBox ID="H_Prompt" runat="server" TextMode="MultiLine" Width="500px" Height="60px" CssClass="formTextarea"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">酒店联系方式：</td>
		<td>
			<asp:TextBox ID="H_ContactWay" runat="server" MaxLength="50" Width="300px" CssClass="formTitle"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">支持卡类：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$('#H_SupportCards')).attr('checked',this.checked)" />全选</div>
			<asp:CheckBoxList ID="H_SupportCards" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">
			</asp:CheckBoxList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">特色服务：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$(this).parent().parent()).attr('checked',this.checked)" />全选</div>
            <asp:CheckBox ID="H_Internet" runat="server" Text="宽带上网" />
            <asp:CheckBox ID="H_Airbus" runat="server" Text="机场接送" />
            <asp:CheckBox ID="H_Restaurants" runat="server" Text="餐厅服务" />
            <asp:CheckBox ID="H_Swimming" runat="server" Text="游泳池" />
            <asp:CheckBox ID="H_Parking" runat="server" Text="停车场" />
            <asp:CheckBox ID="H_Fitness" runat="server" Text="健身室" />
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">服务项目：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$('#H_ServicesProject')).attr('checked',this.checked)" />全选</div>
			<asp:CheckBoxList ID="H_ServicesProject" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">
			</asp:CheckBoxList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">餐饮服务：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$('#H_CateringServices')).attr('checked',this.checked)" />全选</div>
			<asp:CheckBoxList ID="H_CateringServices" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">
			</asp:CheckBoxList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">休闲娱乐：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$('#H_Entertainment')).attr('checked',this.checked)" />全选</div>
			<asp:CheckBoxList ID="H_Entertainment" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">
			</asp:CheckBoxList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">房间设施：</td>
		<td>
			<div class="selectall"><input type="checkbox" onclick="$(':checkbox',$('#H_Facility')).attr('checked',this.checked)" />全选</div>
			<asp:CheckBoxList ID="H_Facility" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">
			</asp:CheckBoxList>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">状态：</td>
		<td><asp:CheckBox ID="H_TJ" runat="server" />推荐</td>
	</tr>
	<tr>
		<td class="infoBoxTd">排序：</td>
		<td>
			<asp:TextBox ID="H_OrderId" runat="server" MaxLength="8" Width="50px" 
                CssClass="formTitle"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">&nbsp;
			
		</td>
		<td>
			<asp:Button ID="Button1" runat="server" Text="确定" CssClass="formInput01" />
		</td>
	</tr>
</table>
</div>
</form>
<script language="javascript" type="text/javascript">
	<!--    //
    var maplet = null;
    function initMap() {
        maplet = new Maplet("mapbar");
        var nid = ('<%=WebCache.Sys.Read("WebSet")(25) %>' == '' ? '116.38672,39.90805' : '<%=WebCache.Sys.Read("WebSet")(25) %>').split(',');
        maplet.centerAndZoom(new MPoint(nid[0], nid[1]), 8);
        maplet.addControl(new MStandardControl());
        MEvent.addListener(maplet, "edit", dragEnd);
        maplet.showOverview(false);
        if ($('#H_Nid').val() != '') {
            var marker = new MMarker(new MPoint(nid[0], nid[1]), new MIcon("http://union.mapbar.com/apidoc/images/tb1.gif", 32, 32));
            maplet.addOverlay(marker); //添加标注到地图
            marker.setEditable(true); //设置标注可编辑
            maplet.setMode("pan"); //pan: 移动模式，参数为 MPoint 对象，表示为地图移动后的中心点对象。
        } else {
            maplet.setMode("bookmark", onBookmark);
        }
    }
    function onBookmark(dataObj) {
        $('#H_Nid').val(dataObj.point.pid);
        var marker = new MMarker(dataObj.point, new MIcon("http://union.mapbar.com/apidoc/images/tb1.gif", 32, 32));//创建标注
        maplet.addOverlay(marker); //添加标注到地图
        marker.setEditable(true); //设置标注可编辑
        maplet.setMode("pan"); //pan: 移动模式，参数为 MPoint 对象，表示为地图移动后的中心点对象。
    }
    function dragEnd(overlay) {
        $('#H_Nid').val(overlay.pt.pid);
    }
	var editor;
	$(function () {
	    editor = $('#H_Text').xheditor({ tools: 'full', width: '90%', height: '300', forcePtag: false, internalScript: true, inlineScript: true, linkTag: true, localUrl: 'root', showBlocktag: true, beforeSetSource: ubb2html, beforeGetSource: html2ubb, upImgUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val(), upFlashUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val(), upMediaUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val(), focus: function () { $('#H_Text').val(editor.getSource()); $('#H_Text').valid(); }, blur: function () { $('#H_Text').val(editor.getSource()); $('#H_Text').valid(); } });
	    editor.setSource(html2ubb($('#H_Text').val()));
	    $("#TourExForm").validate({
	        rules: {
	            H_Name: { required: true },
	            H_CategoryId: { min: 1 },
	            H_Text: { required: true }
	        },
	        messages: {
	            H_Name: { required: '请填写酒店名称' },
	            H_CategoryId: { min: '请选择酒店类型' },
	            H_Text: { required: '请填写酒店介绍' }
	        }
	    });
	    initMap();
	});
	//-->
</script>

</body>
</html>
