You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

123 lines
4.6 KiB

  1. <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>酒店列表信息</title>
  6. <link rel="stylesheet" type="text/css" href="/monitor/Public/css/bootstrap.min.css" />
  7. <link rel="stylesheet" type="text/css" href="/monitor/Public/css/style.css" />
  8. </head>
  9. <body>
  10. <div class="panel panel-default" style="width: 1348px;">
  11. <div class="panel-heading">
  12. <div class="row">
  13. <div class="col-sm-10">
  14. <a class="btn btn-primary btn-sm active" href="/monitor/index.php/Monitor/priceList">极速比价</a>
  15. </div>
  16. <div class="col-sm-2">
  17. <!--<form action="/monitor/index.php/Monitor/monitorImport" enctype="multipart/form-data" method="post">
  18. <input type="file" name="importFile" style=" float:left" />
  19. <input type="submit" value="导入" name="import" >
  20. </form> -->
  21. <a class="btn btn-primary btn-sm active" href="/monitor/index.php/monitor/monitorAdd">录入</a>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="panel-body">
  26. <form class="form-horizontal" action="/monitor/index.php/monitor/monitorList" method="get">
  27. <div class="form-group">
  28. <div class="row">
  29. <label class="col-md-1 control-label">网站:</label>
  30. <div class="col-md-4">
  31. <select class="form-control" id="site" name="site_name">
  32. <?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>
  33. <?php else: ?>
  34. <option value="<?php echo ($vo["id"]); ?>" selected="selected" ><?php echo ($vo["site_name"]); ?></option><?php endif; ?>
  35. <?php else: ?>
  36. <?php if(($vo["id"] == 12) OR ($vo["id"] == 19)): ?><option value="<?php echo ($vo["id"]); ?>" ><?php echo ($vo["site_name"]); ?>(开发中)</option>
  37. <?php else: ?>
  38. <option value="<?php echo ($vo["id"]); ?>" ><?php echo ($vo["site_name"]); ?></option><?php endif; endif; endforeach; endif; ?>
  39. </select>
  40. </div>
  41. <div class="col-sm-5">
  42. <label>酒店名称:</label>
  43. <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; ?>/>
  44. </div>
  45. <div class="col-sm-2">
  46. <button type="submit" class="btn btn-default">查询</button>
  47. </div>
  48. </div>
  49. </div>
  50. </form>
  51. <table class="table table-hover" >
  52. <thead class="navbar-inner">
  53. <tr>
  54. <th>ID</th>
  55. <th>网站名称</th>
  56. <th>酒店名称</th>
  57. <th>日期</th>
  58. <th>房间类型</th>
  59. <th>价格</th>
  60. <th>有/无早餐</th>
  61. <th>编辑</th>
  62. <th>删除</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
  67. <td><?php echo ($vo["id"]); ?></td>
  68. <td><?php echo ($vo["site_name"]); ?></td>
  69. <td><a href="<?php echo ($vo["url"]); ?>"><?php echo ($vo["hotel_name"]); ?></a></td>
  70. <td><?php echo ($vo["query_date"]); ?></td>
  71. <td><?php echo ($vo["room_type"]); ?></td>
  72. <td><?php echo ($vo["room_price"]); ?></td>
  73. <?php if(($vo["breakfast"] == 0)): ?><td>无早</td>
  74. <?php elseif(($vo["breakfast"] == 1)): ?>
  75. <td>单早</td>
  76. <?php elseif(($vo["breakfast"] == 2)): ?>
  77. <td>双早</td>
  78. <?php elseif(($vo["breakfast"] == 3)): ?>
  79. <td>三早</td>
  80. <?php else: ?>
  81. <td>无早</td><?php endif; ?>
  82. <td><a href="/monitor/index.php/Monitor/monitorEdit?id=<?php echo ($vo["id"]); ?>">编辑</a></td>
  83. <td><a onclick="del(<?php echo ($vo["id"]); ?>)">删除</a></td>
  84. </tr><?php endforeach; endif; ?>
  85. </tbody>
  86. </table>
  87. <div ><?php echo ($page); ?></div>
  88. </div>
  89. </div>
  90. </body>
  91. <script type="text/javascript" src="/monitor/Public/js/json2.js"></script>
  92. <script type="text/javascript" src="/monitor/Public/js/jquery.1.11.js"></script>
  93. <script type="text/javascript">
  94. function del(id){
  95. var r=confirm("确认删除!")
  96. if (r==true){
  97. var geturl='/monitor/index.php/Monitor/monitorDel';
  98. $.ajax({
  99. type: 'GET',
  100. url: geturl,
  101. data: {
  102. id: id
  103. },
  104. dataType: 'json',
  105. context: $('body'),
  106. success: function (data) {
  107. if(data.errorCode==0){
  108. location.reload(true);
  109. }else{
  110. alert(data.info);
  111. }
  112. },
  113. error: function (xhr, type) {
  114. var data = $.parseJSON(xhr.responseText);
  115. alert(data.message);
  116. }
  117. });
  118. }else{
  119. }
  120. }
  121. </script>
  122. </html>