public function get_window_data($win_id) { $win = new api_wintask(); $win->setID($win_id); $win->getWindow(); return $win; }
public function removeWindows($pid) { if (!empty($pid)) { $this->loadPID($pid); $c = $this->countWindows(); if ($c != 0) { // remove process id from windows $winID = $this->getProcessWindows(); for ($i = 0; $i < $c; $i++) { $w = new api_wintask(); $w->setID($winID); $w->getWindow(); $w->closeWindow(); } // reset array if (is_array($_SESSION['pid'][$this->app_id]['WIN_ID'])) { $_SESSION['pid'][$this->app_id]['WIN_ID'] = array(); return true; } } } }
require_once PHPOS_DIR . 'classes/class.phpos_icons.php'; require_once PHPOS_DIR . 'classes/class.phpos_navigation.php'; require_once PHPOS_DIR . 'classes/class.phpos_explorer_api.php'; require_once PHPOS_DIR . 'classes/class.phpos_messages.php'; activity(); /* ************************** */ if (!empty($_POST['id'])) { $_GET['id'] = filter::num($_POST['id']); } /* ************************** */ $apiWindow = new api_wintask(); $apiWindow->setID(filter::num($_GET['id'])); // set ID of my window $apiWindow->getWindow(); // get Window data define("WIN_ID", $apiWindow->getID()); // Get APP ID $app = $apiWindow->getAPPID(); $app_name = $apiWindow->get_app_name(); if (!empty($_GET['action'])) { $apiWindow->setAPPID($app_name . '@' . filter::alfas($_GET['action'])); $apiWindow->updateWindow(); } $app_action = $apiWindow->get_app_action(); define("APP_ID", $app_name); define("APP_ACTION", $app_action); define("WIN_TYPE", $apiWindow->getParam('wintype'));
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; default: break; } } // if !action if ($_GET['action'] != 'update') { $t = new phpos_tasks(); echo $t->render_tasks(); $js_context_menu = $t->get_jquery();