<?php if(!class_exists('Template')) die('Access Denied'); $this->tpl->check('ktv.html', '7479c36a27279146d411e39f2873da67', 1362484592); ?>
<?php if($action=='list') { ?>
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="none" />
<title>KTV预订网管理系统</title>
<link type="text/css" href="<?php echo MY_THEMEDIR; ?>images/layout.css" rel="stylesheet" />
<link type="text/css" href="<?php echo MY_THEMEDIR; ?>images/win.css" rel="stylesheet" />
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.3&services=true"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/common/viewMode.js"></script>
<script type="text/javascript" src="ueditor/editor_config.js"></script>
<script type="text/javascript" src="ueditor/editor_all.js"></script>
<link rel="stylesheet" type="text/css" href="ueditor/themes/default/ueditor.css"/>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/ktv/ktvList.js"></script>
</head>

<body>
<div id="bodymain">
<!-- 头部开始 -->
<?php include $this->tpl->getfile('inc/header'); ?>
<!-- 主体开始 -->
<div id="user_content">
<table width="100%" border="0">
<tr>
<td width="156" valign="top">
<?php include $this->tpl->getfile('inc/lead_ktv'); ?>
</td>
<td valign="top">
<div id="main_user">
<div class="main_user_bg"><div class="main_user_bg1_right"></div></div>
<div class="user_con">
<div id="topFont">
<div class="left">KTV列表</div>
<div class="right">
<input type="hidden" id="O_Type" value="list" />
<input type="hidden" id="currentStatus" />
<select id="simpleSearch"> 
<option value="name" selected>KTV名称</option>
<option value="phone">联系电话</option>
</select>
<input id="simpleSearchKey" type="text" />&nbsp;
<button id="O_SimpleSearchBtn" class="searchbutton" type="button">快捷搜索</button>
</div>
</div>
<div class="todayinfoListTop">
<div class="todayinfo1"><span id="O_Count"></span>　<span id="O_Flush">正在加载数据...</span></div>
</div>
<span id="mainlist">
<?php include $this->tpl->getfile('inc/list_ktv'); ?>
</span>
</div>
<div class="main_user_bg1"><div class="main_user_bg1_right1"></div></div></div>
</td>
</tr>
</table>
</div>
<div class="clearfloat"></div>
<?php include $this->tpl->getfile('inc/bottom'); ?>
</div>
<!-- 加一个半透明层 --> 
<div id="doing"></div>
<!-- 浏览信息 -->
<?php include $this->tpl->getfile('inc/win_view'); ?>
<!-- 修改信息 -->
<?php include $this->tpl->getfile('inc/win_update'); ?>
</body>
</html>
<?php } elseif ($action=='add') { ?>
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="none" />
<title>KTV预订网管理系统</title>
<link type="text/css" href="<?php echo MY_THEMEDIR; ?>images/layout.css" rel="stylesheet" />
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.3&services=true"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/ktv/ktvAdd.js"></script>




<script type="text/javascript">
$(function() {
	var O_MapUpdate = new BMap.Map("O_MapUpdate");
	var O_ContainerOver = $("#containerOver");
	var O_MapKey = $("#O_MapKey");
	var O_MapSearch = $("#O_MapSearch");
	
	//加载地图
	var O_PointUpdate = new BMap.Point(104.067923 , 30.68044);
	var v_mapkeyUnit = "<?php echo $name; ?>";
	var O_LocalUnit = new BMap.LocalSearch("<?php echo $siteInfo['defaultCity']; ?>", {
		renderOptions: {
			map:O_MapUpdate,
			autoViewport:true,
			selectFirstResult:false
		}
	});
	O_LocalUnit.search(v_mapkeyUnit);
	O_MapUpdate.centerAndZoom(O_PointUpdate, 18);
	O_MapUpdate.addControl(new BMap.NavigationControl());  //向地图添加控件
	
	//地图搜索
	O_MapSearch.click(function() {
		var v_mapkey = O_MapKey.val();
		var O_LocalSearch = new BMap.LocalSearch("<?php echo $siteInfo['defaultCity']; ?>", {
			renderOptions: {
				map:O_MapUpdate,
				autoViewport:true,
				selectFirstResult:false
			}
		});
		O_LocalSearch.search(v_mapkey);
	});
	
	//添加点击事件
	O_MapUpdate.addEventListener("click", function(e) {
		O_MapUpdate.clearOverlays();
		document.getElementById("O_BaiduX").innerHTML = e.point.lng;
		document.getElementById("O_BaiduY").innerHTML = e.point.lat;
		
		var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
		var O_MakerUpdate = new BMap.Marker(new BMap.Point(e.point.lng, e.point.lat), {icon: O_MyIconUpdate});
		O_MakerUpdate.enableDragging(true);    // 设置标注可拖拽
		O_MakerUpdate.addEventListener("dragging", function(ee) {
			document.getElementById("O_BaiduX").innerHTML = ee.point.lng;
			document.getElementById("O_BaiduY").innerHTML = ee.point.lat;
		});
		O_MapUpdate.addOverlay(O_MakerUpdate);
	});
	
	//点击定位
	O_ContainerOver.click(function() {
		O_ContainerOver.hide();
		var maker = new BMap.Marker(new BMap.Point(e.point.lng, e.point.lat));
		O_MapUpdate.addOverlay(maker);
	});
	
	//添加右键事件
	var O_MenuUpdate = new BMap.ContextMenu();
	var O_TxtMenuItemUpdate = [
		{
			text:"在此添加定位",
			callback:function(p) {
				O_MapUpdate.clearOverlays();
				document.getElementById("O_BaiduX").innerHTML = p.lng;
				document.getElementById("O_BaiduY").innerHTML = p.lat;
				var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
				var O_MakerUpdate = new BMap.Marker(p, {icon: O_MyIconUpdate}), px = O_MapUpdate.pointToPixel(p);
				O_MakerUpdate.enableDragging(true);    // 设置标注可拖拽
				O_MakerUpdate.addEventListener("dragging", function(ee) {
					document.getElementById("O_BaiduX").innerHTML = ee.point.lng;
					document.getElementById("O_BaiduY").innerHTML = ee.point.lat;
				});
				O_MapUpdate.addOverlay(O_MarkUpdate);
			}
		}, {
			text:"放大", callback:function() { O_MapUpdate.zoomIn() }
		}, {
			text:"缩小", callback:function() { O_MapUpdate.zoomOut() }
		}, {
			text:"放置到最大级", callback:function() { O_MapUpdate.zoomTo(18) }
		}, {
			text:"查看全国", callback:function() { O_MapUpdate.zoomTo(4) }
		}
	];
	
	for(var i = 0; i < O_TxtMenuItemUpdate.length; i++) {
		O_MenuUpdate.addItem(new BMap.MenuItem(O_TxtMenuItemUpdate[i].text, O_TxtMenuItemUpdate[i].callback, 100));
		if(i == 0) {
			O_MenuUpdate.addSeparator();
		}
	}
	O_MapUpdate.centerAndZoom(O_PointUpdate, 18);
	O_MapUpdate.addContextMenu(O_MenuUpdate);
});
</script>

<script type="text/javascript" src="ueditor/editor_config.js"></script>
<script type="text/javascript" src="ueditor/editor_all.js"></script>
<link rel="stylesheet" type="text/css" href="ueditor/themes/default/ueditor.css"/>

</head>

<body>
<div id="bodymain">
<!-- 头部开始 -->
<?php include $this->tpl->getfile('inc/header'); ?>
<!-- 主体开始 -->
<div id="user_content">
<table width="100%" border="0">
<tr>
<td width="156" valign="top">
<?php include $this->tpl->getfile('inc/lead_ktv'); ?>
</td>
<td valign="top">
<div id="main_user">
<div class="main_user_bg"><div class="main_user_bg1_right"></div></div>
<div class="user_con">
<h2>KTV添加</h2>
<table class="user_table" border="0" cellSpacing="0" cellPadding="0" width="100%">
<tbody>
<tr>
<td style="width:15%;white-space:nowrap;text-align:center;">KTV名称:</td>
<td style="width:35%;text-align:left"><input id="O_Name" type="text" class="common_txt" /> <span class="red">*</span></td>
<td style="width:15%;white-space:nowrap;text-align:center;">英文名称:</td>
<td style="width:35%;text-align:left"><input id="O_EnName" type="text" class="common_txt" /></td>
</tr>
<tr>
<td style="text-align:center">KTV简称:</td>
<td><input id="O_ShortName" type="text" class="common_txt" /></td>
<td style="text-align:center">联系电话:</td>
<td><input id="O_Phone" type="text" class="common_txt" /></td>
</tr><tr>
<tr>


<td style="text-align:center">行政区:</td>
<td><select id="O_Province" style="margin-right:3px">
<option value="">==省份==</option>
<?php if(is_array($province)) foreach($province as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select> <select id="O_City" style="margin-right:3px">
<option value="">==城市==</option>
</select> <select id="O_Area" style="margin-right:3px">
<option value="">==行政区==</option>
</select><span class="red">*</span></td>

<td style="text-align:center">副标题:</td><td><input id="O_Subtitle" type="text" class="common_txt" /></td>

</tr>
<tr>

<td style="text-align:center">标志物:</td>
<td><select id="O_Landmark" style="margin-right:3px">
<option value="">==标志物==</option>
<?php if(is_array($landmark)) foreach($landmark as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$landmarkId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select></td>
<td style="text-align:center">商业区:</td>
<td><select id="O_ShopArea" style="margin-right:3px">
<option value="">==商业区==</option>
</select></td>


</tr>

<tr>

<td style="text-align:center">营业时间</Td>
<Td><input id="O_Opentime" type="text" style="width:30px;" maxlength="2" />点&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;<input id="O_Closetime" type="text" style="width:30px;"  maxlength="2" />点&nbsp;&nbsp;&nbsp;&nbsp;<span class="red">下午1点请输入13点</span></Td>


<td style="text-align:center">KTV类型:</td>

<td>
	<select id="O_Ktvtype" style="margin-right:3px">
	<option value="0">==清选择==</option>
	
<?php if(is_array($ktvtype)) foreach($ktvtype as $k => $v) { ?>
		<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
	<?php } ?>
		
	</select>
	
	<input type="text"  style="width:80px;" id="ktvType"  name="ktvType"/>&nbsp;&nbsp;&nbsp;<a id="add_ktvType" name="add_ktvType">添加</a>
	
</td>

</tr>
<tr>
<td style="text-align:center">详细地址:</td>
<td colspan="3" ><input id="O_Address" type="text" class="common_txt" style="width:680px;" /></td>

</tr>
<tr>
<td style="text-align:center">服务设施:</td>
<td colspan="3">
<div style="width:720px; clear:both;">

<div id="service_content_info" >

<?php if(is_array($service)) foreach($service as $k => $v) { ?>
	<div style="width:auto; padding-left:5px; padding-right:5px; float:left;"><input type="checkbox" name="O_Service" value="<?php echo $v['name']; ?>" ><?php echo $v['name']; ?></div>
<?php } ?>
</div>

<div>
	
</div>
</div>

</td>
</tr>
<tr>
<td style="text-align:center">KTV简介:</td>
<td colspan="3">
<textarea id="O_Detail" name="O_Detail" cols="80" rows="5"></textarea>

<script type="text/javascript"> var e_detail = new UE.ui.Editor(); textarea:'O_Detail'; e_detail.render('O_Detail'); </script>

</td>
</tr>

<tr>
<td style="text-align:center">KTV时段表:</td>
<td colspan="3">
<textarea name="O_Facility" id="O_Facility" cols="80" rows="5"></textarea>
<script type="text/javascript"> var e_facility = new UE.ui.Editor(); textarea:'O_Facility'; e_facility.render('O_Facility'); </script>

</td>
</tr>

<tr style="display:none">
<td style="text-align:center">交通指南:</td>
<td colspan="3">
<textarea name="O_Traffic" id="O_Traffic" cols="80" rows="5"></textarea>
<script type="text/javascript"> var e_traffic = new UE.ui.Editor(); textarea:'O_Traffic'; e_traffic.render('O_Traffic'); </script>
</td>
</tr>

<tr>
<td style="text-align:center">地图坐标:</td>
<td colspan="3">
<div id="search">关键字：<input id="O_MapKey" type="text" /><button id="O_MapSearch" type="button">搜索</button></div>
<div id="O_MapUpdate" style="width:600px; height:320px; z-index:100px;"></div>
<div id="containerOver"></div>
X坐标:<span id="O_BaiduX" style="color:#339; text-decoration:underline"></span>
Y坐标:<span id="O_BaiduY" style="color:#339; text-decoration:underline"></span>
</td>
</tr>
<tr>
<td style="white-space:nowrap;text-align:center">SEO优化:</td>
<td colspan="3">
<div style="width:760px;clear:left;"><div style="width:120px;white-space:nowrap;float:left">Title(标题):</div><div style="width:640px;float:left;"><textarea name="O_Title" id="O_Title" cols="65" rows="2"></textarea></div></div>
<div style="width:760px;clear:left;"><div style="width:120px;white-space:nowrap;float:left">Keywords(关键字):</div><div style="width:640px;float:left;"><textarea name="O_Keywords" id="O_Keywords" cols="65" rows="2"></textarea></div></div>
<div style="width:760px;clear:left;"><div style="width:120px;white-space:nowrap;float:left">Description(描述):</div><div style="width:640px;float:left;"><textarea name="O_Description" id="O_Description" cols="65" rows="2"></textarea></div></div></td>
</tr>
<tr>
<td style="white-space:nowrap;text-align:center">列表标题:</td>
<td><input type="radio" name="O_ListTitle" value="" id="O_ListTitle_0" checked><label for="O_ListTitle_0" style="cursor:pointer;">空</label> <input type="radio" name="O_ListTitle" value="推荐" id="O_ListTitle_1"><label for="O_ListTitle_1" style="cursor:pointer;">推荐</label> <input type="radio" name="O_ListTitle" value="特推" id="O_ListTitle_2"><label for="O_ListTitle_2" style="cursor:pointer;">特推</label> <input type="radio" name="O_ListTitle" value="人气" id="O_ListTitle_3"><label for="O_ListTitle_3" style="cursor:pointer;">人气</label></td>
<td style="white-space:nowrap;text-align:center">状态:</td>
<td><input type="radio" name="O_Status" value="待审核" id="O_Status_0" checked /><label for="O_Status_0" style="cursor:pointer;">待审核</label> <input type="radio" name="O_Status" value="已审核" id="O_Status_1" /><label for="O_Status_1" style="cursor:pointer;">已审核</label></td>
</tr>
<tr>
<td style="text-align:left;padding-left:50px;" colspan="4"><button id="O_Add" class="searchbutton" type="button">提 交</button></td></tr>
</tbody>
</table>
</div>
<div class="main_user_bg1"><div class="main_user_bg1_right1"></div></div></div>
</td>
</tr>
</table>
</div>
<div class="clearfloat"></div>
<?php include $this->tpl->getfile('inc/bottom'); ?>
</div>
</body>
</html>
<?php } elseif ($action=='info') { ?>
<script type="text/javascript">
$(function() {
	var bool = true;
	$("#O_MapTab_View").click(function() {
		if(bool) {
			bool = false;
			var O_MapUpdate = new BMap.Map("O_MapUpdate");
			// 加载地图
			<?php if(strlen($baiduMapX)>0 && strlen($baiduMapY)>0) { ?>
			var O_PointUpdate = new BMap.Point(<?php echo $baiduMapX; ?>, <?php echo $baiduMapY; ?>);
			<?php } else { ?>
			var O_PointUpdate = new BMap.Point(<?php echo $siteInfo['mapX']; ?>, <?php echo $siteInfo['mapY']; ?>);
			<?php } ?>
			O_MapUpdate.centerAndZoom(O_PointUpdate, 18);
			O_MapUpdate.addControl(new BMap.NavigationControl());  // 向地图添加控件
			
			<?php if(strlen($baiduMapX)>0 && strlen($baiduMapY)>0) { ?>
			var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
			var O_MakerUpdate = new BMap.Marker(O_PointUpdate, {icon: O_MyIconUpdate});
			O_MapUpdate.addOverlay(O_MakerUpdate);
			
			var O_InfoUpdateOpts = {
				width : 250,     // 信息窗口宽度
				height: 100,     // 信息窗口高度
				title : "KTV名称：<?php echo $name; ?>"  // 信息窗口标题
			}
			
			//KTV信息
			var v_hotelInfo = "所在区域：<?php echo $areaName; ?><br />联系地址：<?php echo $address; ?>";
			var O_InfoWindowUpdate = new BMap.InfoWindow(v_hotelInfo, O_InfoUpdateOpts);  // 创建信息窗口对象
			O_MakerUpdate.addEventListener("click", function() {
				this.openInfoWindow(O_InfoWindowUpdate);
			});
			<?php } ?>
		}
	});
});
</script>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr class="Content O_BaseInfoTab_View">
<td align="right" style="white-space:nowrap; width:15%;">KTV名称：</td>
<td style="width:35%;"><?php echo $name; ?></td>
<td align="right" style="white-space:nowrap; width:15%;">英文名称：</td>
<td style="width:35%;"><?php echo $enName; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">KTV简称：</td>
<td><?php echo $shortName; ?></td>
<td align="right">联系电话：</td>
<td><?php echo $phone; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">KTV星级：</td>
<td><?php echo $levelName; ?></td>
<td align="right">所在区域：</td>
<td><?php echo $areaName; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">商业区：</td>
<td><?php echo $shopareaName; ?></td>
<td align="right">标志物：</td>
<td><?php echo $landmarkName; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">详细地址：</td>
<td colspan="3"><?php echo $address; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">服务设施：</td>
<td colspan="3"><?php echo strtr($service,'|',' ');; ?></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">客人印象：</td>
<td colspan="3"></td></tr>
<tr class="Content O_BaseInfoTab_View">
<td align="right">列表标题：</td>
<td><?php echo $listTitle; ?></td>
<td align="right">KTV状态：</td>
<td><span class="f_14b_f00"><?php echo $status; ?></span></td></tr>
<tr class="Content O_DetailsTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">KTV详情：</td>
<td colspan="3"><?php echo $detail; ?></td></tr>
<tr class="Content O_CateringTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">餐饮服务：</td>
<td colspan="3"><?php echo $catering; ?></td></tr>
<tr class="Content O_FacilityTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">KTV设施：</td>
<td colspan="3"><?php echo $facility; ?></td></tr>
<tr class="Content O_MeetingTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">会议中心：</td>
<td colspan="3"><?php echo $meeting; ?></td></tr>
<tr class="Content O_SceneryTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">周边景点：</td>
<td colspan="3"><?php echo $scenery; ?></td></tr>
<tr class="Content O_TrafficTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">交通指南：</td>
<td colspan="3"><?php echo $traffic; ?></td></tr>
<tr class="Content O_MapTab_View" style="display:none">
<td colspan="4"><div id="O_MapUpdate" style="width:600px; height:300px; z-index:100px;"></div></td></tr>
<tr class="Content O_SeoTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Title(标题)：</td>
<td colspan="3"><?php echo $title; ?></td></tr>
<tr class="Content O_SeoTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Keywords(关键字)：</td>
<td colspan="3"><?php echo $keywords; ?></td></tr>
<tr class="Content O_SeoTab_View" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Description(描述)：</td>
<td colspan="3"><?php echo $description; ?></td></tr>
</tbody></table>
<?php } elseif ($action=='update') { ?>
<script type="text/javascript">
$(function() {
	var bool = true;
	$("#O_MapTab_Update").click(function() {
		if(bool) {
			bool = false;
			var O_MapUpdate = new BMap.Map("O_MapUpdate");
			var O_ContainerOver = $("#containerOver");
			var O_MapKey = $("#O_MapKey");
			var O_MapSearch = $("#O_MapSearch");
			
			//加载地图
			<?php if(strlen($baiduMapX)>0 && strlen($baiduMapY)>0) { ?>
			var O_PointUpdate = new BMap.Point(<?php echo $baiduMapX; ?>, <?php echo $baiduMapY; ?>);
			<?php } else { ?>
			var O_PointUpdate = new BMap.Point(<?php echo $siteInfo['mapX']; ?>, <?php echo $siteInfo['mapY']; ?>);
			var v_mapkeyUnit = "<?php echo $name; ?>";
			var O_LocalUnit = new BMap.LocalSearch("<?php echo $siteInfo['defaultCity']; ?>", {
				renderOptions: {
					map:O_MapUpdate,
					autoViewport:true,
					selectFirstResult:false
				}
			});
			O_LocalUnit.search(v_mapkeyUnit);
			<?php } ?>
			O_MapUpdate.centerAndZoom(O_PointUpdate, 18);
			O_MapUpdate.addControl(new BMap.NavigationControl());  //向地图添加控件
			
			<?php if(strlen($baiduMapX)>0 && strlen($baiduMapY)>0) { ?>
			var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
			var O_MakerUpdate = new BMap.Marker(O_PointUpdate, {icon:O_MyIconUpdate});
			O_MapUpdate.addOverlay(O_MakerUpdate);
			<?php } ?>
			
			//地图搜索
			O_MapSearch.click(function() {
				var v_mapkey = O_MapKey.val();
				var O_LocalSearch = new BMap.LocalSearch("<?php echo $siteInfo['defaultCity']; ?>", {
					renderOptions: {
						map:O_MapUpdate,
						autoViewport:true,
						selectFirstResult:false
					}
				});
				O_LocalSearch.search(v_mapkey);
			});
			
			//添加点击事件
			O_MapUpdate.addEventListener("click", function(e) {
				O_MapUpdate.clearOverlays();
				document.getElementById("O_BaiduX").innerHTML = e.point.lng;
				document.getElementById("O_BaiduY").innerHTML = e.point.lat;
				
				var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
				var O_MakerUpdate = new BMap.Marker(new BMap.Point(e.point.lng, e.point.lat), {icon: O_MyIconUpdate});
				O_MakerUpdate.enableDragging(true);    // 设置标注可拖拽
				O_MakerUpdate.addEventListener("dragging", function(ee) {
					document.getElementById("O_BaiduX").innerHTML = ee.point.lng;
					document.getElementById("O_BaiduY").innerHTML = ee.point.lat;
				});
				O_MapUpdate.addOverlay(O_MakerUpdate);
			});
			
			//点击定位
			O_ContainerOver.click(function() {
				O_ContainerOver.hide();
				var maker = new BMap.Marker(new BMap.Point(e.point.lng, e.point.lat));
				O_MapUpdate.addOverlay(maker);
			});
			
			//添加右键事件
			var O_MenuUpdate = new BMap.ContextMenu();
			var O_TxtMenuItemUpdate = [
				{
					text:"在此添加定位",
					callback:function(p) {
						O_MapUpdate.clearOverlays();
						document.getElementById("O_BaiduX").innerHTML = p.lng;
						document.getElementById("O_BaiduY").innerHTML = p.lat;
						var O_MyIconUpdate = new BMap.Icon("<?php echo MY_THEMEDIR; ?>images/map/tb1.gif", new BMap.Size(34, 36));
						var O_MakerUpdate = new BMap.Marker(p, {icon: O_MyIconUpdate}), px = O_MapUpdate.pointToPixel(p);
						O_MakerUpdate.enableDragging(true);    // 设置标注可拖拽
						O_MakerUpdate.addEventListener("dragging", function(ee) {
							document.getElementById("O_BaiduX").innerHTML = ee.point.lng;
							document.getElementById("O_BaiduY").innerHTML = ee.point.lat;
						});
						O_MapUpdate.addOverlay(O_MarkUpdate);
					}
				}, {
					text:"放大", callback:function() { O_MapUpdate.zoomIn() }
				}, {
					text:"缩小", callback:function() { O_MapUpdate.zoomOut() }
				}, {
					text:"放置到最大级", callback:function() { O_MapUpdate.zoomTo(18) }
				}, {
					text:"查看全国", callback:function() { O_MapUpdate.zoomTo(4) }
				}
			];
			
			for(var i = 0; i < O_TxtMenuItemUpdate.length; i++) {
				O_MenuUpdate.addItem(new BMap.MenuItem(O_TxtMenuItemUpdate[i].text, O_TxtMenuItemUpdate[i].callback, 100));
				if(i == 0) {
					O_MenuUpdate.addSeparator();
				}
			}
			O_MapUpdate.centerAndZoom(O_PointUpdate, 18);
			O_MapUpdate.addContextMenu(O_MenuUpdate);
		}
	});
});
</script>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr class="Content O_BaseInfoTab_Update">
<td align="right" style="white-space:nowrap; width:15%;">KTV名称：</td>
<td style="white-space:nowrap; width:35%;"><input id="O_Name" type="text" class="common_txt" value="<?php echo $name; ?>" /> <span class="red">*</span></td>
<td align="right" style="white-space:nowrap; width:15%;">英文名称：</td>
<td style="white-space:nowrap; width:35%;"><input id="O_EnName" type="text" class="common_txt" value="<?php echo $enName; ?>" /></td></tr>
<tr class="Content O_BaseInfoTab_Update">
<td align="right">KTV简称：</td>
<td><input id="O_ShortName" type="text" class="common_txt" value="<?php echo $shortName; ?>" /></td>
<td align="right">联系电话：</td>
<td><input id="O_Phone" type="text" class="common_txt" value="<?php echo $phone; ?>" /></td></tr>

<tr class="Content O_BaseInfoTab_Update">
<td style="text-align:right">行政区:</td>
<td colspan="3"><select id="O_Province" style="margin-right:3px">
<option value="">==省份==</option>
<?php if(is_array($province)) foreach($province as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$provinceId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select> <select id="O_City" style="margin-right:3px">
<option value="">==城市==</option>
<?php if(is_array($city)) foreach($city as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$cityId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select> <select id="O_Area" style="margin-right:3px">
<option value="">==行政区==</option>
<?php if(is_array($area)) foreach($area as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$areaId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select><span class="red">*</span>

&nbsp;&nbsp;&nbsp;副标题：<input type="text" id="O_Subtitle" value="<?php echo $subtitle; ?>" />

</td></tr>
<tr class="Content O_BaseInfoTab_Update">
<td style="text-align:right">商业区:</td>
<td><select id="O_ShopArea" style="margin-right:3px">
<option value="">==商业区==</option>
<?php if(is_array($shoparea)) foreach($shoparea as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$shopareaId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select></td>
<td style="text-align:right">标志物:</td>
<td><select id="O_Landmark" style="margin-right:3px">
<option value="">==标志物==</option>
<?php if(is_array($landmark)) foreach($landmark as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$landmarkId) { ?> selected<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select></td></tr>

<tr class="Content O_BaseInfoTab_Update">
<td align="left"  colspan="5">KTV类型：

<select id="O_Ktv_type">
	
<?php if(is_array($ktvType_all)) foreach($ktvType_all as $k => $v) { ?>
		<?php if($v['id'] == $ktvtype) { ?>
		<option value="<?php echo $v['id']; ?>" selected="selected"><?php echo $v['name']; ?></option>
		<?php } else { ?>
		<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
		<?php } ?>
	<?php } ?>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
营业时间：
<input id="O_Opentime" style="width:60px;" type="text" value="<?php echo $opentime; ?>" /> 至  <input id="O_Closetime" style="width:60px;" type="text"  value="<?php echo $closetime; ?>" /><span class="red">下午1点请输入13点</span>&nbsp;&nbsp;&nbsp;&nbsp;


</td>
</tr>

<tr class="Content O_BaseInfoTab_Update">
<td align="right">详细地址：</td>
<td colspan="3"><input id="O_Address" style="width:500px;" type="text" class="common_txt" value="<?php echo $address; ?>" /></td></tr>
<tr class="Content O_BaseInfoTab_Update">
<td align="right">服务设施：</td>
<td colspan="3">

<?php if(is_array($service_all)) foreach($service_all as $k => $v) { ?>

<div style="width:72px; float:left;">

<input type="checkbox" name="O_Service"  <?php echo $v['check']; ?> value="<?php echo $v['name']; ?>" id="O_Service_0" />

<label for="O_Service_0" style="cursor:pointer;"><?php echo $v['name']; ?></label>
</div>

<?php } ?>
</td></tr>
<tr class="Content O_BaseInfoTab_Update">
<td align="right">列表标题：</td>
<td>
<input type="radio" name="O_ListTitle" value="" id="O_ListTitle_0"<?php if($listTitle!='推荐' && $listTitle!='特推' && $listTitle!='人气') { ?> checked="checked"<?php } ?> /><label for="O_ListTitle_0" style="cursor:pointer;">空</label>
<input type="radio" name="O_ListTitle" value="推荐" id="O_ListTitle_1"<?php if($listTitle=='推荐') { ?> checked="checked"<?php } ?> /><label for="O_ListTitle_1" style="cursor:pointer;">推荐</label>
<input type="radio" name="O_ListTitle" value="特推" id="O_ListTitle_2"<?php if($listTitle=='特推') { ?> checked="checked"<?php } ?> /><label for="O_ListTitle_2" style="cursor:pointer;">特推</label>
<input type="radio" name="O_ListTitle" value="人气" id="O_ListTitle_3"<?php if($listTitle=='人气') { ?> checked="checked"<?php } ?> /><label for="O_ListTitle_3" style="cursor:pointer;">人气</label></td>
<td align="right">KTV状态：</td>
<td><span class="f_14b_f00"><?php echo $status; ?></span><input id="O_ID" type="hidden" value="<?php echo $id; ?>" /></td></tr>
<tr class="Content O_DetailsTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">KTV详情：</td>
<td colspan="3"><textarea name="O_Detail" id="O_Detail" cols="60" rows="15"><?php echo $detail; ?></textarea></td></tr>
<tr class="Content O_CateringTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">餐饮服务：</td>
<td colspan="3"><textarea name="O_Catering" id="O_Catering" cols="60" rows="15"><?php echo $catering; ?></textarea></td></tr>
<tr class="Content O_FacilityTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">KTV简介：</td>
<td colspan="3"><textarea name="O_Facility" id="O_Facility" cols="60" rows="15"><?php echo $farelist; ?></textarea></td></tr>
<tr class="Content O_MeetingTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">会议中心：</td>
<td colspan="3"><textarea name="O_Meeting" id="O_Meeting" cols="60" rows="15"><?php echo $meeting; ?></textarea></td></tr>
<tr class="Content O_SceneryTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">周边景点：</td>
<td colspan="3"><textarea name="O_Scenery" id="O_Scenery" cols="60" rows="15"><?php echo $scenery; ?></textarea></td></tr>
<tr class="Content O_TrafficTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:65px;">KTV时间段：</td>
<td colspan="3">

<textarea name="O_Traffic" id="O_Traffic" cols="60" rows="15"><?php echo $traffic; ?></textarea>
<script type="text/javascript"> var e_traffic = new UE.ui.Editor(); textarea:'O_Traffic'; e_traffic.render('O_Traffic'); </script>
</td></tr>
<tr class="Content O_MapTab_Update" style="display:none">
<td colspan="4"><div id="search">关键字：<input id="O_MapKey" type="text" /><button id="O_MapSearch" type="button">搜索</button></div>
<div id="O_MapUpdate" style="width:600px; height:300px; z-index:100px;"></div>
<div id="containerOver"></div>
X坐标:<span id="O_BaiduX" style="color:#339; text-decoration:underline"><?php echo $baiduMapX; ?></span>
Y坐标:<span id="O_BaiduY" style="color:#339; text-decoration:underline"><?php echo $baiduMapY; ?></span></td></tr>
<tr class="Content O_SeoTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Title(标题)：<br /><input type="checkbox" name="O_TitleUpAll" value="upAllTitle" id="O_TitleUpAll" /><label for="O_TitleUpAll" style="cursor:pointer;">全部KTV</label></td>
<td colspan="3" style="white-space:nowrap;"><textarea name="O_Title" id="O_Title" style="width:410px; height:80px;"><?php echo $title; ?></textarea></td></tr>
<tr class="Content O_SeoTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Keywords(关键字)：<br /><input type="checkbox" name="O_KeywordsUpAll" value="upAllKeywords" id="O_KeywordsUpAll" /><label for="O_KeywordsUpAll" style="cursor:pointer;">全部KTV</label></td>
<td colspan="3" style="white-space:nowrap;"><textarea name="O_Keywords" id="O_Keywords" style="width:410px; height:80px;"><?php echo $keywords; ?></textarea></td></tr>
<tr class="Content O_SeoTab_Update" style="display:none">
<td valign="top" align="right" style="white-space:nowrap; width:130px;">Description(描述)：<br /><input type="checkbox" name="O_DescriptionUpAll" value="upAllDescription" id="O_DescriptionUpAll" /><label for="O_DescriptionUpAll" style="cursor:pointer;">全部KTV</label></td>
<td colspan="3" style="white-space:nowrap;"><textarea name="O_Description" id="O_Description" style="width:410px; height:80px;"><?php echo $description; ?></textarea></td></tr>
</tbody></table>
<?php } ?>