index.php 582 B

123456789101112131415161718192021222324252627282930
  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['rule'])) {
  14. $v_rule = escapeshellarg($_GET['rule']);
  15. exec (VESTA_CMD."v-delete-firewall-rule ".$v_rule, $output, $return_var);
  16. }
  17. check_return_code($return_var,$output);
  18. unset($output);
  19. $back = $_SESSION['back'];
  20. if (!empty($back)) {
  21. header("Location: ".$back);
  22. exit;
  23. }
  24. header("Location: /list/firewall/");
  25. exit;