Beispiel #1
0
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
global $footer;
echo $layout->back_button(null, helper_reload(array('msg_id' => null)), null, null);
$msg = new phpos_messages();
$msg_data = $msg->get_msg($my_app->get_param('msg_id'));
$form = new phpos_forms();
//$form->onsuccess(helper_reload(array('section' => 'sended')));
echo $form->form_start('', '', array('app_params' => ''));
$form->texteditor('msg_body', null, null, $msg_data['msg']);
if ($msg->is_to_me($my_app->get_param('msg_id'))) {
    $u = new phpos_users();
    $u->set_id_user($msg_data['id_user_from']);
    $u->get_user_by_id();
    $authors = '<span style="color:black; font-weight:bold;font-size:16px">' . txt('messager_tbl_from') . ': ' . $u->get_user_login() . ' </span>';
    $form->button(txt('messager_btn_reply'), helper_reload(array('section' => 'new', 'reply_id' => $my_app->get_param('msg_id'))), 'reply');
} else {
    $u = new phpos_users();
    $u->set_id_user($msg_data['id_user_to']);
    $u->get_user_by_id();
    $authors = '<span style="color:black; font-weight:bold;font-size:16px">' . txt('messager_tbl_to') . ': ' . $u->get_user_login() . ' </span>';
}
$footer = '<img src="' . MY_RESOURCES_URL . 'msg2.png" />' . $authors . ' <b style="padding-left:30px;color:black">' . txt('messager_sent') . ':</b> ' . date('Y.m.d. H:i', $msg_data['sended_at']);
echo $form->render();
echo $form->form_end();
            $items = array('0' => txt('no'), '1' => txt('yes'));
            $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, $ftp->get_is_public());
        } else {
            $form->input('hidden', 'ftp_new_public', '', '', '0');
        }
        echo $form->render();
        echo $layout->end('column');
        echo $layout->column('50%');
        $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png');
        $form->condition('not_null', true, txt('form_empty_field') . 'Host');
        $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), $ftp->get_host());
        $form->condition('not_null', true, txt('form_empty_field') . 'Login');
        $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), $ftp->get_login());
        $form->condition('not_null', true, txt('form_empty_field') . txt('password'));
        $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), $ftp->get_password());
        $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), $ftp->get_port());
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $ftp->get_id() . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('btn_update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
    } else {
        echo $layout->access_denied();
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
}
Beispiel #3
0
    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'));
$forma->texteditor('txt', null, null, $my_app->get_param('notepad'));
if (is_array($file_info)) {
    $forma->button(txt('save'), $save_action, 'filesave');
}
$forma->button(txt('save_as'), $save_as_action, 'edit_add');
$forma->status();
echo $forma->render();
echo $forma->form_end();
/*	
	echo '<pre>';
	print_r($_SESSION['phpos_savefiles_handler']);
	echo '</pre>';
*/
?>
		 
<?php 
echo $layout->end('main');
?>