fwd-only flag

This commit is contained in:
Serghey Rodin 2013-11-13 11:40:23 +02:00
commit 3e521cb8a2
11 changed files with 202 additions and 6 deletions

View file

@ -140,6 +140,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
$valiases = explode(",", $data[$v_account]['ALIAS']);
$v_fwd = str_replace(',', "\n", $data[$v_account]['FWD']);
$vfwd = explode(",", $data[$v_account]['FWD']);
$v_fwd_only = $data[$v_account]['FWD_ONLY'];
$v_quota = $data[$v_account]['QUOTA'];
$v_autoreply = $data[$v_account]['AUTOREPLY'];
if ( $v_autoreply == 'yes' ) {
@ -234,6 +235,20 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
}
}
// FWD_ONLY flag
if (($v_fwd_only == 'yes') && (empty($_POST['v_fwd_only'])) && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-delete-mail-account-fwd-only ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
$v_fwd_only = '';
}
if (($v_fwd_only != 'yes') && (!empty($_POST['v_fwd_only'])) && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-add-mail-account-fwd-only ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
$v_fwd_only = 'yes';
}
// Autoreply
if (($v_autoreply == 'yes') && (empty($_POST['v_autoreply'])) && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-delete-mail-account-autoreply ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);