index.php 711 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. error_reporting(NULL);
  3. ob_start();
  4. session_start();
  5. $TAB = 'USER';
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. // Are you admin?
  8. if ($_SESSION['user'] == 'admin') {
  9. if (!empty($_GET['user'])) {
  10. $v_username = escapeshellarg($_GET['user']);
  11. exec (VESTA_CMD."v-suspend-user ".$v_username, $output, $return_var);
  12. }
  13. if ($return_var != 0) {
  14. $error = implode('<br>', $output);
  15. if (empty($error)) $error = __('Error: vesta did not return any output.');
  16. $_SESSION['error_msg'] = $error;
  17. }
  18. unset($output);
  19. }
  20. $back = $_SESSION['back'];
  21. if (!empty($back)) {
  22. header("Location: ".$back);
  23. exit;
  24. }
  25. header("Location: /list/user/");
  26. exit;