$win_task = new api_wintask();
                        $win_task->setID($_SESSION['tasks'][$key]['id']);
                        $win_task->getWindow();
                        $win_task->generateJavaScript('notags');
                        $js_code .= $win_task->getJavaScript();
                    }
                    unset($win_task);
                }
            }
            break;
        case 'update':
            if (isset($_GET['id'])) {
                $win_task = new api_wintask();
                $win_task->setID(filter::num($_GET['id']));
                $win_task->getWindow();
                $win_task->setParams($_GET['parameters_parsed']);
                $win_task->updateWindow();
                unset($win_task);
            }
            break;
        default:
            break;
    }
}
// if !action
if ($_GET['action'] != 'update') {
    $t = new phpos_tasks();
    echo $t->render_tasks();
    $js_context_menu = $t->get_jquery();
    $styles = $t->get_styles();
}