Exemplo n.º 1
0
            cache_param('add_user_id');
        }
        if (!empty($remove_user_id)) {
            $group->remove_user($remove_user_id, $group_id);
            $my_app->set_param('remove_user_id', null);
            cache_param('remove_user_id');
        }
    }
}
$my_app->jquery_onready(msg::showMessages());
$action = $my_app->get_param('action');
if (globalconfig('demo_mode') != 1 || is_root()) {
    switch ($action) {
        case 'delete':
            $delete_id = $my_app->get_param('delete_id');
            if ($ftp->delete_ftp($delete_id)) {
                helper_result('delete_ftp', 'ok', txt('deleted'));
                $my_app->set_param('action', null);
                cache_param('action');
                savelog('FTP_ACCOUNT_DELETE_id_' . $delete_id . '#SUCCESS');
            }
            break;
    }
    if (form_submit('new_ftp')) {
        if ($_POST['action'] == 'new_ftp') {
            $tmp_title = strip_tags($_POST['ftp_new_title']);
            $tmp_desc = strip_tags($_POST['ftp_new_desc']);
            $tmp_host = strip_tags($_POST['ftp_new_host']);
            $tmp_login = strip_tags($_POST['ftp_new_login']);
            $tmp_pass = strip_tags($_POST['ftp_new_pass']);
            $tmp_port = strip_tags($_POST['ftp_new_port']);