switch ($cloud_type) {
            case 'google_drive':
                echo $layout->txtdesc(txt('dsc_cloud_google_info'));
                $form->title(txt('cloud_authentication'), '', ICONS . 'auth_key.png');
                $form->condition('not_null', true, txt('form_empty_field') . 'ClientID');
                $form->input('text', 'cloud_new_login', 'Client ID', txt('dsc_cloud_login'), '');
                $form->condition('not_null', true, txt('form_empty_field') . 'Secret');
                $form->input('password', 'cloud_new_pass', 'Client Secret', txt('dsc_cloud_pass'), '');
                $form->input('text', 'cloud_new_url', 'Redirect URL', txt('dsc_cloud_port'), $_SESSION['PHPOS_NETURL']);
                break;
        }
        $form->status();
        $form->submit('', txt('btn_create'), 'edit_add', 'right');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
    } else {
        echo $layout->title('Adding new workgroup', 'icon.png');
        echo $layout->column('50%');
        echo helper_result('new_ftp');
        echo '<script>' . winreload(WIN_ID, array('section' => 'list')) . '</script>';
        //echo '<img src="'.MY_RESOURCES_URL.'user_added_img.png" style="width:100px;padding-left:50px"/>';
        echo $layout->end('column');
        echo $layout->column('50%');
        echo $layout->end('column');
        echo $layout->clr();
    }
}
// isset cloud type
            $items = array('0' => txt('no'), '1' => txt('yes'));
            $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, $ftp->get_is_public());
        } else {
            $form->input('hidden', 'ftp_new_public', '', '', '0');
        }
        echo $form->render();
        echo $layout->end('column');
        echo $layout->column('50%');
        $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png');
        $form->condition('not_null', true, txt('form_empty_field') . 'Host');
        $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), $ftp->get_host());
        $form->condition('not_null', true, txt('form_empty_field') . 'Login');
        $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), $ftp->get_login());
        $form->condition('not_null', true, txt('form_empty_field') . txt('password'));
        $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), $ftp->get_password());
        $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), $ftp->get_port());
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $ftp->get_id() . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('btn_update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
    } else {
        echo $layout->access_denied();
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
}
cache_param('action');
cache_param('content');
$allowed = array('notepad', 'txt', 'log', 'html', 'htm');
$my_app->set_param('allowed_extensions', $allowed);
cache_param('allowed_extensions');
$explorerAPI = new phpos_explorerAPI();
if ($my_app->get_param('loadAPI')) {
    $explorerAPI->openfile();
}
if ($my_app->get_param('action') == 'new_file') {
    $explorerAPI->clear_all_data();
    $my_app->set_param('notepad', null);
    $my_app->set_param('action', null);
    $my_app->set_param('file_info', null);
    $my_app->set_param('id_file', null);
    winreload();
    cache_param('id_file');
    cache_param('notepad');
    cache_param('action');
    cache_param('file_info');
    cache_param('action');
}
if ($explorerAPI->is_saved_file_info()) {
    $my_app->set_param('file_info', $explorerAPI->get_saved_file_info());
    cache_param('file_info');
}
if (form_submit('notepadform')) {
    if ($_POST['action'] == 'save_as') {
        $my_app->set_param('notepad', $_POST['txt']);
        cache_param('notepad');
        $explorerAPI->set_action('save_as');