Example #1
0
_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 
echo strtoupper($_SESSION['installer_lang']);
?>
}
$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>';
            }
        }
    }
}
?>
<script>
$(document).ready(function() { 
 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');
 }
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();