added additional web ftp accounts

This commit is contained in:
Serghey Rodin 2012-10-09 15:33:59 +03:00
commit 7c3419b012
16 changed files with 1117 additions and 353 deletions

View file

@ -123,12 +123,17 @@ if ($_SESSION['user'] == 'admin') {
// Change contact email
if (($v_email != $_POST['v_email']) && (empty($_SESSION['error_msg']))) {
$v_email = escapeshellarg($_POST['v_email']);
exec (VESTA_CMD."v_change_user_contact ".$v_username." ".$v_email, $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;
// Validate email
if (!filter_var($_POST['v_email'], FILTER_VALIDATE_EMAIL)) {
$_SESSION['error_msg'] = 'Please enter valid email address.';
} else {
$v_email = escapeshellarg($_POST['v_email']);
exec (VESTA_CMD."v_change_user_contact ".$v_username." ".$v_email, $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);
}