index.php 1023 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. ob_start();
  5. session_start();
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. if ($_SESSION['user'] == 'admin') {
  8. // Mail domain
  9. if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
  10. $v_username = escapeshellarg($user);
  11. $v_domain = escapeshellarg($_GET['domain']);
  12. exec (VESTA_CMD."v_delete_mail_domain ".$v_username." ".$v_domain, $output, $return_var);
  13. unset($output);
  14. header("Location: /list/mail/");
  15. exit;
  16. }
  17. // Mail account
  18. if ((!empty($_GET['domain'])) && (!empty($_GET['account']))) {
  19. $v_username = escapeshellarg($user);
  20. $v_domain = escapeshellarg($_GET['domain']);
  21. $v_account = escapeshellarg($_GET['account']);
  22. exec (VESTA_CMD."v_delete_mail_account ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
  23. unset($output);
  24. header("Location: /list/mail/?domain=".$_GET['domain']);
  25. exit;
  26. }
  27. }
  28. header("Location: /list/mail/");