index.php 671 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. ob_start();
  5. session_start();
  6. // Main include
  7. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  8. // Check user
  9. if ($_SESSION['user'] != 'admin') {
  10. header("Location: /list/user");
  11. exit;
  12. }
  13. if ((!empty($_GET['ip'])) && (!empty($_GET['chain']))) {
  14. $v_ip = escapeshellarg($_GET['ip']);
  15. $v_chain = escapeshellarg($_GET['chain']);
  16. exec (VESTA_CMD."v-delete-firewall-ban ".$v_ip." ".$v_chain, $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/banlist/");
  26. exit;