case 'sessiondestroy': session_destroy(); break; case 'restore': $c = count($_SESSION['tasks']); $js_code = ''; $win_tasks = new api_wintask(); $c = $win_tasks->countWindows(); if ($c != 0) { foreach ($_SESSION['tasks'] as $key => $value) { if ($key != 1) { $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;