$win_task->setID(1); $win_task->setParam('is_desktop', 1); $id = 1; } if ($_GET['modal']) { $win_task->setParam('modal', true); } $win_task->setParam('title', filter::utf($_GET['title'])); // set title $win_task->setParam('wintype', filter::alfas($_GET['wintype'])); // set wintype $win_task->setParams($_GET['params']); // parse params $win_task->openWindow($id); // create window $win_task->setAppParams($_GET['app_params']); echo $win_task->getJavaScript(); // get JS code $apiProcess = new api_winprocess(); $apiProcess->assignWindow($win_task); $pid = $apiProcess->newProcess(); } break; case 'destroy': if (!empty($_GET['id'])) { $win_task = new api_wintask(); $win_task->setID(filter::num($_GET['id'])); $win_task->getWindow(); //echo '<script>alert("'.$win_task->getParam('process_id').'");</script>'; $win_task->closeWindow(); }