Exemplo n.º 1
0
//winConfig('use_params');
winConfig('use_sections');
//winConfig('use_menu');
cache_param('cloud_id');
cache_param('cloud_type');
$cloud_id = $my_app->get_param('cloud_id');
if (!empty($cloud_id)) {
    $cloud = new phpos_clouds();
}
$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 ($cloud->delete_cloud($delete_id)) {
                helper_result('delete_cloud', 'ok', txt('deleted'));
                $my_app->set_param('action', null);
                cache_param('action');
                $my_app->set_param('cloud_id', null);
                cache_param('cloud_id');
            }
            break;
    }
    if (form_submit('new_cloud')) {
        if ($_POST['action'] == 'new_cloud') {
            $tmp_title = strip_tags($_POST['cloud_new_title']);
            $tmp_desc = strip_tags($_POST['cloud_new_desc']);
            $tmp_login = strip_tags($_POST['cloud_new_login']);
            $tmp_pass = strip_tags($_POST['cloud_new_pass']);
            $tmp_url = strip_tags($_POST['cloud_new_url']);