本文整理汇总了PHP中html_inputfield类的典型用法代码示例。如果您正苦于以下问题:PHP html_inputfield类的具体用法?PHP html_inputfield怎么用?PHP html_inputfield使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了html_inputfield类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: prefs_list
function prefs_list($args)
{
if ($args['section'] == 'mailbox') {
$RCMAIL = rcmail::get_instance();
$field_id = 'rcmfd_html5_notifier';
$select_duration = new html_select(array('name' => '_html5_notifier_duration', 'id' => $field_id));
$select_duration->add($this->gettext('off'), '0');
$times = array('3', '5', '8', '10', '12', '15', '20', '25', '30');
foreach ($times as $time) {
$select_duration->add($time . ' ' . $this->gettext('seconds'), $time);
}
$select_duration->add($this->gettext('durable'), '-1');
$select_smbox = new html_select(array('name' => '_html5_notifier_smbox', 'id' => $field_id));
$select_smbox->add($this->gettext('no_mailbox'), '0');
$select_smbox->add($this->gettext('short_mailbox'), '1');
$select_smbox->add($this->gettext('full_mailbox'), '2');
$content = $select_duration->show($RCMAIL->config->get('html5_notifier_duration') . '');
$content .= $select_smbox->show($RCMAIL->config->get('html5_notifier_smbox') . '');
$content .= html::a(array('href' => '#', 'id' => 'rcmfd_html5_notifier_browser_conf', 'onclick' => 'rcmail_browser_notifications(); return false;'), $this->gettext('conf_browser')) . ' ';
$content .= html::a(array('href' => '#', 'onclick' => 'rcmail_browser_notifications_test(); return false;'), $this->gettext('test_browser'));
$args['blocks']['new_message']['options']['html5_notifier'] = array('title' => html::label($field_id, rcube::Q($this->gettext('shownotifies'))), 'content' => $content);
$check_only_new = new html_checkbox(array('name' => '_html5_notifier_only_new', 'id' => $field_id . '_only_new', 'value' => 1));
$content = $check_only_new->show($RCMAIL->config->get('html5_notifier_only_new', false));
$args['blocks']['new_message']['options']['html5_notifier_only_new'] = array('title' => html::label($field_id, rcube::Q($this->gettext('onlynew'))), 'content' => $content);
$input_excluded = new html_inputfield(array('name' => '_html5_notifier_excluded_directories', 'id' => $field_id . '_excluded'));
$args['blocks']['new_message']['options']['html5_notifier_excluded_directories'] = array('title' => html::label($field_id, rcube::Q($this->gettext('excluded_directories'))), 'content' => $input_excluded->show($RCMAIL->config->get('html5_notifier_excluded_directories') . ''));
$select_type = new html_select(array('name' => '_html5_notifier_popuptype', 'id' => $field_id . '_popuptype'));
$select_type->add($this->gettext('new_tab'), '0');
$select_type->add($this->gettext('new_window'), '1');
$args['blocks']['new_message']['options']['html5_notifier_popuptype'] = array('title' => html::label($field_id, rcube::Q($this->gettext('notifier_popuptype'))), 'content' => $select_type->show($RCMAIL->config->get('html5_notifier_popuptype') . ''));
$RCMAIL->output->add_script("\$(document).ready(function(){ rcmail_browser_notifications_colorate(); });");
}
return $args;
}
开发者ID:MiraMaX166,项目名称:html5_notifier,代码行数:34,代码来源:html5_notifier.php
示例2: init
/**
* Plugin initialization.
*/
function init()
{
$this->version_detect();
$this->rc = rcube::get_instance();
$this->rm = rcmail::get_instance();
$this->add_hook('user_create', array($this, 'user_create'));
$this->register_action('plugin.pks_search', array($this, 'hkp_search'));
$this->register_action('plugin.hkp_add', array($this, 'hkp_add'));
$this->register_action('plugin.pubkey_save', array($this, 'pubkey_save'));
if ($this->rc->task == 'mail') {
$this->add_hook('render_page', array($this, 'render_page'));
// make localization available on the client
$this->add_texts('localization/', true);
// load js
$this->include_script('js/openpgp.min.js');
$this->include_script('js/rc_openpgpjs.crypto.js');
$this->include_script('js/rc_openpgpjs.js');
if (isset($_SESSION["rc_openpgpjs_outdated"])) {
$this->include_script('js/outdated.js');
}
// load css
$this->include_stylesheet($this->local_skin_path() . '/rc_openpgpjs.css');
// add public key attachment related hooks
$this->add_hook('message_compose', array($this, 'message_compose'));
$this->add_hook('message_sent', array($this, 'unlink_pubkey'));
if ($this->api->output->type == 'html') {
// add key manager item to message menu
$opts = array("command" => "open-key-manager", "label" => "rc_openpgpjs.key_manager", "type" => "link", "classact" => "icon active", "class" => "icon", "innerclass" => "icon key_manager");
$this->api->add_content(html::tag('li', null, $this->api->output->button($opts)), "messagemenu");
if ($this->rc->action == 'compose') {
// add key manager button to compose toolbar
$opts = array("command" => "open-key-manager", "label" => "rc_openpgpjs.key_manager", "type" => "link", "classact" => "button active key_manager", "class" => "button key_manager");
$this->api->add_content($this->api->output->button($opts), "toolbar");
// add encrypt and sign checkboxes to composeoptions
$encrypt_opts = array('id' => 'openpgpjs_encrypt', 'type' => 'checkbox');
if ($this->rc->config->get('encrypt', false)) {
$encrypt_opts['checked'] = 'checked';
}
$encrypt = new html_inputfield($encrypt_opts);
$this->api->add_content(html::span('composeoption', html::label(null, $encrypt->show() . $this->gettext('encrypt'))), "composeoptions");
$sign_opts = array('id' => 'openpgpjs_sign', 'type' => 'checkbox');
if ($this->rc->config->get('sign', false)) {
$sign_opts['checked'] = 'checked';
}
$sign = new html_inputfield($sign_opts);
$this->api->add_content(html::span('composeoption', html::label(null, $sign->show() . $this->gettext('sign'))), "composeoptions");
}
}
} elseif ($this->rc->task == 'settings') {
// load localization
$this->add_texts('localization/', false);
// add hooks for OpenPGP settings
$this->add_hook('preferences_list', array($this, 'preferences_list'));
$this->add_hook('preferences_save', array($this, 'preferences_save'));
}
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:59,代码来源:rc_openpgpjs.php
示例3: prefs_table
function prefs_table($args)
{
if ($args['section'] != 'mailview') {
return $args;
}
$this->add_texts('localization');
$rcmail = rcmail::get_instance();
$limit = (int) $rcmail->config->get('hide_blockquote_limit');
$field_id = 'hide_blockquote_limit';
$input = new html_inputfield(array('name' => '_' . $field_id, 'id' => $field_id, 'size' => 5));
$args['blocks']['main']['options']['hide_blockquote_limit'] = array('title' => $this->gettext('quotelimit'), 'content' => $input->show($limit ?: ''));
return $args;
}
开发者ID:jimjag,项目名称:roundcubemail,代码行数:13,代码来源:hide_blockquote.php
示例4: preferences_list
function preferences_list($args)
{
if ($args['section'] == 'jabber') {
$jabber_username = $this->rc->config->get('jabber_username');
$jabber_domain = $this->rc->config->get('jabber_domain', 'jappix.com');
$jabber_enc = $this->rc->config->get('jabber_enc');
if ((!$jabber_username || !$jabber_enc || !$jabber_domain) && $this->rc->config->get('jappix_register_url')) {
$field_id = 'rcmfd_register';
$args['blocks']['jabber']['options']['jappix_register'] = array('title' => html::label($field_id, @$this->gettext('requirement')), 'content' => html::tag('a', array('href' => $this->rc->config->get('jappix_register_url'), 'target' => '_blank'), $this->gettext('clickhere')) . ' ' . $this->gettext('registeraccount'));
}
$jappix_enabled = $this->rc->config->get('jappix_enabled', 0);
$field_id = 'rcmfd_enabled';
$checkbox = new html_checkbox(array('name' => '_jappix_enabled', 'value' => 1, 'id' => $field_id, 'onclick' => "if(\$(this).prop('checked') == false || \$('input[name=\\'_jabber_username\\']').val() != ''){ \$('.mainaction').hide(); document.forms.form.submit(); };"));
$args['blocks']['jabber']['options']['jappix_enabled'] = array('title' => html::label($field_id, Q($this->gettext('enabled'))), 'content' => $checkbox->show($jappix_enabled ? 1 : 0));
$field_id_user = 'rcmfd_username';
$input_user = new html_inputfield(array('name' => '_jabber_username', 'id' => $field_id_user, 'size' => 25));
if ($jabber_domain == '%d') {
$jabber_domain = end(explode('@', $this->rc->user->data['username']));
}
$field_id_domain = 'rcmfd_domain';
$input_domain = new html_inputfield(array('name' => '_jabber_domain', 'id' => $field_id_domain, 'size' => 25));
$args['blocks']['jabber']['options']['jabber_username'] = array('title' => html::label($field_id, Q($this->gettext('jappixUsername'))), 'content' => $input_user->show($jabber_username) . ' @ ' . $input_domain->show($jabber_domain));
$field_id = 'rcmfd_enc';
$input = new html_passwordfield(array('name' => '_jabber_password', 'id' => $field_id, 'size' => 25, 'placeholder' => $jabber_enc ? $this->gettext('passwordisset') : $this->gettext('pleaseenterpassword')));
$args['blocks']['jabber']['options']['jabber_password'] = array('title' => html::label($field_id, Q($this->gettext('jappixPassword'))), 'content' => $input->show());
$jappix_full = $this->rc->config->get('jappix_full', 1);
$field_id = 'rcmfd_use_full';
$checkbox = new html_checkbox(array('name' => '_jappix_full', 'value' => 1, 'id' => $field_id, 'onclick' => "if(this.checked){ parent.\$('.button-jappix4roundcube').show(); } else { parent.\$('.button-jappix4roundcube').hide(); }; \$('.mainaction').hide(); document.forms.form.submit();"));
$args['blocks']['jabber']['options']['jappix_full'] = array('title' => html::label($field_id, Q($this->gettext('usefulljappix'))), 'content' => $checkbox->show($jappix_full ? 1 : 0));
$jappix_mini = $this->rc->config->get('jappix_mini', 1);
$field_id = 'rcmfd_use_mini';
$checkbox = new html_checkbox(array('name' => '_jappix_mini', 'value' => 1, 'id' => $field_id, 'onclick' => "if(this.checked){ parent.parent.\$('.jm_position').show(); } else { parent.parent.\$('.jm_position').hide(); }; \$('.mainaction').hide(); document.forms.form.submit();"));
$args['blocks']['jabber']['options']['jappix_mini'] = array('title' => html::label($field_id, Q($this->gettext('useminijappix'))), 'content' => $checkbox->show($jappix_mini ? 1 : 0));
$jappix_mini_autologon = $this->rc->config->get('jappix_mini_autologon', 1);
$field_id = 'rcmfd_use_mini_autologon';
$checkbox = new html_checkbox(array('name' => '_jappix_mini_autologon', 'value' => 1, 'id' => $field_id, 'onclick' => "if(this.checked){ parent.parent.\$('.jm_pane').trigger('click'); } else { if(parent.parent.JappixMini) parent.parent.JappixMini.disconnect(); }; \$('.mainaction').hide(); document.forms.form.submit();"));
$args['blocks']['jabber']['options']['jappix_mini_autologon'] = array('title' => html::label($field_id, Q($this->gettext('minijappixautologon'))), 'content' => $checkbox->show($jappix_mini_autologon ? 1 : 0));
/*
$field_id = 'rcmfd_use_manager';
$args['blocks']['jabber']['options']['jabber_manager'] = array(
'title' => html::label($field_id, Q($this->gettext('manager'))),
'content' => '<a target=\'_blank\' href=\''.$this->rc->config->get('jappix_url').'/?m=manager\'>'.Q($this->gettext('manager')).'</a>',
);
*/
}
return $args;
}
开发者ID:haision,项目名称:myroundcube,代码行数:47,代码来源:jappix4roundcube.php
示例5: preferences_list
function preferences_list($params)
{
$rcmail = rcmail::get_instance();
if ($params['section'] == 'addressbook') {
$params['blocks'][$this->id]['name'] = $this->abook_name;
$field_id = 'rc_use_plugin';
$checkbox = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
$params['blocks'][$this->id]['options'][$field_id] = array('title' => html::label($field_id, $this->gettext('use') . $this->abook_name), 'content' => $checkbox->show($rcmail->config->get(google_func::$settings_key_use_plugin)));
$field_id = 'rc_google_autosync';
$checkbox = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
$params['blocks'][$this->id]['options'][$field_id] = array('title' => html::label($field_id, $this->gettext('autosync')), 'content' => $checkbox->show($rcmail->config->get(google_func::$settings_key_auto_sync)));
$field_id = 'rc_google_authcode';
$input_auth = new html_inputfield(array('name' => $field_id, 'id' => $field_id, 'size' => 45));
$params['blocks'][$this->id]['options'][$field_id] = array('title' => html::label($field_id, $this->gettext('authcode')), 'content' => $input_auth->show($rcmail->config->get(google_func::$settings_key_auth_code)));
$params['blocks'][$this->id]['options']['link'] = array('title' => html::span('', ''), 'content' => html::a(array('href' => google_func::get_client()->createAuthUrl(), 'target' => '_blank'), $this->gettext('authcodelink')));
}
return $params;
}
开发者ID:n3storm,项目名称:google_addressbook,代码行数:18,代码来源:google_addressbook.php
示例6: preferences_list
function preferences_list($p)
{
try {
//You must set a block or the section will not be displayed
if ($p['section'] == 'server') {
$this->loadData();
// ================================================================
//Auto reply
$p['blocks'][ARBLOCK]['name'] = $this->gettext('autoreply');
$ctrl_id = 'ztp_ar_enabled';
$ctrl = new html_checkbox(array('name' => '_ar_enabled', 'id' => $ctrl_id, 'value' => 1));
$p['blocks'][ARBLOCK]['options']['ar_enabled'] = array('title' => html::label($ctrl_id, Q($this->gettext('ar_enabled'))), 'content' => $ctrl->show($this->ar_enabled));
$ctrl_id = 'ztp_ar_subject';
$ctrl = new html_inputfield(array('type' => 'text', 'name' => '_ar_subject', 'id' => $ctrl_id));
$p['blocks'][ARBLOCK]['options']['ar_subject'] = array('title' => html::label($ctrl_id, Q($this->gettext('ar_subject'))), 'content' => $ctrl->show($this->ar_subject));
$ctrl_id = 'ztp_ar_body';
$ctrl = new html_textarea(array('name' => '_ar_body', 'id' => $ctrl_id, 'rows' => 5, 'cols' => 50));
$p['blocks'][ARBLOCK]['options']['ar_body'] = array('title' => html::label($ctrl_id, Q($this->gettext('ar_body'))), 'content' => $ctrl->show($this->ar_body));
$ctrl_id = 'ztp_ar_ae_enabled';
$ctrl = new html_checkbox(array('name' => '_ar_ae_enabled', 'id' => $ctrl_id, 'value' => 1));
$ctrl2_id = 'ztp_ar_ae_date';
$ctrl2 = new html_inputfield(array('name' => '_ar_ae_date', 'id' => $ctrl2_id));
$p['blocks'][ARBLOCK]['options']['ar_ae_enabled'] = array('title' => html::label($ctrl_id, Q($this->gettext('ar_ae_enabled'))), 'content' => $ctrl->show($this->ar_ae_enabled) . " " . $ctrl2->show($this->ar_ae_date));
// ================================================================
//Forwarder
$p['blocks'][FWBLOCK]['name'] = $this->gettext('forwarder');
$ctrl_id = 'ztp_fw_enabled';
$ctrl = new html_checkbox(array('name' => '_fw_enabled', 'id' => $ctrl_id, 'value' => 1));
$p['blocks'][FWBLOCK]['options']['fw_enabled'] = array('title' => html::label($ctrl_id, Q($this->gettext('fw_enabled'))), 'content' => $ctrl->show($this->fw_enabled));
$ctrl_id = 'ztp_fw_address';
$ctrl = new html_inputfield(array('name' => '_fw_address', 'id' => $ctrl_id));
$p['blocks'][FWBLOCK]['options']['fw_address'] = array('title' => html::label($ctrl_id, Q($this->gettext('fw_address'))), 'content' => $ctrl->show($this->fw_address));
$ctrl_id = 'ztp_fw_keeporiginal';
$ctrl = new html_checkbox(array('name' => '_fw_keeporiginal', 'id' => $ctrl_id, 'value' => 1));
$p['blocks'][FWBLOCK]['options']['fw_keeporiginal'] = array('title' => html::label($ctrl_id, Q($this->gettext('fw_keeporiginal'))), 'content' => $ctrl->show($this->fw_keeporiginal));
}
} catch (Exception $e) {
$p['abort'] = true;
$p['result'] = false;
$p['message'] = $e->getMessage();
}
return $p;
}
开发者ID:hazarkarabay,项目名称:hmsfromrc,代码行数:43,代码来源:hmsfromrc.php
示例7: gen_form
function gen_form()
{
$user = $this->rcmail_inst->user->get_prefs();
$this->rcmail_inst->output->add_label('ispconfig3_forward.invalidaddress', 'ispconfig3_forward.forwardingempty');
try {
$session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
$mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
$this->soap->logout($session_id);
} catch (SoapFault $e) {
$this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
}
$this->rcmail_inst->output->set_env('framed', TRUE);
$out .= '<fieldset><legend>' . $this->gettext('acc_forward') . '</legend>' . "\n";
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
$input_forwardingaddress = new html_inputfield(array('name' => '_forwardingaddress', 'id' => 'forwardingaddress', 'value' => $forward[1], 'maxlength' => 320, 'size' => 40));
$table->add('title', rep_specialchars_output($this->gettext('forwardingaddress')));
$table->add('', $input_forwardingaddress->show($mail_user[0]['cc']));
$out .= $table->show();
$out .= "</fieldset>\n";
return $out;
}
开发者ID:ircf,项目名称:roundcubemail,代码行数:21,代码来源:ispconfig3_forward.php
示例8: gen_form
function gen_form()
{
$user = $this->rcmail_inst->user->get_prefs();
$this->rcmail_inst->output->add_label('ispconfig3_forward.invalidaddress', 'ispconfig3_forward.forwardingempty');
$this->rcmail_inst->output->set_env('framed', true);
$out .= '<fieldset><legend>' . $this->gettext('acc_forward') . '</legend>' . "\n";
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
$input_forwardingaddress = new html_inputfield(array('name' => '_forwardingaddress', 'id' => 'forwardingaddress', 'value' => '', 'maxlength' => 320, 'size' => 40));
$table->add('title', rep_specialchars_output($this->gettext('forwardingaddress')));
$table->add('', $input_forwardingaddress->show());
$out .= $table->show();
$out .= "</fieldset>\n";
return $out;
}
开发者ID:jdsn,项目名称:w2c--ispconfig3_roundcube,代码行数:14,代码来源:ispconfig3_forward.php
示例9: prefs_list
public function prefs_list($args)
{
if ($args['section'] != 'thunderbird_labels') {
return $args;
}
$this->load_config();
$dont_override = (array) $this->rc->config->get('dont_override', array());
$args['blocks']['tb_label'] = array();
$args['blocks']['tb_label']['name'] = $this->gettext('tb_label_options');
$key = 'tb_label_enable';
if (!in_array($key, $dont_override)) {
$input = new html_checkbox(array('name' => $key, 'id' => $key, 'value' => 1));
$content = $input->show($this->rc->config->get($key));
$args['blocks']['tb_label']['options'][$key] = array('title' => $this->gettext('tb_label_enable_option'), 'content' => $content);
}
$key = 'tb_label_enable_shortcuts';
if (!in_array($key, $dont_override)) {
$input = new html_checkbox(array('name' => $key, 'id' => $key, 'value' => 1));
$content = $input->show($this->rc->config->get($key));
$args['blocks']['tb_label']['options'][$key] = array('title' => $this->gettext('tb_label_enable_shortcuts_option'), 'content' => $content);
}
$key = 'tb_label_style';
if (!in_array($key, $dont_override)) {
$select = new html_select(array('name' => $key, 'id' => $key));
$select->add(array($this->gettext('thunderbird'), $this->gettext('bullets')), array('thunderbird', 'bullets'));
$content = $select->show($this->rc->config->get($key));
$args['blocks']['tb_label']['options'][$key] = array('title' => $this->gettext('tb_label_style_option'), 'content' => $content);
}
$key = 'tb_label_custom_labels';
if (!in_array($key, $dont_override) && $this->rc->config->get('tb_label_modify_labels')) {
$old = $this->rc->config->get($key);
for ($i = 1; $i <= 5; $i++) {
$input = new html_inputfield(array('name' => $key . $i, 'id' => $key . $i, 'type' => 'text', 'autocomplete' => 'off', 'value' => $old[$i]));
$args['blocks']['tb_label']['options'][$key . $i] = array('title' => $this->gettext('tb_label_label') . " " . $i, 'content' => $input->show());
}
}
return $args;
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:38,代码来源:thunderbird_labels.php
示例10: templ_user
/**
* Creates ACL rights form (user part)
*
* @param array $attrib Template object attributes
*
* @return string HTML Content
*/
function templ_user($attrib)
{
// Create username input
$attrib['name'] = 'acluser';
$textfield = new html_inputfield($attrib);
$fields['user'] = html::label(array('for' => 'iduser'), $this->gettext('username')) . ' ' . $textfield->show();
// Add special entries
if (!empty($this->specials)) {
foreach ($this->specials as $key) {
$fields[$key] = html::label(array('for' => 'id' . $key), $this->gettext($key));
}
}
$this->rc->output->set_env('acl_specials', $this->specials);
// Create list with radio buttons
if (count($fields) > 1) {
$ul = '';
$radio = new html_radiobutton(array('name' => 'usertype'));
foreach ($fields as $key => $val) {
$ul .= html::tag('li', null, $radio->show($key == 'user' ? 'user' : '', array('value' => $key, 'id' => 'id' . $key)) . $val);
}
$out = html::tag('ul', array('id' => 'usertype', 'class' => $attrib['class']), $ul, html::$common_attrib);
} else {
$out = $fields['user'];
}
return $out;
}
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:33,代码来源:acl.php
示例11: html_inputfield
$pagesize = $RCI->getprop('pagesize');
}
$input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'size' => 6, 'id' => "cfgmailpagesize"));
echo $input_pagesize->show($pagesize);
?>
<div>Show up to X items in the mail messages list view.</div>
</dd>
<dt class="propname">addressbook_pagesize <span class="userconf">*</span></dt>
<dd>
<?php
$pagesize = $RCI->getprop('addressbook_pagesize');
if (!$pagesize) {
$pagesize = $RCI->getprop('pagesize');
}
$input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'size' => 6, 'id' => "cfgabookpagesize"));
echo $input_pagesize->show($pagesize);
?>
<div>Show up to X items in the contacts list view.</div>
</dd>
<dt class="propname">prefer_html <span class="userconf">*</span></dt>
<dd>
<?php
$check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
?>
<label for="cfghtmlview">Prefer displaying HTML messages</label><br />
</dd>
<dt class="propname">preview_pane <span class="userconf">*</span></dt>
开发者ID:StudsPro,项目名称:islandpeeps.com,代码行数:31,代码来源:config.php
示例12: filterset_form
function filterset_form($attrib)
{
if (!$attrib['id']) {
$attrib['id'] = 'rcmfiltersetform';
}
$out = '<form name="filtersetform" action="./" method="post" enctype="multipart/form-data">' . "\n";
$hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
$hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
$hiddenfields->add(array('name' => '_framed', 'value' => $_POST['_framed'] || $_GET['_framed'] ? 1 : 0));
$hiddenfields->add(array('name' => '_newset', 'value' => 1));
$out .= $hiddenfields->show();
$name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST);
$copy = rcube_utils::get_input_value('_copy', rcube_utils::INPUT_POST);
$selected = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST);
// filter set name input
$input_name = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30, 'class' => $this->errors['name'] ? 'error' : ''));
$out .= sprintf('<label for="%s"><b>%s:</b></label> %s<br /><br />', '_name', rcube::Q($this->plugin->gettext('filtersetname')), $input_name->show($name));
$out .= "\n<fieldset class=\"itemlist\"><legend>" . $this->plugin->gettext('filters') . ":</legend>\n";
$out .= '<input type="radio" id="from_none" name="_from" value="none"' . (!$selected || $selected == 'none' ? ' checked="checked"' : '') . '></input>';
$out .= sprintf('<label for="%s">%s</label> ', 'from_none', rcube::Q($this->plugin->gettext('none')));
// filters set list
$list = $this->list_scripts();
$select = new html_select(array('name' => '_copy', 'id' => '_copy'));
if (is_array($list)) {
asort($list, SORT_LOCALE_STRING);
if (!$copy) {
$copy = $_SESSION['managesieve_current'];
}
foreach ($list as $set) {
$select->add($set, $set);
}
$out .= '<br /><input type="radio" id="from_set" name="_from" value="set"' . ($selected == 'set' ? ' checked="checked"' : '') . '></input>';
$out .= sprintf('<label for="%s">%s:</label> ', 'from_set', rcube::Q($this->plugin->gettext('fromset')));
$out .= $select->show($copy);
}
// script upload box
$upload = new html_inputfield(array('name' => '_file', 'id' => '_file', 'size' => 30, 'type' => 'file', 'class' => $this->errors['file'] ? 'error' : ''));
$out .= '<br /><input type="radio" id="from_file" name="_from" value="file"' . ($selected == 'file' ? ' checked="checked"' : '') . '></input>';
$out .= sprintf('<label for="%s">%s:</label> ', 'from_file', rcube::Q($this->plugin->gettext('fromfile')));
$out .= $upload->show();
$out .= '</fieldset>';
$this->rc->output->add_gui_object('sieveform', 'filtersetform');
if ($this->errors['name']) {
$this->add_tip('_name', $this->errors['name'], true);
}
if ($this->errors['file']) {
$this->add_tip('_file', $this->errors['file'], true);
}
$this->print_tips();
return $out;
}
开发者ID:zamentur,项目名称:roundcube_ynh,代码行数:51,代码来源:rcube_sieve_engine.php
示例13: html_select
</table>
<p><input type="submit" name="sendmail" value="Send test mail" /></p>
<h3>Test IMAP config</h3>
<?php
$default_hosts = $RCI->get_hostlist();
if (!empty($default_hosts)) {
$host_field = new html_select(array('name' => '_host', 'id' => 'imaphost'));
$host_field->add($default_hosts);
} else {
$host_field = new html_inputfield(array('name' => '_host', 'id' => 'imaphost'));
}
$user_field = new html_inputfield(array('name' => '_user', 'id' => 'imapuser'));
$pass_field = new html_passwordfield(array('name' => '_pass', 'id' => 'imappass'));
?>
<table>
<tbody>
<tr>
<td><label for="imaphost">Server</label></td>
<td><?php
echo $host_field->show($_POST['_host']);
?>
</td>
</tr>
<tr>
<td>Port</td>
<td><?php
开发者ID:jimjag,项目名称:roundcubemail,代码行数:31,代码来源:test.php
示例14: preferences_list
function preferences_list($args)
{
if ($args['section'] != 'server' || !$this->is_enabled()) {
return $args;
}
$disabled = $this->disallow_change();
// add checkbox to enable/disable YubiKey auth for the current user
$chk_yubikey = new html_checkbox(array('name' => '_yubikey_required', 'id' => 'rcmfd_yubikey_required', 'disabled' => $disabled));
$args['blocks']['main']['options']['yubikey_required'] = array('title' => html::label('rcmfd_yubikey_required', Q($this->gettext('yubikeyrequired'))), 'content' => $chk_yubikey->show(!$this->is_required()));
// add inputfield for the YubiKey id
$input_yubikey_id = new html_inputfield(array('name' => '_yubikey_id', 'id' => 'rcmfd_yubikey_id', 'size' => 12, 'disabled' => $disabled));
$args['blocks']['main']['options']['yubikey_id'] = array('title' => html::label('rcmfd_yubikey_id', Q($this->gettext('yubikeyid'))), 'content' => $input_yubikey_id->show($this->get('yubikey_id')));
// add inputfield for the YubiKey id2
$input_yubikey_id2 = new html_inputfield(array('name' => '_yubikey_id2', 'id' => 'rcmfd_yubikey_id2', 'size' => 12, 'disabled' => $disabled));
$args['blocks']['main']['options']['yubikey_id2'] = array('title' => html::label('rcmfd_yubikey_id2', Q($this->gettext('yubikeyid2'))), 'content' => $input_yubikey_id2->show($this->get('yubikey_id2')));
// add inputfield for the YubiKey id3
$input_yubikey_id3 = new html_inputfield(array('name' => '_yubikey_id3', 'id' => 'rcmfd_yubikey_id3', 'size' => 12, 'disabled' => $disabled));
$args['blocks']['main']['options']['yubikey_id3'] = array('title' => html::label('rcmfd_yubikey_id3', Q($this->gettext('yubikeyid3'))), 'content' => $input_yubikey_id3->show($this->get('yubikey_id3')));
return $args;
}
开发者ID:northox,项目名称:roundcube-yubikey-plugin,代码行数:20,代码来源:yubikey_authentication.php
示例15: _prefs_block
private function _prefs_block($part, $attrib)
{
$rcmail = rcube::get_instance();
$no_override = array_flip($rcmail->config->get('sauserprefs_dont_override'));
$locale_info = localeconv();
switch ($part) {
// General tests
case 'general':
$out = '';
$data = '';
$table = new html_table(array('class' => 'generalprefstable', 'cols' => 2));
if (!isset($no_override['required_hits'])) {
$field_id = 'rcmfd_spamthres';
$input_spamthres = new html_select(array('name' => '_spamthres', 'id' => $field_id));
$input_spamthres->add($this->gettext('defaultscore'), '');
$decPlaces = 0;
if ($rcmail->config->get('sauserprefs_score_inc') - (int) $rcmail->config->get('sauserprefs_score_inc') > 0) {
$decPlaces = strlen($rcmail->config->get('sauserprefs_score_inc') - (int) $rcmail->config->get('sauserprefs_score_inc')) - 2;
}
$score_found = false;
for ($i = 1; $i <= 10; $i = $i + $rcmail->config->get('sauserprefs_score_inc')) {
$input_spamthres->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
if (!$score_found && $this->user_prefs['required_hits'] && (double) $this->user_prefs['required_hits'] == (double) $i) {
$score_found = true;
}
}
if (!$score_found && $this->user_prefs['required_hits']) {
$input_spamthres->add(str_replace('%s', $this->user_prefs['required_hits'], $this->gettext('otherscore')), (double) $this->user_prefs['required_hits']);
}
$table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamthres'))));
$table->add(null, $input_spamthres->show(number_format($this->user_prefs['required_hits'], $decPlaces, '.', '')));
$table->add(array('colspan' => 2), rcmail::Q($this->gettext('spamthresexp')));
}
if (!isset($no_override['rewrite_header Subject'])) {
$field_id = 'rcmfd_spamsubject';
$input_spamsubject = new html_inputfield(array('name' => '_spamsubject', 'id' => $field_id, 'value' => $this->user_prefs['rewrite_header Subject'], 'style' => 'width:200px;'));
$table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamsubject'))));
$table->add(null, $input_spamsubject->show());
$table->add('title', " ");
$table->add(null, rcmail::Q($this->gettext('spamsubjectblank')));
}
if ($table->size() > 0) {
$out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $table->show());
}
if (!isset($no_override['ok_languages']) || !isset($no_override['ok_locales'])) {
$data = html::p(null, rcmail::Q($this->gettext('spamlangexp')));
$table = new html_table(array('class' => 'langprefstable', 'cols' => 1));
$select_all = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_all_langs', 'type' => 'link', 'label' => 'all'));
$select_none = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_no_langs', 'type' => 'link', 'label' => 'none'));
$select_invert = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_invert_langs', 'type' => 'link', 'label' => 'invert'));
$table->add(array('id' => 'listcontrols'), $this->gettext('select') . ": " . $select_all . " " . $select_invert . " " . $select_none);
$lang_table = new html_table(array('id' => 'spam-langs-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
$lang_table->add_header(array('colspan' => 2), $this->gettext('language'));
if (!isset($no_override['ok_locales'])) {
if ($this->user_prefs['ok_locales'] == "all") {
$ok_locales = $this->sa_locales;
} else {
$ok_locales = explode(" ", $this->user_prefs['ok_locales']);
}
} else {
$ok_locales = array();
}
if (!isset($no_override['ok_languages'])) {
if ($this->user_prefs['ok_languages'] == "all") {
$ok_languages = array_keys($rcmail->config->get('sauserprefs_languages'));
} else {
$ok_languages = explode(" ", $this->user_prefs['ok_languages']);
}
} else {
$tmp_array = $rcmail->config->get('sauserprefs_languages');
$rcmail->config->set('sauserprefs_languages', array_intersect_key($tmp_array, array_flip($this->sa_locales)));
$ok_languages = array();
}
$i = 0;
$locales_langs = array_merge($ok_locales, $ok_languages);
foreach ($rcmail->config->get('sauserprefs_languages') as $lang_code => $name) {
if (in_array($lang_code, $locales_langs)) {
$button = $this->api->output->button(array('command' => 'plugin.sauserprefs.message_lang', 'prop' => $lang_code, 'type' => 'link', 'class' => 'enabled', 'id' => 'spam_lang_' . $i, 'title' => 'sauserprefs.enabled', 'content' => ' '));
} else {
$button = $this->api->output->button(array('command' => 'plugin.sauserprefs.message_lang', 'prop' => $lang_code, 'type' => 'link', 'class' => 'disabled', 'id' => 'spam_lang_' . $i, 'title' => 'sauserprefs.disabled', 'content' => ' '));
}
$input_spamlang = new html_checkbox(array('style' => 'display: none;', 'name' => '_spamlang[]', 'value' => $lang_code));
$lang_table->add('lang', $name);
$lang_table->add('tick', $button . $input_spamlang->show(in_array($lang_code, $locales_langs) ? $lang_code : ''));
$i++;
}
$table->add('scroller', html::div(array('id' => 'spam-langs-cont'), $lang_table->show()));
$out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('langoptions'))) . $data . $table->show());
}
break;
// Header settings
// Header settings
case 'headers':
$data = html::p(null, rcmail::Q($this->gettext('headersexp')));
$table = new html_table(array('class' => 'headersprefstable', 'cols' => 3));
if (!isset($no_override['fold_headers'])) {
$help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
$help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sauserprefs_help("fold_help");', 'title' => $this->gettext('help')), $help_button);
$field_id = 'rcmfd_spamfoldheaders';
$input_spamreport = new html_checkbox(array('name' => '_spamfoldheaders', 'id' => $field_id, 'value' => '1'));
//.........这里部分代码省略.........
开发者ID:elurofilico,项目名称:i-MSCP-plugins,代码行数:101,代码来源:sauserprefs.php
示例16: attachments_form
/**
* Generate the form for event attachments upload
*/
function attachments_form($attrib = array())
{
// add ID if not given
if (!$attrib['id']) {
$attrib['id'] = 'rcmtaskuploadform';
}
// Get max filesize, enable upload progress bar
$max_filesize = rcube_upload_init();
$button = new html_inputfield(array('type' => 'button'));
$input = new html_inputfield(array('type' => 'file', 'name' => '_attachments[]', 'multiple' => 'multiple', 'size' => $attrib['attachmentfieldsize']));
return html::div($attrib, html::div(null, $input->show()) . html::div('formbuttons', $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".upload_file(this.form)"))) . html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))));
}
开发者ID:elurofilico,项目名称:i-MSCP-plugins,代码行数:15,代码来源:tasklist_ui.php
-
参考:http://www.jianshu.com/p/f0cefc737dda ①在下载matlab linux版.iso, ②在win
阅读:550|2022-07-18
-
In Eclipse Jetty HTTP/2 server implementation, when encountering an invalid HTTP
阅读:635|2022-07-08
-
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1583|2022-08-30
-
joaomh/curso-de-matlab
阅读:1146|2022-08-17
-
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1001|2022-11-06
-
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1078|2022-08-17
-
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:759|2022-08-16
-
耳的笔顺是什么?耳的笔顺笔画顺序怎么写?还有耳的拼音及意思是什么,好多初学练字者
阅读:858|2022-07-30
-
ulissescastro/linux-native-backdoors: Repository holding all alternatives of *ni
阅读:569|2022-08-15
-
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:361|2022-11-06
|
请发表评论