<?php if(!class_exists('Template')) die('Access Denied'); $this->tpl->check('ktv_room.html', '048da82ac4d7a868b5d35588fb1f2791', 1362484491); ?>
<?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="<?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="<?php echo MY_THEMEDIR; ?>js/ktv/roomList.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">房间列表</div>
<div class="right">
<input type="hidden" id="O_Type" value="list"/>
<input type="hidden" id="currentStatus" />
<select id="areaDrop" style="margin-right:3px">
<option value="">==行政区==</option>
<?php if(is_array($area)) foreach($area as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
<select id="hotelDrop" style="margin-right:3px">
<option value="">==KTV==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>

</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_room'); ?>
</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="<?php echo MY_THEMEDIR; ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo MY_THEMEDIR; ?>js/ktv/roomAdd.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">
<h2>房间添加</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 colspan="3">
<select id="areaDrop" style="margin-right:3px">
<option value="">==行政区==</option>
<?php if(is_array($area)) foreach($area as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
<select id="hotelDrop" style="margin-right:3px">
<option value="">==KTV==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
<span class="red">*</span>
KTV搜索：<input id="searchKey" type="text" style="width:230px;" />&nbsp;
<button id="O_SearchBtn" class="searchbutton" type="button">快捷搜索</button>
<div id="auto" class="auto" style="display:none;"></div>
<iframe id="autoF" class="auto" style="display:none;"></iframe>
<span id="O_Flush" style="float:right;font-size:14px;margin-top:-23px;margin-right:10px;">加载中...</span></td>
</tr>
<tr>
<td style="text-align:center">房间名称:</td>
<td style="width:35%;"><input id="O_Name" type="text" class="common_txt" /> <span class="red">*</span></td>
<td style="width:15%;text-align:center">房间面积:</td>
<td style="width:35%;"><input id="O_Size" type="text" class="common_txt" /> <span class="red">*</span>(请填正整数)</td>
</tr>
<tr>
<td style="text-align:center">可容纳人数:</td>
<td><input id="O_seating" type="text" class="common_txt" /></td>

<td style="text-align:center">房间数:</td>
<td><input id="O_room_count" type="text" class="common_txt" /></td>

</tr>

<tr>
<td style="text-align:center">最低消费:</td>
<td><input id="O_min_price" type="text" class="common_txt" /></td>

<td style="text-align:center">优惠:</td>
<td><input id="O_discount" type="text" class="common_txt" /></td>

</tr>

<tr>
<td style="text-align:center">房间介绍:</td>
<td colspan="3">
<textarea name="O_Remark" id="O_Remark" cols="80" rows="5"></textarea>
<!--<script type="text/javascript">CKEDITOR.replace( 'O_Remark' );</script>-->
</td>
</tr>
<tr>
<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') { ?>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr>
<td align="right">所属KTV：</td>
<td colspan="3"><?php if($hotelName=='') { ?><span style="color:#999999">查找不到所属KTV</span><?php } elseif ($hotelIsdel==1) { ?><span style="color:#999999"><?php echo $hotelName; ?>（已删除）</span><?php } else { ?><strong><?php echo $hotelName; ?></strong><?php } ?></td></tr>
<tr>
<td style="width:15%; white-space:nowrap" align="right">房间名称：</td>
<td style="width:35%; white-space:nowrap"><?php echo $name; ?></td>
<td style="width:15%; white-space:nowrap" align="right">房间面积：</td>
<td style="width:35%; white-space:nowrap"><?php echo $size; ?></td></tr>

<td align="right">房间介绍：</td>
<td colspan="3"><?php echo $remark; ?></td></tr>
<tr>
<td align="right">当前状态：</td>
<td colspan="3"><span class="f_14b_f00"><?php echo $status; ?></span></td></tr>
</tbody></table>
<?php } elseif ($action=='update') { ?>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr>
<td align="right">所属KTV：</td>
<td colspan="3"><?php if($hotelName=='') { ?><span style="color:#999999">查找不到所属KTV</span><?php } elseif ($hotelIsdel==1) { ?><span style="color:#999999"><?php echo $hotelName; ?>（已删除）</span><?php } else { ?><strong><?php echo $hotelName; ?></strong><?php } ?></td></tr>
<tr>
<td style="width:15%; white-space:nowrap" align="right">房间名称：</td>
<td style="width:35%; white-space:nowrap"><input id="O_Name" type="text" class="common_txt" value="<?php echo $name; ?>" /></td>
</tr>


<tr>
<td style="width:15%; white-space:nowrap" align="right">房间面积：</td>
<td style="width:35%; white-space:nowrap"><input id="O_Size" type="text" class="common_txt" value="<?php echo $size; ?>" style="width:150px;" /> <span class="red">*</span></td>
<td style="width:15%; white-space:nowrap" align="right">可容纳人数：</td>
<td style="width:35%; white-space:nowrap"><input id="O_Seating" type="text" class="common_txt" value="<?php echo $seating; ?>" style="width:150px;" /> <span class="red">*</span></td></tr>

<tr>

<tr>
<td style="width:15%; white-space:nowrap" align="right">最低消费：</td>
<td style="width:35%; white-space:nowrap"><input id="O_min_price" type="text" class="common_txt" value="<?php echo $min_price; ?>" style="width:150px;" /> <span class="red">*</span></td>
<td style="width:15%; white-space:nowrap" align="right">优惠：</td>
<td style="width:35%; white-space:nowrap"><input id="O_discount" type="text" class="common_txt" value="<?php echo $discount; ?>" style="width:150px;" /> <span class="red">*</span></td></tr>

<td align="right">房间介绍：</td>
<td colspan="3"><textarea name="O_Remark" id="O_Remark" cols="80" rows="5"><?php echo $remark; ?></textarea></td></tr>
<tr>
<td align="right">当前状态：</td>
<td colspan="3"><input id="O_ID" type="hidden" value="<?php echo $id; ?>" /><span class="f_14b_f00"><?php echo $status; ?></span></td></tr>
</tbody></table>


<?php } elseif ($action=='times_update') { ?>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>



<tr>
<td style="width:15%; white-space:nowrap" align="right">KTV名称：</td>
	<td style="width:15%; white-space:nowrap" align="left" >
	<select id="areaDrop" style="margin-right:3px" onchange="get_hotel(this.value)">
	<option value="">==行政区==</option>
	<?php if(is_array($area)) foreach($area as $v) { ?>
		<?php if($edit['areaId'] == $v['id']) { ?>
			<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>
	<select id="hotelDrop" style="margin-right:3px">
	
	<option value="">==KTV==</option>
	
	<?php if($edit['KtvName'] != '') { ?>
			<option value="<?php echo $edit['hotelId']; ?>" selected="selected"><?php echo $edit['KtvName']; ?></option>
		<?php } ?>
		
	<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
	<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
	<?php } ?>
	</select>
	</td>
</tr>

<Tr>
<td style="width:15%; white-space:nowrap" align="right">时间段名称：</td>
<td style="width:35%; white-space:nowrap"><input id="O_Name" type="text" class="common_txt" value="<?php echo $edit['name']; ?>" /></td>

</tr>


<tr>
<td style="width:15%; white-space:nowrap" align="right">开始时间：</td>
<td style="width:35%; white-space:nowrap"><input id="O_Begin" type="text" class="common_txt" value="<?php echo $edit['begin_time']; ?>" style="width:150px;" /> <span class="red">*</span></td>
<td style="width:15%; white-space:nowrap" align="right">结束时间：</td>
<td style="width:35%; white-space:nowrap"><input id="O_End" type="text" class="common_txt" value="<?php echo $edit['end_time']; ?>" style="width:150px;" /> <span class="red">*</span></td>
<td></td>
</tr>

</tbody></table>
<input id="O_ID" type="hidden" value="<?php echo $edit['id']; ?>" />

<?php } elseif ($action=='price') { ?>
<!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="<?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="<?php echo MY_THEMEDIR; ?>js/ktv/roomPriceList.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">房间价格管理</div>
<div class="right">
<input type="hidden" id="O_Type" value="list"/>
<input type="hidden" id="currentStatus" />
</div></div>
<div class="todayinfoListTop">
<div class="todayinfo1" style="white-space:nowrap;">
<div>KTV筛选：<select id="areaDrop" style="margin-right:3px">
<option value="">==行政区==</option>
<?php if(is_array($area)) foreach($area as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
<select id="hotelDrop" style="margin-right:3px">
<option value="">==KTV==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
KTV搜索：<input id="searchKey" type="text" style="width:230px;" />&nbsp;
<div id="auto" class="auto" style="display:none; border:1px solid c"></div>
<iframe id="autoF" class="auto" style="display:none;"></iframe>



&nbsp;<button id="O_GetPriceBtn" class="searchbutton" type="button" onclick="loadPrice()">加载列表</button>
</div></div></div>

<span id="mainlist"></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_update'); ?>
</body>
</html>


<?php } elseif ($action=='edit_price') { ?>
<form  id="edit_price" name="edit_price" >
<?php if($price != NULL) { ?>
	
<?php if(is_array($price)) foreach($price as $k => $v) { ?>
		<table>
		<tr>
			<Td>普通价：</Td>
			<td><input type="text" id="name-<?php echo $k; ?>"  name="name-<?php echo $k; ?>"  readonly=""  value="<?php echo $v['name']; ?>" /></td>
			<td><select id="begin-time-<?php echo $k; ?>" name="begin-time-<?php echo $k; ?>"><option value="<?php echo $v['begin_time']; ?>"><?php echo $v['begin_time']; ?></option>
			
<?php if(is_array($times)) foreach($times as $time_k => $time_v) { ?>
			<option value="<?php echo $time_v; ?>"><?php echo $time_v; ?></option>
		<?php } ?>
			</select>点 至</td>
			<td>
			<select id="end-time-<?php echo $k; ?>" name="end-time-0"><option value="<?php echo $v['end_time']; ?>"><?php echo $v['end_time']; ?></option>
				
<?php if(is_array($times)) foreach($times as $time_k => $time_v) { ?>
			<option value="<?php echo $time_v; ?>"><?php echo $time_v; ?></option>
		<?php } ?>
			</select>点</td>
			<td><?php echo $v['price']; ?>钱/小时</td>
			<td colspan="6"  align="right" style=" color:#FF0000; font-size:14px; font-weight:bold; cursor:pointer"><?php if($k == 0 ) { } else { ?>&nbsp;<?php } ?>				</td>
		</tr>
		
		<tr>
			<td>会员价：</td>
			<td><input type="text" id="name-<?php echo $k; ?>"  name="name-<?php echo $k; ?>"  readonly=""  value="<?php echo $v['name']; ?>" /></td>
			<td><select id="begin-time-<?php echo $k; ?>" name="begin-time-<?php echo $k; ?>"><option value="<?php echo $v['begin_time']; ?>"><?php echo $v['begin_time']; ?></option>
			
<?php if(is_array($times)) foreach($times as $time_k => $time_v) { ?>
			<option value="<?php echo $time_v; ?>"><?php echo $time_v; ?></option>
		<?php } ?>
			</select>点 至</td>
			<td>
			<select id="end-time-<?php echo $k; ?>" name="end-time-0"><option value="<?php echo $v['end_time']; ?>"><?php echo $v['end_time']; ?></option>
				
<?php if(is_array($times)) foreach($times as $time_k => $time_v) { ?>
			<option value="<?php echo $time_v; ?>"><?php echo $time_v; ?></option>
		<?php } ?>
			</select>点</td>
			<td><?php echo $v['price']; ?>钱/小时</td>
			<td colspan="6"  align="right" style=" color:#FF0000; font-size:14px; font-weight:bold; cursor:pointer"><?php if($k == 0 ) { } else { ?>&nbsp;<?php } ?>				</td>
		</tr>
		
		
		</table>
		
		<input type="hidden" id="id-<?php echo $k; ?>" name="id-<?php echo $k; ?>" value="<?php echo $v['roomId'] ? $v['roomId'] : 0 ?>" />
		<input type="hidden" id="id-count" name="id-count" value="<?php echo count($price); ?>" />
	<?php } } else { ?>	

<table>

	<tr>
		<Td>普通价：</Td>
		<td><input type="text" id="name-0"  name="name-0" value="<?php echo $info['name']; ?>" readonly="" /></td>
		<td><select id="begin-time-0" name="begin-time-0">
		<option value="<?php echo $info['begin']; ?>"><?php echo $info['begin']; ?></option>
	
		
		</select>点 至</td>
		<td><select id="end-time-0" name="end-time-0">
			<option value="<?php echo $info['end']; ?>"><?php echo $info['end']; ?></option>
		</select>点</td>
		<td><input id="price-0" name="price-0" value="" type="text" />钱/小时</td>
		<td colspan="6"  align="right" style=" color:#FF0000; font-size:14px; font-weight:bold; cursor:pointer" ><?php if($k == 0 ) { ?>&nbsp;<?php } else { ?>&nbsp;<?php } ?></td>
	</tr>
	
	
	
	<tr>
		<Td>会员价：</Td>
		<td><input type="text" id="member-0"  name="member-0" value="<?php echo $info['name']; ?>" readonly="" /></td>
		<td><select id="member_begin-time-0" name="member_begin-time-0">
		<option value="<?php echo $info['begin']; ?>"><?php echo $info['begin']; ?></option>
	
		
		</select>点 至</td>
		<td><select id="member-end-time-0" name="member-end-time-0">
			<option value="<?php echo $info['end']; ?>"><?php echo $info['end']; ?></option>
		</select>点</td>
		<td><input id="member-price-0" name="member-price-0" value="" type="text" />钱/小时</td>
		<td colspan="6"  align="right" style=" color:#FF0000; font-size:14px; font-weight:bold; cursor:pointer" ><?php if($k == 0 ) { ?>&nbsp;<?php } else { ?>&nbsp;<?php } ?></td>
	</tr>
	
	<tr>
		<Td colspan="8">
		
			
<?php if(is_array($weeks)) foreach($weeks as $wk => $wv) { ?>
					<?php if($week == $wv) { ?>
					<input name="weeks" type="checkbox" value="<?php echo $wv; ?>"  checked="checked"/><?php echo $wv; ?>
					<?php } else { ?>
					<input name="weeks" type="checkbox" value="<?php echo $wv; ?>" /><?php echo $wv; ?>
					<?php } ?>
			<?php } ?>
		</Td>
	</tr>
		
</table>
		<input type="hidden" id="id-0" name="id-0" value="0" />
		<input type="hidden" id="id-count" name="id-count" value="0" />
<?php } ?>


</form>

<?php } elseif ($action=='dict') { ?>

<table cellSpacing="0" cellPadding="0" style="width:566px" border="0">
<tbody>
<tr style="font-weight:700;">
<td style="width:15%; white-space:nowrap; text-align:center;">房型/时间</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期一</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期二</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期三</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期四</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期五</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期六</td>
<td style="width:15%; white-space:nowrap; text-align:center;">星期日</td>



<td style="width:10%; white-space:nowrap; text-align:center;">操作</td>
</tr>

<?php if(is_array($dict)) foreach($dict as $k => $v) { ?>
<tr id="O_DictRow_<?php echo $k; ?>" class="dictrow"<?php if($v['week']=='星期五' || $v['week']=='星期六') { ?> style="background-color:#ffc;"<?php } ?>>
<td style="white-space:nowrap; text-align:center;"><span id="O_Week_<?php echo $k; ?>"><?php echo $v['week']; ?></span></td>
<td style="white-space:nowrap; text-align:center;">市场价 <input id="O_MarketPrice_<?php echo $k; ?>" class="marketPrice" value="<?php echo $v['marketPrice']; ?>" style="width:60%;" /></td>
<td style="white-space:nowrap; text-align:center;">成本价 <input id="O_CostPrice_<?php echo $k; ?>" class="costPrice" value="<?php echo $v['costPrice']; ?>" style="width:60%;" /></td>
<td style="white-space:nowrap; text-align:center;">网内价 <input id="O_Price_<?php echo $k; ?>" class="price" value="<?php echo $v['price']; ?>" style="width:60%;" /></td>
<td style="white-space:nowrap; text-align:center;"><a class="viewmode" id="o_<?php echo $k; ?>" onclick="updateDict(this);">更新</a></td>
</tr>
<?php } ?>
</tbody></table>
<input id="O_RoomId" value="662" type="hidden" />
<?php } ?>