コード例 #1
0
 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;
             }
         }
     }
 }
コード例 #2
0
require_once PHPOS_DIR . 'classes/class.phpos_themes.php';
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);
コード例 #3
0
 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();
     }
     break;
 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':
コード例 #4
0
ファイル: phpos_install.php プロジェクト: brian-clemont/phpos
echo PHPOS_WEBROOT_URL;
?>
_phpos/themes/default/phposAPI_installer.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Cache-Control" content="post-check=0, pre-check=0" />
<meta http-equiv="Pragma" content="no-cache" />

</head>
<body>
<?php 
// Language switch
$in_login = 1;
include PHPOS_DIR . 'plugins/tray.languages.php';
$wintask = new api_wintask();
$wintask->setContextMenu($tray['context_menu']);
$js_context_menu = $wintask->contextMenuRender('lang', 'div', 'hover');
?>
		
		
		<div id="lang" title="<?php 
echo $tray['title'];
?>
" class="phpos_tray_item phpos_tray_item_mouseleave">
			<div>
				<img src="<?php 
echo $tray['icons'][0];
?>
" /> 
				<span><b style="color:white"><?php 
コード例 #5
0
 public function assign_context_menu($task_id)
 {
     $context_menu = $this->create_context_menu($task_id);
     $wintask = new api_wintask();
     $wintask->setContextMenu($context_menu);
     $this->jquery .= $wintask->contextMenuRender('phpos_task_' . $task_id, 'div', 'left');
 }
コード例 #6
0
if (!defined('PHPOS')) {
    die;
}
$tray_icons = glob(PHPOS_DIR . 'plugins/tray.*.php');
$tray_data = array();
foreach ($tray_icons as $tray_plugin) {
    $tray = array();
    include $tray_plugin;
    $tray_data[] = $tray;
}
$c = count($tray_data);
if ($c != 0) {
    for ($i = 0; $i < $c; $i++) {
        $this_tray = $tray_data[$i];
        if ($this_tray['access_level'] < 2 || $this_tray['access_level'] == 2 && is_admin() || is_root()) {
            $wintask = new api_wintask();
            $wintask->setContextMenu($this_tray['context_menu']);
            $js_context_menu .= $wintask->contextMenuRender('phpos_tray_icon_' . $this_tray['id'], 'img', 'left');
            $txt = '';
            if (!empty($this_tray['txt'])) {
                $txt = '<span>' . $this_tray['txt'] . '</span>';
            }
            if ($this_tray['use_custom_icons']) {
                echo '<div id="phpos_tray_icon_' . $this_tray['id'] . '" title="' . $this_tray['title'] . '" class="phpos_tray_item phpos_tray_item_mouseleave"><img src="' . $this_tray['icons'][0] . '" />' . $txt . '</div>';
            } else {
                echo '<div id="phpos_tray_icon_' . $this_tray['id'] . '" title="' . $this_tray['title'] . '" class="phpos_tray_item phpos_tray_item_mouseleave"><img  src="' . PHPOS_WEBROOT_URL . '_phpos/icons_tray/' . $this_tray['icons'][0] . '" />' . $txt . '</div>';
            }
        }
    }
}
?>
コード例 #7
0
require PHPOS_DIR . 'plugins/fs.db_mysqlPlugin.php';
//$filesystem_class = 'phpos_fs_plugin_'.$my_app->get_param('fs');
$phposFS = new phpos_fs_plugin_db_mysql();
// start filesytem
$config = new phpos_config();
$config->set_id_user();
$shortcut = new phpos_shortcuts();
$startmenu = new phpos_startmenu();
$records = $startmenu->get_all();
$i = 1;
foreach ($records as $item) {
    if ($shortcut->is_shortcut($item['id_file'])) {
        $row = $shortcut->get_shortcut($item['id_file']);
        $icon = $shortcut->link_icon($row['plugin_id'], $row['app_id'], $row['icon'], $row['app_action']);
        $app_action = 'app_id:' . $row['app_id'] . '@' . $row['app_action'];
        $action = winopen($row['file_title'], $row['plugin_id'], $app_action, $row['app_params']);
        $context_menu = array('delete::' . txt('del_from_start') . '::delete_menustart_item("' . $item['id'] . '");::delete');
        $apiWindow = new api_wintask();
        $apiWindow->setContextMenu($context_menu);
        $js .= $apiWindow->contextMenuRender('startmenu_left_item_' . $i, 'img');
        $apiWindow->resetContextMenu();
        $items .= '<div id="startmenu_left_item_' . $i . '" class="startmenu_left_item" onclick="' . $action . '"><img src="' . $icon . '"><span>' . $row['file_title'] . '</span></div>';
        $i++;
    }
}
$js .= "\n function delete_menustart_item(delete_id)\n {\n\t\tphpos.managerWindows('action=delete_start_item&item_id='+delete_id);\n\t\tphpos.menustartClose();\n  }\n\t";
$my_app = new phpos_app();
jquery_function($js);
jquery_onready($js_delete);
include PHPOS_DIR . 'views/startmenuView.php';
echo $my_app->render_javascript_jquery();