list_firewall_ipset.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. <h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("IPset IP Lists") ?></h1>
  29. <div class="units-table js-units-container">
  30. <div class="units-table-header">
  31. <div class="units-table-cell">
  32. <input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
  33. </div>
  34. <div class="units-table-cell"><?= _("IP List Name") ?></div>
  35. <div class="units-table-cell"></div>
  36. <div class="units-table-cell u-text-center"><?= _("Auto Update") ?></div>
  37. <div class="units-table-cell u-text-center"><?= _("IP Version") ?></div>
  38. <div class="units-table-cell u-text-center"><?= _("Date") ?></div>
  39. <div class="units-table-cell u-text-center"><?= _("Time") ?></div>
  40. </div>
  41. <!-- Begin firewall IP address list item loop -->
  42. <?php foreach ($data as $key => $value) {
  43. $listname = $key; ?>
  44. <div class="units-table-row animate__animated animate__fadeIn js-unit">
  45. <div class="units-table-cell">
  46. <div>
  47. <input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="setname[]" value="<?= $listname ?>">
  48. <label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
  49. </div>
  50. </div>
  51. <div class="units-table-cell units-table-heading-cell u-text-bold">
  52. <span class="u-hide-desktop"><?= _("IP List Name") ?>:</span>
  53. <?= $listname ?>
  54. </div>
  55. <div class="units-table-cell">
  56. <ul class="units-table-row-actions">
  57. <li class="units-table-row-action shortcut-delete" data-key-action="js">
  58. <a
  59. class="units-table-row-action-link data-controls js-confirm-action"
  60. href="/delete/firewall/ipset/?listname=<?= $listname ?>&token=<?= $_SESSION["token"] ?>"
  61. title="<?= _("Delete") ?>"
  62. data-confirm-title="<?= _("Delete") ?>"
  63. data-confirm-message="<?= sprintf(_("Are you sure you want to delete IP list %s?"), $key) ?>"
  64. >
  65. <i class="fas fa-trash icon-red"></i>
  66. <span class="u-hide-desktop"><?= _("Delete") ?></span>
  67. </a>
  68. </li>
  69. </ul>
  70. </div>
  71. <div class="units-table-cell u-text-bold u-text-center-desktop">
  72. <span class="u-hide-desktop"><?= _("Auto Update") ?>:</span>
  73. <?php if ($data[$key]["AUTOUPDATE"] == "no") { ?>
  74. <i class="fas fa-circle-xmark icon-red" title="<?= _("Disabled") ?>"></i>
  75. <?php } else { ?>
  76. <i class="fas fa-circle-check icon-green" title="<?= _("Enabled") ?>"></i>
  77. <?php } ?>
  78. </div>
  79. <div class="units-table-cell u-text-center-desktop">
  80. <span class="u-hide-desktop u-text-bold"><?= _("IP Version") ?>:</span>
  81. <?= _($data[$key]["IP_VERSION"]) ?>
  82. </div>
  83. <div class="units-table-cell u-text-center-desktop">
  84. <span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
  85. <time datetime="<?= _($data[$key]["DATE"]) ?>"><?= _($data[$key]["DATE"]) ?></time>
  86. </div>
  87. <div class="units-table-cell u-text-center-desktop">
  88. <span class="u-hide-desktop u-text-bold"><?= _("Time") ?>:</span>
  89. <?= $data[$key]["TIME"] ?>
  90. </div>
  91. </div>
  92. <?php } ?>
  93. </div>
  94. </div>
  95. <footer class="app-footer">
  96. <div class="container app-footer-inner">
  97. <p>
  98. <?php
  99. if ( $i == 0) {
  100. echo _('There are currently no IP lists defined.');
  101. } else {
  102. printf(ngettext('%d IP list', '%d IP lists', $i),$i);
  103. }
  104. ?>
  105. </p>
  106. </div>
  107. </footer>