$ftp->get_ftp(); echo $layout->title(txt('edit_ftp'), 'icon.png'); echo $layout->txtdesc(txt('dsc_ftp_title')); echo helper_result('update_ftp'); $form = new phpos_forms(); echo $form->form_start('update_ftp', helper_ajax('section.edit_account.php'), array('app_params' => '')); $form->reload_after_submit(array('nowy')); $form->input('hidden', 'action', '', '', 'update_ftp'); echo $layout->column('50%'); $form->title($ftp->get_title(), null, ICONS . 'edit.png'); $form->condition('not_null', true, txt('form_empty_field') . txt('title')); $form->input('text', 'ftp_new_title', txt('title'), txt('dsc_ftp_name'), $ftp->get_title()); $form->input('text', 'ftp_new_desc', txt('desc'), txt('dsc_ftp_desc'), $ftp->get_desc()); if (is_root() || is_admin()) { $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();