monitoring_view.php 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php include 'admin_header.php'; ?>
  2. <div class="content-wrapper">
  3. <section class="content-header">
  4. <h1>
  5. <?=lang::_('QR codes')?>
  6. <small><?=lang::_('Hotel QR codes')?></small>
  7. </h1>
  8. <ol class="breadcrumb">
  9. <li><a href="/admin"><i class="fa fa-users"></i> <?=lang::_('Admin')?></a></li>
  10. <li class="active"><?=lang::_('Hotel QR codes')?></li>
  11. </ol>
  12. </section>
  13. <section class="content">
  14. <div class="box box-info">
  15. <div class="box-header with-border">
  16. <h3 class="box-title"><?=lang::_('Hotel QR codes')?></h3>
  17. <div class="box-tools pull-right">
  18. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  19. </div>
  20. </div>
  21. <div class="box-body">
  22. <div class="row">
  23. <table class="table table-bordered table-hover dataTable table-striped data-list">
  24. <thead>
  25. <tr>
  26. <th><?=lang::_('Hotel name')?></th>
  27. <th><?=lang::_('Hotel URL')?></th>
  28. <th><?=lang::_('Partner')?></th>
  29. <th>&nbsp;</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <?php
  34. if ($_SESSION['admin_user']->admin_dashboard != '' && $_SESSION['admin_user']->admin_dashboard != 'N;') {
  35. $avaiableHotels = unserialize($_SESSION['admin_user']->admin_dashboard);
  36. if ($avaiableHotels === false) {
  37. $avaiableHotels = [];
  38. }
  39. foreach ($hotels as $hotel) {
  40. if (in_array($hotel['key'], $avaiableHotels)) {
  41. $filteredHotels[] = $hotel;
  42. }
  43. }
  44. $hotels = $filteredHotels;
  45. }
  46. else {
  47. $avaiableHotels = [];
  48. }
  49. ?>
  50. <?php foreach ($hotels as $hotel) : ?>
  51. <tr>
  52. <td><?=$hotel['value']?></td>
  53. <td>https://citywebshop.hu/hotel/<?=$hotel['key']?></td>
  54. <td><?=$hotel['partner'] == '1' ? 'contracted' : ''?></td>
  55. <td>
  56. <button type="button" onclick="window.open('/qrcode.php?s=qr&d=https://citywebshop.hu/hotel/<?=$hotel['key']?>&sf=8')" class="btn btn-flat btn-xs btn-success"><i class="fa fa-qrcode"></i></button>
  57. </td>
  58. </tr>
  59. <?php endforeach; ?>
  60. </tbody>
  61. <tfoot>
  62. <tr>
  63. <th><?=lang::_('Hotel name')?></th>
  64. <th><?=lang::_('Hotel URL')?></th>
  65. <th><?=lang::_('Partner')?></th>
  66. <th>&nbsp;</th>
  67. </tr>
  68. </tfoot>
  69. </table>
  70. </div>
  71. </div>
  72. </div>
  73. </section>
  74. </div>
  75. <?php include 'admin_footer.php'; ?>