$_SESSION['phpos_files_handler'][$my_app->get_param('win_id')]['file_data'] = $api_file_content; $my_app->set_param('opened_file_id', null); echo "<script>phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>"; } /*.............................................. */ if ($my_app->get_param('api_action') == 'save') { 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') { $file_info = $explorerAPI->get_file_info(); $data = $explorerAPI->get_cached_data_to_save(); if ($data == null) { $data = ' '; } if ($phposFS->update_file_content($file_info, $data)) { $saved_file_info['fs'] = $my_app->get_param('fs'); $explorerAPI->set_saved_file_info($file_info); $phposFS->set_api_file_id($file_info['id']); $api_file_content = $phposFS->get_file_content(); if (!is_array($_SESSION['phpos_files_handler'])) { $_SESSION['phpos_files_handler'] = array(); } $_SESSION['phpos_files_handler'][$my_app->get_param('win_id')] = array(); $_SESSION['phpos_files_handler'][$my_app->get_param('win_id')]['file_data'] = $api_file_content; $_SESSION['phpos_files_handler'][$my_app->get_param('win_id')]['file_info'] = $file_info; $monit_success = "\n\t\t\t\tjSuccess(\n\t\t\t\t\t'" . txt('file_saved') . "',\n\t\t\t\t\t{\n\t\t\t\t\t\tautoHide : true, \n\t\t\t\t\t\tclickOverlay : false,\n\t\t\t\t\t\tMinWidth : 200,\n\t\t\t\t\t\tTimeShown : 5000,\n\t\t\t\t\t\tShowTimeEffect : 1000,\n\t\t\t\t\t\tHideTimeEffect : 600,\n\t\t\t\t\t\tLongTrip :20,\n\t\t\t\t\t\tHorizontalPosition : 'right',\n\t\t\t\t\t\tVerticalPosition : 'bottom',\n\t\t\t\t\t\tShowOverlay : false\n\t\t\t\t\t}\n\t\t\t\t);"; echo "<script>" . $monit_success . " phpos.windowRefresh('" . $my_app->get_param('win_id') . "',''); " . winclose(WIN_ID) . "</script>"; } } } } /*.............................................. */