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; } global $readonly, $my_app, $context_fs, $tmp_shared_id; $app_menu = array('title:' . txt('new_folder') . ',action:actionNewFolder,icon:icon-folder_files', 'title:' . txt('my_server') . ',action:actionGoServer,icon:icon-myserver', 'title:' . txt('control_panel') . ',action:actionGoCP,icon:icon-login'); if (!empty($tmp_shared_id)) { $shared = new phpos_shared(); if ($shared->is_my($tmp_shared_id)) { $app_menu[] = 'title:' . txt('stop_share_folder') . ',action:actionStopShare,icon:icon-cancel'; } } if (!$readonly && $context_fs != 'db_mysql') { $app_menu[] = 'title:' . txt('upload') . ',action:actionUpload,icon:icon-download'; } $app_menu[] = 'title:' . txt('icon_size') . ',action:actionChangeIcons,icon:icon-application'; $app_menu[] = array('title:' . txt('icon_size_s') . ',icon_size:small,check:icon_size,if:' . $my_app->get_param('icon_size') . ',action:actionChangeIcons', 'title:' . txt('icon_size_m') . ',icon_size:medium,check:icon_size,if:' . $my_app->get_param('icon_size') . ',action:actionChangeIcons'); if ($context_fs == 'ftp') { $check_ftp = new phpos_ftp(); if (is_root() || $check_ftp->is_my($my_app->get_param('ftp_id'))) { $app_menu[] = 'title:' . txt('dsc_ftp_a_edit') . ',action:actionEditFtp,icon:icon-edit'; } } function actionEditFtp($menu_item)
} else { //$my_app->set_param('root_id', null); //$my_app->set_param('dir_id', null); } // If shared and readonly $in_shared = $my_app->get_param('in_shared'); $readonly = $my_app->get_param('readonly'); /*.............................................. */ if ($in_shared == 1) { $shared = new phpos_shared(); $share_dir_id = $my_app->get_param('dir_id'); if (substr($share_dir_id, -1) == '/') { $share_dir_id = substr($share_dir_id, 0, -1); } //echo $share_dir_id; $shared_id = $shared->find_shared($share_dir_id); /*.............................................. */ if (!empty($shared_id) && !$shared->is_my($shared_id)) { $shared->set_id($shared_id); $shared->get_shared(); $readonly = $shared->get_readonly(); } /*.............................................. */ if ($readonly) { $my_app->set_param('readonly', 1); } } else { $my_app->set_param('readonly', null); } /*.............................................. */ cache_param('readonly');