index.php 569 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. ob_start();
  5. session_start();
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. // Check user
  8. if ($_SESSION['user'] != 'admin') {
  9. header("Location: /list/user");
  10. exit;
  11. }
  12. if (!empty($_GET['rule'])) {
  13. $v_rule = escapeshellarg($_GET['rule']);
  14. exec (VESTA_CMD."v-suspend-firewall-rule ".$v_rule, $output, $return_var);
  15. }
  16. check_return_code($return_var,$output);
  17. unset($output);
  18. $back=getenv("HTTP_REFERER");
  19. if (!empty($back)) {
  20. header("Location: ".$back);
  21. exit;
  22. }
  23. header("Location: /list/firewall/");
  24. exit;