<?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 (PHPOS_HAVE_ACCESS != $my_app->get_app_id() or !defined('PHPOS')) { die; } $my_app->set_param('url', null); $my_app->using('params'); $url_encoded = $my_app->get_param('url'); if (!empty($url_encoded)) { $url = base64_decode($url_encoded); $jquery = "\n\t\n\t\tvar a = document.createElement('a');\n\t\ta.href='" . $url . "';\n\t\ta.target = '_new';\n\t\tdocument.body.appendChild(a);\n\t\ta.click();\t\t\n\t\t\n\t\t//var url = '" . $url . "';\n\t\t//var w = window.open(url, '_new','location=1,menubar=1,status=1');\n\t\t" . winclose(WIN_ID) . "\n\t\t"; $my_app->jquery_onready($jquery); }
$succ_msg = txt('shortcuts_window_msg_new_dir'); // if edit /rename $edit_id = $my_app->get_param('edit_id'); $old_name = $my_app->get_param('old_name'); if (!empty($old_name)) { $wincfg['back'] = null; $wincfg['title'] = txt('shortcuts_window_title_rename'); $input_title = txt('shortcuts_rename_title'); $input_tip = txt('shortcuts_rename_tip'); $button = txt('shortcuts_window_btn_rename'); $form_id = 'new_rename'; $default_value = strip_tags(base64_decode($old_name)); $succ_msg = txt('shortcuts_window_msg_rename'); } $monit_success = "\n\t\tjSuccess(\n\t\t\t'" . $succ_msg . "',\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; /* ************************** */ $app = new phpos_app(); $app->set_app_id($link_param); $app->load_config(); $after_reload = $my_app->get_param('after_reload'); $form = new phpos_forms(); $form->onsuccess($success_code); if (empty($old_name)) { $html .= $layout->subtitle(txt('shortcuts_newdir_title'), MY_RESOURCES_URL . 'folder.png'); $html .= $layout->txtdesc(txt('shortcuts_newdir_desc')); } else { $html .= $layout->subtitle(txt('shortcuts_rename_title'), MY_RESOURCES_URL . 'rename.png'); $html .= $layout->txtdesc(txt('shortcuts_rename_desc'));
<?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)); }
} } } } /*.............................................. */ if ($my_app->get_param('api_action') == 'save_as') { if (globalconfig('demo_mode') != 1 || is_root()) { if ($my_app->get_param('api_dialog') !== null && $my_app->get_param('api_dialog_type') == 'save_as_file' && $my_app->get_param('explorer_save_as_filename') !== null) { $data = $explorerAPI->get_cached_data_to_save(); $app_data = $explorerAPI->get_cached_app_data(); $monit_success = "\n\t\t\t\t\tjSuccess(\n\t\t\t\t\t\t'" . txt('file_saved') . "',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tautoHide : true, \n\t\t\t\t\t\t\tclickOverlay : false,\n\t\t\t\t\t\t\tMinWidth : 200,\n\t\t\t\t\t\t\tTimeShown : 5000,\n\t\t\t\t\t\t\tShowTimeEffect : 1000,\n\t\t\t\t\t\t\tHideTimeEffect : 600,\n\t\t\t\t\t\t\tLongTrip :20,\n\t\t\t\t\t\t\tHorizontalPosition : 'right',\n\t\t\t\t\t\t\tVerticalPosition : 'bottom',\n\t\t\t\t\t\t\tShowOverlay : false\n\t\t\t\t\t\t}\n\t\t\t\t\t);"; /*.............................................. */ if (is_array($app_data)) { if ($data == null) { $data = ' '; } $explorer_save_as_filename = $my_app->get_param('explorer_save_as_filename') . '.' . $my_app->get_param('api_file_ext'); if (false !== ($saved_file_info = $phposFS->save_file_content($explorer_save_as_filename, $data))) { $saved_file_info['fs'] = $my_app->get_param('fs'); $explorerAPI->clear_savedata(); $explorerAPI->set_saved_file_info($saved_file_info); $my_app->set_param('api_action', null); cache_param('api_action'); echo "<script>" . $monit_success . " phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>"; } } else { echo "<script>" . $monit_success . " phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>"; } } } }
<?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; } $shared_id = $my_app->get_param('shared_id'); if ($stop_share == 1) { $shared = new phpos_shared(); if (globalconfig('demo_mode') != 1 || is_root()) { $shared->unshare_folder($shared_id); } msg::ok(txt('msg_stop_shared')); $my_app->jquery_onready(winclose(WIN_ID) . " \$('#" . $my_app->get_param('after_reload') . "').panel('refresh'); "); }
<?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; } function parse_yturl($url) { $pattern = '#^(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=|/watch\\?.+&v=))([\\w-]{11})(?:.+)?$#x'; preg_match($pattern, $url, $matches); return isset($matches[1]) ? $matches[1] : false; } $u = parse_yturl($url); $jquery = "\n\t\t\n\t\tvar media_width = 600;\n\t\tvar media_height = 400;\n\t\t\n\t\tvar url = '" . $u . "';\n\t\tvar media_left = (\$(window).width()/2)-(media_width/2);\n var media_top = (\$(window).height()/2)-(media_height/2);\n\t\t\n\t\tvar w = window.open('http://www.youtube.com/embed/" . $u . "?autoplay=1', 'PHPOS: yt'+Math.random(),'top='+media_top+',left='+media_left+',resizable=no, height='+media_height+',width='+media_width);\n\t\tw.focus();\n\t\t" . winclose(WIN_ID) . "\n\t\t"; $my_app->jquery_onready($jquery);