<?php echo $layout->main(); ?> <?php $explorerAPI = new phpos_explorerAPI(); $explorerAPI->set_file_extension('txt'); $explorerAPI->set_allowed_extensions($my_app->get_param('allowed_extensions')); //echo 'id file: '.$my_app->get_param('id_file').'<br>'; if ($my_app->get_param('file_info') !== null) { $file_info = $my_app->get_param('file_info'); winset('title', $file_info['basename']); $explorerAPI->set_file_info($file_info); $str_file = '<span style="color:black; font-weight:bold;font-size:16px">' . $file_info['basename'] . ' </span>'; $str_fileinfo = '<img src="' . MY_RESOURCES_URL . 'db_file.png" />' . $str_file . ' <b style="padding-left:30px;color:black">' . txt('last_mod') . ':</b> ' . date('Y.m.d. H:i', $file_info['modified_at']) . ', <b style="color:black">' . txt('filesystem') . ':</b> ' . txt('fs_' . $file_info['fs']); echo "<script>\$('#notepadform input[name=action]').val('save');</script>"; //echo $layout->subtitle('<span style="color:black">'.$file_info['basename'].' </span>', MY_RESOURCES_URL.'db_file.png'); } else { $str_fileinfo = '<img src="' . MY_RESOURCES_URL . 'db_file.png" /><span style="color:black; font-weight:bold;font-size:16px">' . txt('app_notepad_new_unsaved') . '</span>'; } $save_action = "\t\t\t\n\t\t\$('#notepadform input[name=action]').val('save');\n\t\t\$('#notepadform').submit(); \t\t\n\t\t"; $save_as_action = "\t\t\t\n\t\t\$('#notepadform input[name=action]').val('save_as');\n\t\t\$('#notepadform').submit(); \t\t\n\t\t"; $forma = new phpos_forms(); $forma->onsuccess($explorerAPI->savefile_dialog()); echo $forma->form_start('notepadform', '', array('app_params' => '')); $forma->input('hidden', 'win_id', '', '', WIN_ID); $forma->input('hidden', 'action', '', '', 'save_as'); $forma->reload_after_submit(array('n'));