admin_orders.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php include 'admin_header.php'; ?>
  2. <div class="content-wrapper">
  3. <section class="content-header">
  4. <h1>
  5. <?=lang::_('Orders')?>
  6. <small><?=lang::_('Manage orders')?></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::_('Orders')?></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::_('Orders list')?></h3>
  17. </div>
  18. <div class="box-body" style="overflow-x: auto;">
  19. <div class="row" style="margin-bottom: 15px;">
  20. <div class="col-lg-3 col-md-4 col-sm-6">
  21. <label for="hotelFilter"><?=lang::_('Hotel')?></label>
  22. <select id="hotelFilter" class="form-control">
  23. <option value=""><?=lang::_('All')?></option>
  24. <?php foreach ($hotels as $hotel) : ?>
  25. <option value="<?=htmlspecialchars($hotel['value'])?>"><?=htmlspecialchars($hotel['value'])?></option>
  26. <?php endforeach; ?>
  27. </select>
  28. </div>
  29. </div>
  30. <div class="row" style="min-width: 100%"><div class="col-lg-12">
  31. <table class="table table-bordered table-hover dataTable table-striped data-list">
  32. <thead>
  33. <tr>
  34. <th><?=lang::_('Date')?></th>
  35. <th><?=lang::_('Order ID')?></th>
  36. <th><?=lang::_('Hotel')?></th>
  37. <th><?=lang::_('Sales')?></th>
  38. <th><?=lang::_('First name')?></th>
  39. <th><?=lang::_('Last name')?></th>
  40. <th><?=lang::_('Email')?></th>
  41. <th><?=lang::_('Phone')?></th>
  42. <th><?=lang::_('Country')?></th>
  43. <th><?=lang::_('City')?></th>
  44. <th><?=lang::_('ZIP')?></th>
  45. <th><?=lang::_('Street')?></th>
  46. <th><?=lang::_('House number')?></th>
  47. <th><?=lang::_('Transaction ID')?></th>
  48. <th><?=lang::_('Status')?></th>
  49. <th><?=lang::_('Error code')?></th>
  50. <th><?=lang::_('Error message')?></th>
  51. <th><?=lang::_('IP')?></th>
  52. <th><?=lang::_('Browser')?></th>
  53. <th>&nbsp;</th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. <?php foreach ($orders as $order) : ?>
  58. <tr>
  59. <td><?=$order->order_date?></td>
  60. <td><?=$order->order_uuid?></td>
  61. <td><?php if ($order->order_hotel !== 'undefined' && $order->order_hotel !== '0') echo $order->order_hotel; ?></td>
  62. <td><?=$order->order_sales?></td>
  63. <td><?=$order->order_customer_fname?></td>
  64. <td><?=$order->order_customer_lname?></td>
  65. <td><?=$order->order_customer_email?></td>
  66. <td><?=$order->order_customer_phone?></td>
  67. <td><?=$order->order_customer_country?></td>
  68. <td><?=$order->order_customer_city?></td>
  69. <td><?=$order->order_customer_zip?></td>
  70. <td><?=$order->order_customer_street?></td>
  71. <td><?=$order->order_customer_house?></td>
  72. <td id="transid_<?=$order->order_id?>">
  73. <?php if (empty($order->order_transaction_id)) : ?>
  74. <button type="button" onclick="reloadOrderStatus('<?=$order->order_id?>','<?=$order->order_uuid?>');" class="btn btn-flat btn-danger btn-sm"><i class="fa fa-refresh"></i> Check</button>
  75. <?php else : ?>
  76. <?=$order->order_transaction_id?>
  77. <?php endif; ?>
  78. </td>
  79. <td id="status_<?=$order->order_id?>">
  80. <?php if (empty($order->order_auth_code) || $order->order_auth_code == 'X') : ?>
  81. <button type="button" onclick="reloadOrderStatus('<?=$order->order_id?>','<?=$order->order_uuid?>');" class="btn btn-flat btn-danger btn-sm"><i class="fa fa-refresh"></i> Check</button>
  82. <?php else : ?>
  83. <?=$order->order_auth_code?>
  84. <?php endif; ?>
  85. </td>
  86. <td id="errorcode_<?=$order->order_id?>"><?=$order->order_error_code?></td>
  87. <td id="errormsg_<?=$order->order_id?>"><?=$order->order_error_message?></td>
  88. <td><?=$order->order_customer_ip?></td>
  89. <td><?=$order->order_customer_browser?></td>
  90. <td>
  91. <?php if ($order->order_auth_code=='FINISHED') : ?>
  92. <button title="Printable QR codes" type="button" onclick="window.open('/admin/qrcodes/<?=$order->order_uuid?>');" class="btn btn-flat btn-success" style=""><i class="fa fa-qrcode"></i></button>
  93. <?php endif; ?>
  94. </td>
  95. </tr>
  96. <?php endforeach; ?>
  97. </tbody>
  98. </table>
  99. </div></div>
  100. </div>
  101. </div>
  102. </section>
  103. </div>
  104. <?php include 'admin_footer.php'; ?>