mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
check_return_code function
This commit is contained in:
parent
3cb02aec9d
commit
d0f6d5d65f
19 changed files with 118 additions and 229 deletions
|
@ -5,24 +5,17 @@ ob_start();
|
|||
session_start();
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Delete as someone else?
|
||||
if (($_SESSION['user'] == 'admin') && (!empty($_GET['user']))) {
|
||||
$user=$_GET['user'];
|
||||
}
|
||||
if (($_SESSION['user'] == 'admin') && (!empty($_GET['user']))) {
|
||||
$user=$_GET['user'];
|
||||
}
|
||||
|
||||
if (!empty($_GET['database'])) {
|
||||
$v_username = escapeshellarg($user);
|
||||
$v_database = escapeshellarg($_GET['database']);
|
||||
exec (VESTA_CMD."v-delete-database ".$v_username." ".$v_database, $output, $return_var);
|
||||
}
|
||||
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);
|
||||
|
||||
//}
|
||||
if (!empty($_GET['database'])) {
|
||||
$v_username = escapeshellarg($user);
|
||||
$v_database = escapeshellarg($_GET['database']);
|
||||
exec (VESTA_CMD."v-delete-database ".$v_username." ".$v_database, $output, $return_var);
|
||||
}
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
|
||||
$back = $_SESSION['back'];
|
||||
if (!empty($back)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue