<?php if(!class_exists('Template')) die('Access Denied'); $this->tpl->check('photo.html', '2f9a8a2c7c445e312da69fb56e265b7b', 1353315661); ?>
<?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>酒店预订网管理系统</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/jquery.form.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/hotel/photoList.js"></script>
<style type="text/css">
.photoRow { width:815px; margin-bottom:1px; clear:both; }
.photoRow .itemPhoto { text-align:center; font-size:12px; color:#000; float:left; padding-left:3px; margin-top:1px; margin-left:1px;/*margin-right:1px;*/ width:129px; height:180px; line-height:16px; background-color:#fff; border:1px solid #ccc; white-space:nowrap; cursor:pointer; }
.photoRow .itemPhoto.on { background-color:#FFFFD6; }
.photoRow .itemPhoto.ondel { background-color:#ccc; }
.photoRow .itemPhoto .photo { width:120px; height:78px; margin-top:5px; color:#019C42; }
.photoRow .itemPhoto .opt { margin-top:5px; color:#000; text-align:center; width:124px; overflow:hidden; }

.item, .itemFrame { clear:both; width:450px; height:25px; overflow:hidden; }
</style>
</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_hotel'); ?>
</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;width:150px; ">
<option value="">==酒店==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
客房：<select id="roomDrop" style="margin-right:3px;width:100px;">
<option value="0">==客房==</option>
<?php if(is_array($room)) foreach($room as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select>
酒店搜索：<input id="searchKey" type="text" style="width:80px;" />&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>
</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_photo'); ?>
</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') { ?>
<form id="O_UploadForm" method="post" enctype="multipart/form-data" action="<?php echo DOMAIN; echo ROOT; ?>?m=admin/photo.uploadHandle">
<input name="categoryName" type="hidden" value="hotel" />
<input id="content" name="content" type="hidden" />
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr>
<td align="right">选择图片：</td>
<td colspan="3"><input type="file" name="photo" size="45" /></td></tr>
<tr>
<td align="right" style="width:15%; white-space:nowrap;">所属酒店：</td>
<td style="width:35%; white-space:nowrap;">
<select style="width:200px; margin-right:3px;" id="O_HotelDrop_Photo" name="categoryRelId">
<option value="0">==酒店==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
<?php } ?>
</select></td>
<td align="right" style="width:15%; white-space:nowrap;">所属客房：</td>
<td style="width:35%; white-space:nowrap;">
<select style="width:200px; margin-right:3px;" id="O_RoomDrop_Photo" name="typeRelId">
<option value="0">==客房==</option>
</select></td></tr>
<tr>
<td align="right">图片说明：</td>
<td colspan="3"><input id="O_Content" type="text" class="common_txt" style="width:420px;" /></td></tr>
<tr>
<td align="right">当前状态：</td>
<td colspan="3"><input type="radio" name="status" value="待审核" id="O_Status_0" checked /><label for="O_Status_0" style="cursor:pointer;">待审核</label> <input type="radio" name="status" value="已审核" id="O_Status_1" /><label for="O_Status_1" style="cursor:pointer;">已审核</label></td></tr>
</tbody></table>
</form>
<?php } elseif ($action=='update') { ?>
<table cellSpacing="0" cellPadding="0" width="566px" border="0">
<tbody>
<tr>
<td align="right">图片浏览：</td>
<td colspan="3"><img src="<?php echo DOMAIN; echo ROOT; ?>?Compression.php?img=upload/<?php echo $categoryName; ?>/<?php echo $name; ?>&width=200&height=150" width="200" height="150" /></td></tr>
<tr>
<td align="right" style="width:15%; white-space:nowrap;">图片名称：</td>
<td style="width:35%; white-space:nowrap;"><?php echo $name; ?></td>
<td align="right" style="width:15%; white-space:nowrap;">图片尺寸：</td>
<td style="width:35%; white-space:nowrap;"><?php echo $width; ?>×<?php echo $height; ?></td></tr>
<tr>
<td align="right">所属酒店：</td>
<td>
<select style="width:200px; margin-right:3px;" id="O_HotelDrop_Photo">
<option value="0">==酒店==</option>
<?php if(is_array($hotel)) foreach($hotel as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$categoryRelId) { ?> selected="selected"<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select></td>
<td align="right">所属客房：</td>
<td>
<select style="width:200px; margin-right:3px;" id="O_RoomDrop_Photo">
<option value="0">==客房==</option>
<?php if(is_array($room)) foreach($room as $v) { ?>
<option value="<?php echo $v['id']; ?>"<?php if($v['id']==$typeRelId) { ?> selected="selected"<?php } ?>><?php echo $v['name']; ?></option>
<?php } ?>
</select></td></tr>
<tr>
<td align="right">图片说明：</td>
<td colspan="3"><input id="O_Content" type="text" class="common_txt" style="width:420px;" value="<?php echo $content; ?>" /></td></tr>
<tr>
<td align="right"><?php if($uploader=='admin') { ?>管理员<?php } elseif ($memberType!='') { echo $memberType; } else { ?>会员<?php } ?>：</td>
<td colspan="3"><?php if($uploader=='admin') { if($adminAccount=='') { ?><span style="color:#999999">查找不到所属管理员</span><?php } elseif ($adminIsdel==1) { ?><span style="color:#999999"><?php echo $adminName; ?>&lt;<?php echo $adminAccount; ?>&gt;（已删除）</span><?php } else { echo $adminName; ?>&lt;<?php echo $adminAccount; ?>&gt;<?php } } else { if($memberAccount=='') { ?><span style="color:#999999">查找不到所属会员</span><?php } elseif ($memberIsdel==1) { ?><span style="color:#999999"><?php echo $memberName; ?>&lt;<?php echo $memberAccount; ?>&gt;（已删除）</span><?php } else { echo $memberName; ?>&lt;<?php echo $memberAccount; ?>&gt;<?php } } ?></td></tr>
<tr>
<td align="right">当前状态：</td>
<td colspan="3"><span class="f_14b_f00"><?php echo $status; ?></span><input id="O_ID" type="hidden" value="<?php echo $id; ?>" /></td></tr>
</tbody></table>
<?php } ?>