Files
VestaCP/web/delete/user/index.php

29 lines
680 B
PHP
Raw Normal View History

2012-05-23 16:52:52 +03:00
<?php
// Init
2012-06-19 18:23:14 +03:00
error_reporting(NULL);
2012-05-23 16:52:52 +03:00
ob_start();
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
if ($_SESSION['user'] == 'admin') {
if (!empty($_GET['user'])) {
$v_username = escapeshellarg($_GET['user']);
exec (VESTA_CMD."v-delete-user ".$v_username, $output, $return_var);
2012-05-23 16:52:52 +03:00
}
2012-08-02 10:57:04 +03:00
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = 'Error: vesta did not return any output.';
$_SESSION['error_msg'] = $error;
}
unset($output);
2012-05-23 16:52:52 +03:00
}
2012-10-01 17:29:49 +03:00
$back = $_SESSION['back'];
2012-09-29 01:55:51 +03:00
if (!empty($back)) {
header("Location: ".$back);
exit;
}
2012-10-01 17:29:49 +03:00
2012-06-19 18:23:14 +03:00
header("Location: /list/user/");
2012-09-29 01:55:51 +03:00
exit;