|
- <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>酒店列表信息</title>
- <link rel="stylesheet" type="text/css" href="/monitor/Public/css/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="/monitor/Public/css/style.css" />
- </head>
- <body>
- <div class="panel panel-default" style="width: 1348px;">
- <div class="panel-heading">
- <div class="row">
- <div class="col-sm-10">
- <a class="btn btn-primary btn-sm active" href="/monitor/index.php/Monitor/priceList">极速比价</a>
- </div>
- <div class="col-sm-2">
- <!--<form action="/monitor/index.php/Monitor/monitorImport" enctype="multipart/form-data" method="post">
- <input type="file" name="importFile" style=" float:left" />
- <input type="submit" value="导入" name="import" >
- </form> -->
- <a class="btn btn-primary btn-sm active" href="/monitor/index.php/monitor/monitorAdd">录入</a>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <form class="form-horizontal" action="/monitor/index.php/monitor/monitorList" method="get">
- <div class="form-group">
- <div class="row">
- <label class="col-md-1 control-label">网站:</label>
- <div class="col-md-4">
- <select class="form-control" id="site" name="site_name">
- <?php if(is_array($site)): foreach($site as $key=>$vo): if($site_name == $vo['id']): if(($vo["id"] == 12) OR ($vo["id"] == 19)): ?><option value="<?php echo ($vo["id"]); ?>" selected="selected" ><?php echo ($vo["site_name"]); ?>(开发中)</option>
- <?php else: ?>
- <option value="<?php echo ($vo["id"]); ?>" selected="selected" ><?php echo ($vo["site_name"]); ?></option><?php endif; ?>
- <?php else: ?>
- <?php if(($vo["id"] == 12) OR ($vo["id"] == 19)): ?><option value="<?php echo ($vo["id"]); ?>" ><?php echo ($vo["site_name"]); ?>(开发中)</option>
- <?php else: ?>
- <option value="<?php echo ($vo["id"]); ?>" ><?php echo ($vo["site_name"]); ?></option><?php endif; endif; endforeach; endif; ?>
- </select>
- </div>
- <div class="col-sm-5">
- <label>酒店名称:</label>
- <input type="text" name="hotel_name" class="form-control" style ="display: inline; width: inherit;" placeholder="酒店名称" <?php if(!empty($hotel_name)): ?>value="<?php echo ($hotel_name); ?>"<?php endif; ?>/>
- </div>
- <div class="col-sm-2">
- <button type="submit" class="btn btn-default">查询</button>
- </div>
- </div>
- </div>
- </form>
- <table class="table table-hover" >
- <thead class="navbar-inner">
- <tr>
- <th>ID</th>
- <th>网站名称</th>
- <th>酒店名称</th>
- <th>日期</th>
- <th>房间类型</th>
- <th>价格</th>
- <th>有/无早餐</th>
- <th>编辑</th>
- <th>删除</th>
- </tr>
- </thead>
- <tbody>
- <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
- <td><?php echo ($vo["id"]); ?></td>
- <td><?php echo ($vo["site_name"]); ?></td>
- <td><a href="<?php echo ($vo["url"]); ?>"><?php echo ($vo["hotel_name"]); ?></a></td>
- <td><?php echo ($vo["query_date"]); ?></td>
- <td><?php echo ($vo["room_type"]); ?></td>
- <td><?php echo ($vo["room_price"]); ?></td>
- <?php if(($vo["breakfast"] == 0)): ?><td>无早</td>
- <?php elseif(($vo["breakfast"] == 1)): ?>
- <td>单早</td>
- <?php elseif(($vo["breakfast"] == 2)): ?>
- <td>双早</td>
- <?php elseif(($vo["breakfast"] == 3)): ?>
- <td>三早</td>
- <?php else: ?>
- <td>无早</td><?php endif; ?>
- <td><a href="/monitor/index.php/Monitor/monitorEdit?id=<?php echo ($vo["id"]); ?>">编辑</a></td>
- <td><a onclick="del(<?php echo ($vo["id"]); ?>)">删除</a></td>
- </tr><?php endforeach; endif; ?>
-
- </tbody>
- </table>
- <div ><?php echo ($page); ?></div>
- </div>
- </div>
- </body>
- <script type="text/javascript" src="/monitor/Public/js/json2.js"></script>
- <script type="text/javascript" src="/monitor/Public/js/jquery.1.11.js"></script>
- <script type="text/javascript">
- function del(id){
- var r=confirm("确认删除!")
- if (r==true){
- var geturl='/monitor/index.php/Monitor/monitorDel';
- $.ajax({
- type: 'GET',
- url: geturl,
- data: {
- id: id
- },
- dataType: 'json',
- context: $('body'),
- success: function (data) {
- if(data.errorCode==0){
- location.reload(true);
- }else{
- alert(data.info);
- }
- },
- error: function (xhr, type) {
- var data = $.parseJSON(xhr.responseText);
- alert(data.message);
- }
- });
- }else{
- }
- }
- </script>
- </html>
|