require_once PHPOS_DIR . 'classes/class.phpos_icons.php';
require_once PHPOS_DIR . 'classes/class.languages.php';
require_once PHPOS_DIR . 'controllers/languageController.php';
define('PHPOS_IN_EXPLORER', true);
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();