index.php 642 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. error_reporting(null);
  3. ob_start();
  4. session_start();
  5. // Main include
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. // Check user
  8. if ($_SESSION['userContext'] != 'admin') {
  9. header("Location: /list/user");
  10. exit;
  11. }
  12. // Check token
  13. verify_csrf($_GET);
  14. if (!empty($_GET['listname'])) {
  15. $v_listname = $_GET['listname'];
  16. exec(HESTIA_CMD."v-delete-firewall-ipset ".escapeshellarg($v_listname), $output, $return_var);
  17. }
  18. check_return_code($return_var, $output);
  19. unset($output);
  20. $back = $_SESSION['back'];
  21. if (!empty($back)) {
  22. header("Location: ".$back);
  23. exit;
  24. }
  25. header("Location: /list/firewall/ipset/");
  26. exit;