当前位置: 首页>>代码示例>>PHP>>正文


PHP html_table::show方法代码示例

本文整理汇总了PHP中html_table::show方法的典型用法代码示例。如果您正苦于以下问题:PHP html_table::show方法的具体用法?PHP html_table::show怎么用?PHP html_table::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html_table的用法示例。


在下文中一共展示了html_table::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list

 function gen_form()
 {
     list($form_start, $form_end) = get_form_tags(null, 'plugin.changepasswd_AD.save');
     // return the complete form as table
     $out = $form_start;
     $table = new html_table(array('cols' => 2));
     // show old password field
     $field_id = 'rcmfd_curpwd';
     $input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id));
     $table->add('title', html::label($field_id, Q($this->gettext('curpasswd'))));
     $table->add(null, $input_curpasswd->show());
     // show new password field
     $field_id = 'rcmfd_newpwd';
     $input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id));
     $table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
     $table->add(null, $input_newpasswd->show());
     // show new password confirm field
     $field_id = 'rcmfd_cnfpwd';
     $input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id));
     $table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
     $table->add(null, $input_confpasswd->show());
     $out .= $table->show();
     $out .= $form_end;
     return $out;
 }
开发者ID:adrenlinerush,项目名称:Roundcube-Plugin-ActiveDirectory-Passwd,代码行数:25,代码来源:changepasswd_AD.php

示例2: intval

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_utils::idn_to_utf8($identity['email']), 'disabled' => in_array($identities_level, array(1, 3, 4)))));
         $table->add('title', $this->gettext('organization'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('signature'));
         $table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::tag('form', array('id' => 'newuserdialog', 'action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save'))))));
         $title = rcube::JQ($this->gettext('identitydialogtitle'));
         $script = "\n\$('#newuserdialog').show()\n  .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'{$title}'})\n  .submit(function() {\n    var i, request = {}, form = \$(this).serializeArray();\n    for (i in form)\n      request[form[i].name] = form[i].value;\n\n      rcmail.http_post('plugin.newusersave', request, true);\n      return false;\n  });\n\n\$('input[name=_name]').focus();\nrcube_webmail.prototype.new_user_dialog_close = function() { \$('#newuserdialog').dialog('close'); }\n";
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script($script, 'docready');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:30,代码来源:new_user_dialog.php

示例3: forward_form

 public function forward_form()
 {
     $table = new html_table(array('cols' => 2));
     $field_id = 'forwardforwards';
     $text_forwardforwards = new html_textarea(array('name' => '_forwardforwards', 'id' => $field_id, 'spellcheck' => 1, 'rows' => 6, 'cols' => 40));
     $table->add('title', html::label($field_id, Q($this->gettext('forwardforwards'))));
     $table->add(null, $text_forwardforwards->show($this->obj->get_forward_forwards()));
     $field_id = 'forwardkeepcopies';
     $input_forwardkeepcopies = new html_checkbox(array('name' => '_forwardkeepcopies', 'id' => $field_id, 'value' => 1));
     $table->add('title', html::label($field_id, Q($this->gettext('forwardkeepcopies'))));
     $table->add(null, $input_forwardkeepcopies->show($this->obj->is_forward_keepcopies() === true || $this->obj->is_forward_keepcopies() == "1" || $this->obj->is_forward_keepcopies() == "t" || $this->obj->is_forward_keepcopies() == "y" || $this->obj->is_forward_keepcopies() == "yes" ? 1 : 0));
     $out = html::div(array('class' => "box"), html::div(array('id' => "prefs-title", 'class' => 'boxtitle'), $this->gettext('forward')) . html::div(array('class' => "boxcontent"), $table->show() . html::p(null, $this->rc->output->button(array('command' => 'plugin.forward-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
     $this->rc->output->add_gui_object('forwardform', 'forward-form');
     return $this->rc->output->form_tag(array('id' => 'forward-form', 'name' => 'forward-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.forward-save'), $out);
 }
开发者ID:freedomson,项目名称:roundcube-forward,代码行数:15,代码来源:forward.php

示例4: intval

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog']) {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => "text", 'name' => "_name", 'value' => $identity['name'])));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => "text", 'name' => "_email", 'value' => $identity['email'], 'disabled' => $identities_level == 1 || $identities_level == 3)));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::div(array('id' => "newuseroverlay"), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => "post"), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => "formbuttons"), html::tag('input', array('type' => "submit", 'class' => "button mainaction", 'value' => $this->gettext('save')))))));
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:DavidGarciaCat,项目名称:eyeos,代码行数:22,代码来源:new_user_dialog.php

示例5: intval

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'])));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => idn_to_utf8($identity['email']), 'disabled' => $identities_level == 1 || $identities_level == 3)));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::div(array('id' => 'newuseroverlay'), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save')))))));
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script("\$(document).ready(function () {\n          rcmail.message_list.key_press = function(){};\n          rcmail.message_list.key_down = function(){};\n          \$('input[name=_name]').focus();\n          });", 'foot');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:shishenkov,项目名称:zpanel,代码行数:24,代码来源:new_user_dialog.php

示例6: infohtml

 function infohtml()
 {
     $rcmail = rcmail::get_instance();
     $user = $rcmail->user;
     $table = new html_table(array('cols' => 2, 'cellpadding' => 3));
     $table->add('title', 'ID');
     $table->add('', Q($user->ID));
     $table->add('title', Q($this->gettext('username')));
     $table->add('', Q($user->data['username']));
     $table->add('title', Q($this->gettext('server')));
     $table->add('', Q($user->data['mail_host']));
     $table->add('title', Q($this->gettext('created')));
     $table->add('', Q($user->data['created']));
     $table->add('title', Q($this->gettext('lastlogin')));
     $table->add('', Q($user->data['last_login']));
     $identity = $user->get_identity();
     $table->add('title', Q($this->gettext('defaultidentity')));
     $table->add('', Q($identity['name'] . ' <' . $identity['email'] . '>'));
     return html::tag('h4', null, Q('Infos for ' . $user->get_username())) . $table->show();
 }
开发者ID:shishenkov,项目名称:zpanel,代码行数:20,代码来源:userinfo.php

示例7: array

 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: vacation_form

 /**
  * Independent vacation form
  */
 public function vacation_form($attrib)
 {
     // check supported extensions
     $date_extension = in_array('date', $this->exts);
     $regex_extension = in_array('regex', $this->exts);
     $seconds_extension = in_array('vacation-seconds', $this->exts);
     // build FORM tag
     $form_id = $attrib['id'] ?: 'form';
     $out = $this->rc->output->request_form(array('id' => $form_id, 'name' => $form_id, 'method' => 'post', 'task' => 'settings', 'action' => 'plugin.managesieve-vacation', 'noclose' => true) + $attrib);
     $from_addr = $this->rc->config->get('managesieve_vacation_from_init');
     $auto_addr = $this->rc->config->get('managesieve_vacation_addresses_init');
     if (count($this->vacation) < 2) {
         if ($auto_addr) {
             $this->vacation['addresses'] = $this->user_emails();
         }
         if ($from_addr) {
             $default_identity = $this->rc->user->list_emails(true);
             $this->vacation['from'] = $default_identity['email'];
         }
     }
     // form elements
     $from = new html_inputfield(array('name' => 'vacation_from', 'id' => 'vacation_from', 'size' => 50));
     $subject = new html_inputfield(array('name' => 'vacation_subject', 'id' => 'vacation_subject', 'size' => 50));
     $reason = new html_textarea(array('name' => 'vacation_reason', 'id' => 'vacation_reason', 'cols' => 60, 'rows' => 8));
     $interval = new html_inputfield(array('name' => 'vacation_interval', 'id' => 'vacation_interval', 'size' => 5));
     $addresses = '<textarea name="vacation_addresses" id="vacation_addresses" data-type="list" data-size="30" style="display: none">' . rcube::Q(implode("\n", (array) $this->vacation['addresses']), 'strict', false) . '</textarea>';
     $status = new html_select(array('name' => 'vacation_status', 'id' => 'vacation_status'));
     $action = new html_select(array('name' => 'vacation_action', 'id' => 'vacation_action', 'onchange' => 'vacation_action_select()'));
     $addresses_link = new html_inputfield(array('type' => 'button', 'href' => '#', 'class' => 'button', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.managesieve_vacation_addresses()'));
     $status->add($this->plugin->gettext('vacation.on'), 'on');
     $status->add($this->plugin->gettext('vacation.off'), 'off');
     $action->add($this->plugin->gettext('vacation.keep'), 'keep');
     $action->add($this->plugin->gettext('vacation.discard'), 'discard');
     $action->add($this->plugin->gettext('vacation.redirect'), 'redirect');
     if (in_array('copy', $this->exts)) {
         $action->add($this->plugin->gettext('vacation.copy'), 'copy');
     }
     if ($this->rc->config->get('managesieve_vacation') != 2 && count($this->vacation['list'])) {
         $after = new html_select(array('name' => 'vacation_after', 'id' => 'vacation_after'));
         $after->add('', '');
         foreach ($this->vacation['list'] as $idx => $rule) {
             $after->add($rule, $idx);
         }
     }
     $interval_txt = $interval->show(self::vacation_interval($this->vacation));
     if ($seconds_extension) {
         $interval_select = new html_select(array('name' => 'vacation_interval_type'));
         $interval_select->add($this->plugin->gettext('days'), 'days');
         $interval_select->add($this->plugin->gettext('seconds'), 'seconds');
         $interval_txt .= '&nbsp;' . $interval_select->show(isset($this->vacation['seconds']) ? 'seconds' : 'days');
     } else {
         $interval_txt .= '&nbsp;' . $this->plugin->gettext('days');
     }
     if ($date_extension || $regex_extension) {
         $date_from = new html_inputfield(array('name' => 'vacation_datefrom', 'id' => 'vacation_datefrom', 'class' => 'datepicker', 'size' => 12));
         $date_to = new html_inputfield(array('name' => 'vacation_dateto', 'id' => 'vacation_dateto', 'class' => 'datepicker', 'size' => 12));
         $date_format = $this->rc->config->get('date_format', 'Y-m-d');
     }
     if ($date_extension) {
         $time_from = new html_inputfield(array('name' => 'vacation_timefrom', 'id' => 'vacation_timefrom', 'size' => 6));
         $time_to = new html_inputfield(array('name' => 'vacation_timeto', 'id' => 'vacation_timeto', 'size' => 6));
         $time_format = $this->rc->config->get('time_format', 'H:i');
         $date_value = array();
         foreach ((array) $this->vacation['tests'] as $test) {
             if ($test['test'] == 'currentdate') {
                 $idx = $test['type'] == 'value-ge' ? 'from' : 'to';
                 if ($test['part'] == 'date') {
                     $date_value[$idx]['date'] = $test['arg'];
                 } else {
                     if ($test['part'] == 'iso8601') {
                         $date_value[$idx]['datetime'] = $test['arg'];
                     }
                 }
             }
         }
         foreach ($date_value as $idx => $value) {
             $date = $value['datetime'] ?: $value['date'];
             $date_value[$idx] = $this->rc->format_date($date, $date_format, false);
             if (!empty($value['datetime'])) {
                 $date_value['time_' . $idx] = $this->rc->format_date($date, $time_format, true);
             }
         }
     } else {
         if ($regex_extension) {
             // Sieve 'date' extension not available, read start/end from RegEx based rules instead
             if ($date_tests = self::parse_regexp_tests($this->vacation['tests'])) {
                 $date_value['from'] = $this->rc->format_date($date_tests['from'], $date_format, false);
                 $date_value['to'] = $this->rc->format_date($date_tests['to'], $date_format, false);
             }
         }
     }
     // force domain selection in redirect email input
     $domains = (array) $this->rc->config->get('managesieve_domains');
     $redirect = $this->vacation['action'] == 'redirect' || $this->vacation['action'] == 'copy';
     if (!empty($domains)) {
         sort($domains);
         $domain_select = new html_select(array('name' => 'action_domain', 'id' => 'action_domain'));
//.........这里部分代码省略.........
开发者ID:jimjag,项目名称:roundcubemail,代码行数:101,代码来源:rcube_sieve_vacation.php

示例9:

 /**
  * Template object for key information page content
  */
 function tpl_key_data($attrib)
 {
     $out = '';
     $table = new html_table(array('cols' => 2));
     // Key user ID
     $table->add('title', $this->enigma->gettext('keyuserid'));
     $table->add(null, rcube::Q($this->data->name));
     // Key ID
     $table->add('title', $this->enigma->gettext('keyid'));
     $table->add(null, $this->data->subkeys[0]->get_short_id());
     // Key type
     $keytype = $this->data->get_type();
     if ($keytype == enigma_key::TYPE_KEYPAIR) {
         $type = $this->enigma->gettext('typekeypair');
     } else {
         if ($keytype == enigma_key::TYPE_PUBLIC) {
             $type = $this->enigma->gettext('typepublickey');
         }
     }
     $table->add('title', $this->enigma->gettext('keytype'));
     $table->add(null, $type);
     // Key fingerprint
     $table->add('title', $this->enigma->gettext('fingerprint'));
     $table->add(null, $this->data->subkeys[0]->get_fingerprint());
     $out .= html::tag('fieldset', null, html::tag('legend', null, $this->enigma->gettext('basicinfo')) . $table->show($attrib));
     // Subkeys
     $table = new html_table(array('cols' => 6));
     // Columns: Type, ID, Algorithm, Size, Created, Expires
     $out .= html::tag('fieldset', null, html::tag('legend', null, $this->enigma->gettext('subkeys')) . $table->show($attrib));
     // Additional user IDs
     $table = new html_table(array('cols' => 2));
     // Columns: User ID, Validity
     $out .= html::tag('fieldset', null, html::tag('legend', null, $this->enigma->gettext('userids')) . $table->show($attrib));
     return $out;
 }
开发者ID:rasky,项目名称:roundcubemail,代码行数:38,代码来源:enigma_ui.php

示例10: intval

 function password_form()
 {
     $rcmail = rcmail::get_instance();
     // add some labels to client
     $rcmail->output->add_label('password.nopassword', 'password.nocurpassword', 'password.passwordinconsistency');
     $rcmail->output->set_env('product_name', $rcmail->config->get('product_name'));
     $table = new html_table(array('cols' => 2));
     if ($rcmail->config->get('password_confirm_current')) {
         // show current password selection
         $field_id = 'curpasswd';
         $input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
         $table->add('title', html::label($field_id, rcube::Q($this->gettext('curpasswd'))));
         $table->add(null, $input_curpasswd->show());
     }
     // show new password selection
     $field_id = 'newpasswd';
     $input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
     $table->add('title', html::label($field_id, rcube::Q($this->gettext('newpasswd'))));
     $table->add(null, $input_newpasswd->show());
     // show confirm password selection
     $field_id = 'confpasswd';
     $input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
     $table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
     $table->add(null, $input_confpasswd->show());
     $rules = '';
     $required_length = intval($rcmail->config->get('password_minimum_length'));
     if ($required_length > 0) {
         $rules .= html::tag('li', array('id' => 'required-length'), $this->gettext(array('name' => 'passwordshort', 'vars' => array('length' => $required_length))));
     }
     if ($rcmail->config->get('password_require_nonalpha')) {
         $rules .= html::tag('li', array('id' => 'require-nonalpha'), $this->gettext('passwordweak'));
     }
     if (!empty($rules)) {
         $rules = html::tag('ul', array('id' => 'ruleslist'), $rules);
     }
     $out = html::div(array('class' => 'box'), html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) . html::div(array('class' => 'boxcontent'), $table->show() . $rules . html::p(null, $rcmail->output->button(array('command' => 'plugin.password-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
     $rcmail->output->add_gui_object('passform', 'password-form');
     return $rcmail->output->form_tag(array('id' => 'password-form', 'name' => 'password-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.password-save'), $out);
 }
开发者ID:alecchisi,项目名称:roundcubemail,代码行数:39,代码来源:password.php

示例11: sprintf

 function veximaccountadmin_form()
 {
     $rcmail = rcmail::get_instance();
     $this->_load_config();
     // add labels to client - to be used in JS alerts
     $rcmail->output->add_label('veximaccountadmin.enterallpassfields', 'veximaccountadmin.passwordinconsistency', 'veximaccountadmin.autoresponderlong', 'veximaccountadmin.autoresponderlongnum', 'veximaccountadmin.autoresponderlongmax', 'veximaccountadmin.headerblockdelete', 'veximaccountadmin.headerblockdeleteall', 'veximaccountadmin.headerblockexists', 'veximaccountadmin.headerblockentervalue');
     $rcmail->output->set_env('product_name', $rcmail->config->get('product_name'));
     $settings = $this->_get_configuration();
     $on_avscan = $settings['on_avscan'];
     $on_spamassassin = $settings['on_spamassassin'];
     $sa_tag = $settings['sa_tag'];
     $sa_refuse = $settings['sa_refuse'];
     $spam_drop = $settings['spam_drop'];
     $on_vacation = $settings['on_vacation'];
     $vacation = $settings['vacation'];
     $on_forward = $settings['on_forward'];
     $forward = $settings['forward'];
     $unseen = $settings['unseen'];
     $maxmsgsize = $settings['maxmsgsize'];
     $user_id = $settings['user_id'];
     $domain_id = $settings['domain_id'];
     $domain_settings = $this->_get_domain_configuration($domain_id);
     $default_sa_tag = $domain_settings['sa_tag'];
     $default_sa_refuse = $domain_settings['sa_refuse'];
     $default_maxmsgsize = $domain_settings['maxmsgsize'];
     $active_domain = $domain_settings['domain'];
     $rcmail->output->set_env('vacation_maxlength', $this->config['vexim_vacation_maxlength']);
     $out .= '<p class="introtext">' . $this->gettext('introtext') . '</p>' . "\n";
     if ($this->config['show_admin_link'] == true and $settings['admin'] == true) {
         $out .= '<p class="adminlink">';
         $out .= sprintf($this->gettext('adminlinktext'), '<a href="' . $this->config['vexim_url'] . '" target="_blank">', '</a>');
         $out .= "</p>\n";
     }
     // =====================================================================================================
     // Password
     $out .= '<fieldset><legend>' . $this->gettext('password') . '</legend>' . "\n";
     $out .= '<div class="fieldset-content">';
     $out .= '<p>' . $this->gettext('passwordcurrentexplanation') . '</p>';
     $out .= '<table class="vexim-settings" cellpadding="0" cellspacing="0">';
     $field_id = 'curpasswd';
     $input_passwordcurrent = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id, 'class' => 'text-long', 'autocomplete' => 'off'));
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('passwordcurrent')), $input_passwordcurrent->show(), '');
     $field_id = 'newpasswd';
     $input_passwordnew = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id, 'class' => 'text-long', 'autocomplete' => 'off'));
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('passwordnew')), $input_passwordnew->show(), '');
     $field_id = 'confpasswd';
     $input_passwordconf = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id, 'class' => 'text-long', 'autocomplete' => 'off'));
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('passwordconfirm')), $input_passwordconf->show(), '');
     $out .= '</table>';
     $out .= '</div></fieldset>' . "\n\n";
     // =====================================================================================================
     // Spam/Virus
     $out .= '<fieldset><legend>' . $this->gettext('spamvirus') . '</legend>' . "\n";
     $out .= '<div class="fieldset-content">';
     $out .= '<table class="vexim-settings" cellpadding="0" cellspacing="0">';
     $field_id = 'on_avscan';
     $input_virusenabled = new html_checkbox(array('name' => 'on_avscan', 'id' => $field_id, 'value' => 1));
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('virusenabled')), $input_virusenabled->show($on_avscan ? 1 : 0), '<br /><span class="vexim-explanation">' . $this->gettext('virusenabledexplanation') . '</span>');
     $field_id = 'on_spamassassin';
     $input_spamenabled = new html_checkbox(array('name' => 'on_spamassassin', 'id' => $field_id, 'value' => 1));
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('spamenabled')), $input_spamenabled->show($on_spamassassin ? 1 : 0), '<br /><span class="vexim-explanation">' . $this->gettext('spamenabledexplanation') . '</span>');
     $field_id = 'sa_tag';
     $input_spamscoretag = new html_select(array('name' => 'sa_tag', 'id' => $field_id, 'class' => 'select'));
     $decPlaces = 0;
     $found_number = false;
     for ($i = 1; $i <= 20; $i = $i + 1) {
         $i = number_format($i, $decPlaces);
         $input_spamscoretag->add($i, $i);
         if ($sa_tag == $i) {
             $found_number = true;
         }
     }
     for ($i = 25; $i <= 100; $i = $i + 5) {
         $i = number_format($i, $decPlaces);
         $input_spamscoretag->add($i, $i);
         if ($sa_tag == $i) {
             $found_number = true;
         }
     }
     // If the value from database cannot be choosed among the list we present,
     // add it to the end of the list. This may happen because Vexim lets the
     // user write in a number in a textbox.
     if (!$found_number) {
         $input_spamscoretag->add($sa_tag, $sa_tag);
     }
     $out .= sprintf("<tr><th><label for=\"%s\">%s</label>:</th><td>%s%s</td></tr>\n", $field_id, rep_specialchars_output($this->gettext('spamscoretag')), $input_spamscoretag->show($sa_tag), '<br /><span class="vexim-explanation">' . $this->gettext('spamscoretagexplanation') . '. <span class="sameline">' . $this->gettext('domaindefault') . ': ' . $default_sa_tag . '.</span></span>');
     $field_id = 'sa_refuse';
     $input_spamscorerefuse = new html_select(array('name' => 'sa_refuse', 'id' => $field_id, 'class' => 'select'));
     $found_number = false;
     for ($i = 1; $i <= 20; $i = $i + 1) {
         $i = number_format($i, $decPlaces);
         $input_spamscorerefuse->add($i, $i);
         if ($sa_refuse == $i) {
             $found_number = true;
         }
     }
     for ($i = 25; $i <= 200; $i = $i + 5) {
         $i = number_format($i, $decPlaces);
         $input_spamscorerefuse->add($i, $i);
         if ($sa_refuse == $i) {
//.........这里部分代码省略.........
开发者ID:soujak,项目名称:VeximAccountAdmin,代码行数:101,代码来源:veximaccountadmin.php

示例12: attachment_header

 /**
  *
  */
 public function attachment_header($attrib = array())
 {
     $rcmail = rcmail::get_instance();
     $dl_link = strtolower($attrib['downloadlink']) == 'true';
     $dl_url = $this->rc->url(array('_frame' => null, '_download' => 1) + $_GET);
     $table = new html_table(array('cols' => $dl_link ? 3 : 2));
     if (!empty($this->attachment['name'])) {
         $table->add('title', rcube::Q($this->rc->gettext('filename')));
         $table->add('header', rcube::Q($this->attachment['name']));
         if ($dl_link) {
             $table->add('download-link', html::a($dl_url, rcube::Q($this->rc->gettext('download'))));
         }
     }
     if (!empty($this->attachment['mimetype'])) {
         $table->add('title', rcube::Q($this->rc->gettext('type')));
         $table->add('header', rcube::Q($this->attachment['mimetype']));
     }
     if (!empty($this->attachment['size'])) {
         $table->add('title', rcube::Q($this->rc->gettext('filesize')));
         $table->add('header', rcube::Q($this->rc->show_bytes($this->attachment['size'])));
     }
     $this->rc->output->set_env('attachment_download_url', $dl_url);
     return $table->show($attrib);
 }
开发者ID:Fneufneu,项目名称:libcalendaring,代码行数:27,代码来源:libcalendaring.php

示例13: login_form

 /**
  * GUI object 'loginform'
  * Returns code for the webmail login form
  *
  * @param array Named parameters
  * @return string HTML code for the gui object
  */
 protected function login_form($attrib)
 {
     $default_host = $this->config->get('default_host');
     $autocomplete = (int) $this->config->get('login_autocomplete');
     $_SESSION['temp'] = true;
     // save original url
     $url = rcube_utils::get_input_value('_url', rcube_utils::INPUT_POST);
     if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING'])) {
         $url = $_SERVER['QUERY_STRING'];
     }
     // Disable autocapitalization on iPad/iPhone (#1488609)
     $attrib['autocapitalize'] = 'off';
     // set atocomplete attribute
     $user_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
     $host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
     $pass_attrib = $autocomplete > 1 ? array() : array('autocomplete' => 'off');
     $input_task = new html_hiddenfield(array('name' => '_task', 'value' => 'login'));
     $input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login'));
     $input_tzone = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_'));
     $input_url = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url));
     $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'required' => 'required') + $attrib + $user_attrib);
     $input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'required' => 'required') + $attrib + $pass_attrib);
     $input_host = null;
     if (is_array($default_host) && count($default_host) > 1) {
         $input_host = new html_select(array('name' => '_host', 'id' => 'rcmloginhost'));
         foreach ($default_host as $key => $value) {
             if (!is_array($value)) {
                 $input_host->add($value, is_numeric($key) ? $value : $key);
             } else {
                 $input_host = null;
                 break;
             }
         }
     } else {
         if (is_array($default_host) && ($host = key($default_host)) !== null) {
             $hide_host = true;
             $input_host = new html_hiddenfield(array('name' => '_host', 'id' => 'rcmloginhost', 'value' => is_numeric($host) ? $default_host[$host] : $host) + $attrib);
         } else {
             if (empty($default_host)) {
                 $input_host = new html_inputfield(array('name' => '_host', 'id' => 'rcmloginhost') + $attrib + $host_attrib);
             }
         }
     }
     $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form';
     $this->add_gui_object('loginform', $form_name);
     // create HTML table with two cols
     $table = new html_table(array('cols' => 2));
     $table->add('title', html::label('rcmloginuser', html::quote($this->app->gettext('username'))));
     $table->add('input', $input_user->show('mail@box'));
     $table->add('title', html::label('rcmloginpwd', html::quote($this->app->gettext('password'))));
     $table->add('input', $input_pass->show());
     // add host selection row
     if (is_object($input_host) && !$hide_host) {
         $table->add('title', html::label('rcmloginhost', html::quote($this->app->gettext('server'))));
         $table->add('input', $input_host->show(rcube_utils::get_input_value('_host', rcube_utils::INPUT_GPC)));
     }
     $out = $input_task->show();
     $out .= $input_action->show();
     $out .= $input_tzone->show();
     $out .= $input_url->show();
     $out .= $table->show();
     if ($hide_host) {
         $out .= $input_host->show();
     }
     if (rcube_utils::get_boolean($attrib['submit'])) {
         $submit = new html_inputfield(array('type' => 'submit', 'id' => 'rcmloginsubmit', 'class' => 'button mainaction', 'value' => $this->app->gettext('login')));
         $out .= html::p('formbuttons', $submit->show());
     }
     // surround html output with a form tag
     if (empty($attrib['form'])) {
         $out = $this->form_tag(array('name' => $form_name, 'method' => 'post'), $out);
     }
     // include script for timezone detection
     $this->include_script('jstz.min.js');
     return $out;
 }
开发者ID:Kuurusch,项目名称:enigmabox-openwrt,代码行数:83,代码来源:rcmail_output_html.php

示例14: array

 /**
  * Template object for key generation form
  */
 function tpl_key_create_form($attrib)
 {
     $attrib += array('id' => 'rcmKeyCreateForm');
     $table = new html_table(array('cols' => 2));
     // get user's identities
     $identities = $this->rc->user->list_identities(null, true);
     // Identity
     $select = new html_select(array('name' => 'identity', 'id' => 'key-ident'));
     foreach ((array) $identities as $idx => $ident) {
         $name = empty($ident['name']) ? '<' . $ident['email'] . '>' : $ident['ident'];
         $select->add($name, $idx);
     }
     $table->add('title', html::label('key-name', rcube::Q($this->enigma->gettext('newkeyident'))));
     $table->add(null, $select->show(0));
     // Key size
     $select = new html_select(array('name' => 'size', 'id' => 'key-size'));
     $select->add($this->enigma->gettext('key2048'), '2048');
     $select->add($this->enigma->gettext('key4096'), '4096');
     $table->add('title', html::label('key-size', rcube::Q($this->enigma->gettext('newkeysize'))));
     $table->add(null, $select->show());
     // Password and confirm password
     $table->add('title', html::label('key-pass', rcube::Q($this->enigma->gettext('newkeypass'))));
     $table->add(null, rcube_output::get_edit_field('password', '', array('id' => 'key-pass', 'size' => $attrib['size'], 'required' => true), 'password'));
     $table->add('title', html::label('key-pass-confirm', rcube::Q($this->enigma->gettext('newkeypassconfirm'))));
     $table->add(null, rcube_output::get_edit_field('password-confirm', '', array('id' => 'key-pass-confirm', 'size' => $attrib['size'], 'required' => true), 'password'));
     $this->rc->output->add_gui_object('keyform', $attrib['id']);
     $this->rc->output->add_label('enigma.keygenerating', 'enigma.formerror', 'enigma.passwordsdiffer', 'enigma.keygenerateerror', 'enigma.nonameident', 'enigma.keygennosupport');
     return $this->rc->output->form_tag(array(), $table->show($attrib));
 }
开发者ID:jgtoriginal,项目名称:roundcubemail,代码行数:32,代码来源:enigma_ui.php

示例15: table_output

 /**
  * Create a HTML table based on the given data
  *
  * @param  array  Named table attributes
  * @param  mixed  Table row data. Either a two-dimensional array or a valid SQL result set
  * @param  array  List of cols to show
  * @param  string Name of the identifier col
  *
  * @return string HTML table code
  */
 public function table_output($attrib, $table_data, $a_show_cols, $id_col)
 {
     $table = new html_table();
     // add table header
     if (!$attrib['noheader']) {
         foreach ($a_show_cols as $col) {
             $table->add_header($col, $this->Q($this->gettext($col)));
         }
     }
     if (!is_array($table_data)) {
         $db = $this->get_dbh();
         while ($table_data && ($sql_arr = $db->fetch_assoc($table_data))) {
             $table->add_row(array('id' => 'rcmrow' . rcube_utils::html_identifier($sql_arr[$id_col])));
             // format each col
             foreach ($a_show_cols as $col) {
                 $table->add($col, $this->Q($sql_arr[$col]));
             }
         }
     } else {
         foreach ($table_data as $row_data) {
             $class = !empty($row_data['class']) ? $row_data['class'] : '';
             $rowid = 'rcmrow' . rcube_utils::html_identifier($row_data[$id_col]);
             $table->add_row(array('id' => $rowid, 'class' => $class));
             // format each col
             foreach ($a_show_cols as $col) {
                 $table->add($col, $this->Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col]));
             }
         }
     }
     return $table->show($attrib);
 }
开发者ID:npk,项目名称:roundcubemail,代码行数:41,代码来源:rcmail.php


注:本文中的html_table::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。