list_firewall_ipset.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-buttons">
  5. <a class="button button-secondary button-back js-button-back" href="/list/firewall/">
  6. <i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
  7. </a>
  8. <a href="/add/firewall/ipset/" class="button button-secondary js-button-create">
  9. <i class="fas fa-circle-plus icon-green"></i><?= _("Add IP list") ?>
  10. </a>
  11. </div>
  12. <div class="toolbar-right">
  13. <form x-data x-bind="BulkEdit" action="/bulk/firewall/ipset/" method="post">
  14. <input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
  15. <select class="form-select" name="action">
  16. <option value=""><?= _("Apply to selected") ?></option>
  17. <option value="delete"><?= _("Delete") ?></option>
  18. </select>
  19. <button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
  20. <i class="fas fa-arrow-right"></i>
  21. </button>
  22. </form>
  23. </div>
  24. </div>
  25. </div>
  26. <!-- End toolbar -->
  27. <div class="container">
  28. <div class="units-table js-units-container">
  29. <div class="units-table-header">
  30. <div class="units-table-cell">
  31. <input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
  32. </div>
  33. <div class="units-table-cell"><?= _("IP List Name") ?></div>
  34. <div class="units-table-cell"></div>
  35. <div class="units-table-cell u-text-center"><?= _("Auto Update") ?></div>
  36. <div class="units-table-cell u-text-center"><?= _("IP Version") ?></div>
  37. <div class="units-table-cell u-text-center"><?= _("Date") ?></div>
  38. <div class="units-table-cell u-text-center"><?= _("Time") ?></div>
  39. </div>
  40. <!-- Begin firewall IP address list item loop -->
  41. <?php foreach ($data as $key => $value) {
  42. $listname = $key; ?>
  43. <div class="units-table-row animate__animated animate__fadeIn js-unit">
  44. <div class="units-table-cell">
  45. <div>
  46. <input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="setname[]" value="<?= $listname ?>">
  47. <label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
  48. </div>
  49. </div>
  50. <div class="units-table-cell u-text-bold">
  51. <span class="u-hide-desktop"><?= _("IP List Name") ?>:</span>
  52. <?= $listname ?>
  53. </div>
  54. <div class="units-table-cell">
  55. <ul class="units-table-row-actions">
  56. <li class="units-table-row-action shortcut-delete" data-key-action="js">
  57. <a
  58. class="units-table-row-action-link data-controls js-confirm-action"
  59. href="/delete/firewall/ipset/?listname=<?= $listname ?>&token=<?= $_SESSION["token"] ?>"
  60. title="<?= _("Delete") ?>"
  61. data-confirm-title="<?= _("Delete") ?>"
  62. data-confirm-message="<?= sprintf(_("Are you sure you want to delete IP list %s?"), $key) ?>"
  63. >
  64. <i class="fas fa-trash icon-red"></i>
  65. <span class="u-hide-desktop"><?= _("Delete") ?></span>
  66. </a>
  67. </li>
  68. </ul>
  69. </div>
  70. <div class="units-table-cell u-text-bold u-text-center-desktop">
  71. <span class="u-hide-desktop"><?= _("Auto Update") ?>:</span>
  72. <?php if ($data[$key]["AUTOUPDATE"] == "no") { ?>
  73. <i class="fas fa-circle-xmark icon-red" title="<?= _("Disabled") ?>"></i>
  74. <?php } else { ?>
  75. <i class="fas fa-circle-check icon-green" title="<?= _("Enabled") ?>"></i>
  76. <?php } ?>
  77. </div>
  78. <div class="units-table-cell u-text-center-desktop">
  79. <span class="u-hide-desktop u-text-bold"><?= _("IP Version") ?>:</span>
  80. <?= _($data[$key]["IP_VERSION"]) ?>
  81. </div>
  82. <div class="units-table-cell u-text-center-desktop">
  83. <span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
  84. <time datetime="<?= _($data[$key]["DATE"]) ?>"><?= _($data[$key]["DATE"]) ?></time>
  85. </div>
  86. <div class="units-table-cell u-text-center-desktop">
  87. <span class="u-hide-desktop u-text-bold"><?= _("Time") ?>:</span>
  88. <?= $data[$key]["TIME"] ?>
  89. </div>
  90. </div>
  91. <?php } ?>
  92. </div>
  93. </div>
  94. <footer class="app-footer">
  95. <div class="container app-footer-inner">
  96. <p>
  97. <?php
  98. if ( $i == 0) {
  99. echo _('There are currently no IP lists defined.');
  100. } else {
  101. printf(ngettext('%d IP list', '%d IP lists', $i),$i);
  102. }
  103. ?>
  104. </p>
  105. </div>
  106. </footer>