public function get_icon($file) { global $explorer; $shortcut = new phpos_shortcuts(); if (empty($file['icon'])) { if ($this->is_directory($file)) { $icon_image = $explorer->config('filetypes_icons_folder_url') . 'folder.png'; } else { $shortcut = new phpos_shortcuts(); return $shortcut->link_icon($file['extension'], $file['app_id'], null, $file['app_action']); if (file_exists($explorer->config('filetypes_icons_folder_dir') . $file['extension'] . '.png')) { $icon_image = $explorer->config('filetypes_icons_folder_url') . $file['extension'] . '.png'; } else { $icon_image = $explorer->config('filetypes_icons_folder_url') . 'default.png'; } } } else { $user_icons = new phpos_icons(); $user_icons_dir = $user_icons->get_icons_dir(); $user_icons_url = $user_icons->get_icons_url(); if (file_exists($user_icons_dir . $file['icon'])) { $icon_image = $user_icons_url . $file['icon']; } else { if (file_exists(PHPOS_WEBROOT_DIR . '_phpos/icons/' . $file['icon'])) { $icon_image = PHPOS_WEBROOT_URL . '_phpos/icons/' . $file['icon']; } else { $icon_image = PHPOS_WEBROOT_URL . '_phpos/icons/default.png'; } } } return $icon_image; // @returns full url }
$success_code = winclose(WIN_ID) . $monit_success; $app = new phpos_app(); $app->set_app_id($link_param); $app->load_config(); $html .= $layout->subtitle(txt('shortcuts_url_title'), MY_RESOURCES . 'link_icon.png'); $html .= $layout->txtdesc(txt('shortcuts_url_desc')); $form = new phpos_forms(); $form->onsuccess($success_code); $html .= $form->form_start('new_url_link', helper_ajax('linkAction.php'), array('app_params' => '')); $after_reload = $my_app->get_param('after_reload'); $form->reload_after_submit(array($after_reload)); $form->input('hidden', 'new_link_type', '', '', 'link'); $link_id = $my_app->get_param('link_id'); if (!empty($link_id)) { $wincfg['back'] = null; $shortcut = new phpos_shortcuts(); $db_shortcut = $shortcut->get_shortcut($link_id); $db_params = $shortcut->get_params_from_db($link_id); $url = base64_decode($db_params['url']); $start_link_title = $db_shortcut['file_title']; $button = txt('shortcuts_window_btn_update_url'); $wincfg['title'] = txt('shortcuts_window_title_update_url'); } $form->status(); $form->condition('not_null', true, txt('name_empty')); $form->input('text', 'new_link_name', txt('shortcuts_form_icon_name'), txt('shortcuts_form_icon_name_desc'), $start_link_title); $form->condition('not_null', true, txt('url_empty')); $form->input('text', 'new_link_url', txt('shortcuts_url_form_url'), txt('shortcuts_url_form_url_desc'), $url); $icons = new phpos_icons(); $c = $icons->count_icons(); $items = array('null' => '---');
********************************** PHPOS Web Operating system MIT License (c) 2013 Marcin Szczyglinski szczyglis83@gmail.com GitHUB: https://github.com/phpos/ File version: 1.0.0, 2013.10.08 ********************************** */ if (!defined('PHPOS')) { die; } if (form_submit('new_mediaframe')) { $shortcut = new phpos_shortcuts(); $app_id = $my_app->get_param('link_param'); $app = new phpos_app(); $app->set_app_id($app_id); $app->load_config(); $location_id = $my_app->get_param('location'); $id_parent = 0; switch ($location_id) { case 'desktop': $location = 'desktop'; break; case 'menustart': $location = 'menustart'; break; case 'db': $location = 'db';
<?php /* ********************************** PHPOS Web Operating system MIT License (c) 2013 Marcin Szczyglinski szczyglis83@gmail.com GitHUB: https://github.com/phpos/ File version: 1.0.0, 2013.10.08 ********************************** */ if (!defined('PHPOS')) { die; } if ($my_app->get_param('to_menustart') == 1) { $shortcut = new phpos_shortcuts(); $link_id = $my_app->get_param('link_id'); if (globalconfig('demo_mode') != 1 || is_root()) { if ($shortcut->new_menustart($link_id)) { msg::ok(txt('msg_added_to_menustart')); } } $my_app->jquery_onready(winclose(WIN_ID)); }
(c) 2013 Marcin Szczyglinski szczyglis83@gmail.com GitHUB: https://github.com/phpos/ File version: 1.0.0, 2013.10.08 ********************************** */ if (!defined('PHPOS')) { die; } $link_param = $my_app->get_param('link_param'); $link_id = $my_app->get_param('link_id'); echo 'link_param-' . $link_param . '<br>'; echo 'link_id-' . $link_id . '<br>'; if (!empty($link_id)) { $shortcut = new phpos_shortcuts(); $row = $shortcut->get_shortcut($link_id); $start_title = $row['file_title']; } $monit_success = "\n\t\tjSuccess(\n\t\t\t'" . txt('created') . "',\n\t\t\t{\n\t\t\t\tautoHide : true, \n\t\t\t\tclickOverlay : false,\n\t\t\t\tMinWidth : 200,\n\t\t\t\tTimeShown : 5000,\n\t\t\t\tShowTimeEffect : 1000,\n\t\t\t\tHideTimeEffect : 600,\n\t\t\t\tLongTrip :20,\n\t\t\t\tHorizontalPosition : 'right',\n\t\t\t\tVerticalPosition : 'bottom',\n\t\t\t\tShowOverlay : false\n\t\t\t}\n\t\t);"; $success_code = winclose(WIN_ID) . $monit_success; winset('title', txt('new_icon_title') . ' - Menu Start'); winset('width', '600'); winset('height', '300'); wincenter(); $form = new phpos_forms(); $form->onsuccess($success_code); $html .= $form->form_start('new_menustart', helper_ajax('menustartAction.php'), array('app_params' => '')); $after_reload = $my_app->get_param('after_reload'); $form->reload_after_submit(array($after_reload)); $form->input('hidden', 'new_link_type', '', '', 'menustart');
require_once PHPOS_DIR . 'classes/class.phpos_startmenu.php'; require_once PHPOS_DIR . 'classes/class.phpos_app.php'; require_once PHPOS_DIR . 'classes/class.phpos_filesystems.php'; require_once PHPOS_DIR . 'classes/class.phpos_shortcuts.php'; require_once PHPOS_DIR . 'classes/class.phpos_clipboard.php'; 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>';