$mail_id = $_POST['id'];
    } else {
        header("Location: email_accounts.php");
        exit(0);
    }
}
if (isset($_SESSION['email_support']) && $_SESSION['email_support'] == "no") {
    header("Location: index.php");
}
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_ENABLE_AUTORESPOND_PAGE_TITLE' => tr('VHCS - Client/Enable Mail Auto Responder'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
check_email_user($sql);
gen_page_dynamic_data($tpl, $sql, $mail_id, !isset($_POST['uaction']));
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_ENABLE_MAIL_AUTORESPONDER' => tr('Edit mail auto responder'), 'TR_ARSP_MESSAGE' => tr('Your message'), 'TR_ENABLE' => tr('Save'), 'TR_CANCEL' => tr('Cancel'), 'ID' => $mail_id));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
            set_page_message(tr('FTP account data updated!'));
            user_goto('ftp_accounts.php');
        }
    }
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_EDIT_FTP_ACC_PAGE_TITLE' => tr('VHCS - Client/Edit FTP Account'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
check_ftp_perms($sql, $ftp_acc);
gen_page_dynamic_data($tpl, $sql, $ftp_acc);
update_ftp_account($sql, $ftp_acc);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_EDIT_FTP_USER' => tr('Edit FTP user'), 'TR_FTP_ACCOUNT' => tr('FTP account'), 'TR_PASSWORD' => tr('Password'), 'TR_PASSWORD_REPEAT' => tr('Password repeat'), 'TR_USE_OTHER_DIR' => tr('Use other dir'), 'TR_EDIT' => tr('Save changes'), 'CHOOSE_DIR' => tr('Choose dir')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
        $mail_id = $_POST['id'];
    } else {
        header("Location: email_accounts.php");
        exit(0);
    }
}
if (isset($_SESSION['email_support']) && $_SESSION['email_support'] == "no") {
    header("Location: index.php");
}
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_ENABLE_AUTORESPOND_PAGE_TITLE' => tr('VHCS - Client/Enable Mail Auto Responder'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
check_email_user($sql);
gen_page_dynamic_data($tpl, $sql, $mail_id);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_ENABLE_MAIL_AUTORESPONDER' => tr('Enable mail auto responder'), 'TR_ARSP_MESSAGE' => tr('Your message'), 'TR_ENABLE' => tr('Save'), 'TR_CANCEL' => tr('Cancel'), 'ID' => $mail_id));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();