add dns zones when editing webaliases

This commit is contained in:
Serghey Rodin 2012-07-25 10:43:25 +03:00
commit 530fc3b63d
6 changed files with 142 additions and 44 deletions

View file

@ -100,15 +100,15 @@ top_panel($user,$TAB);
}
}
unset($output);
}
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v_add_dns_on_web_alias ".$user." ".$v_domain." 'no'", $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;
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v_add_dns_on_web_alias ".$user." ".$v_domain." ".$alias." 'no'", $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);
}
unset($output);
}
}
@ -182,6 +182,16 @@ top_panel($user,$TAB);
unset($output);
}
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v_restart_dns", $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($_SESSION['error_msg'])) {
exec (VESTA_CMD."v_restart_web", $output, $return_var);
if ($return_var != 0) {
@ -205,6 +215,10 @@ top_panel($user,$TAB);
$ips = json_decode(implode('', $output), true);
unset($output);
exec (VESTA_CMD."v_get_user_value ".$user." 'TEMPLATE'", $output, $return_var);
$template = $output[0] ;
unset($output);
exec (VESTA_CMD."v_list_web_templates json", $output, $return_var);
$templates = json_decode(implode('', $output), true);
unset($output);