} } } } /*.............................................. */ 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>"; } } } }