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


PHP html_table::size方法代码示例

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


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

示例1: _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', "&nbsp;");
                 $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') . ":&nbsp;&nbsp;" . $select_all . "&nbsp;&nbsp;" . $select_invert . "&nbsp;&nbsp;" . $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

示例2: _vacation_table

 protected function _vacation_table($ext, $rowid, $defaults, $display, $help_icon)
 {
     $rcmail = rcube::get_instance();
     // begin vacation action
     $vacs_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 3, 'style' => $defaults['method'] == 'vacation' ? '' : 'display: none;'));
     $to_addresses = "";
     $vacto_arr = explode(",", $defaults['vacto']);
     $field_id_vacfrom = 'rcmfd_sievevacfrom_' . $rowid;
     $field_id_vacto = 'rcmfd_sievevacto_' . $rowid;
     if (count($this->identities)) {
         $select_id = new html_select(array('id' => $field_id_vacfrom, 'name' => "_vacfrom[]", 'class' => 'short', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.enable_sig(this);'));
         if ($this->show_vacfrom && in_array('variables', $ext)) {
             $select_id->add($this->gettext('autodetect'), "auto");
         } elseif (!$this->show_vacfrom) {
             $select_id->add($this->gettext('autodetect'), "");
         }
         foreach ($this->identities as $sql_arr) {
             // find currently selected from address
             if ($defaults['vacfrom'] != '' && $defaults['vacfrom'] == rcmail::Q($sql_arr['from']['string'])) {
                 $defaults['vacfrom'] = $sql_arr['identity_id'];
             } elseif ($defaults['vacfrom'] != '' && $defaults['vacfrom'] == $sql_arr['from']['mailto']) {
                 $defaults['vacfrom'] = $sql_arr['identity_id'];
             }
             $select_id->add($sql_arr['from']['disp_string'], $sql_arr['identity_id']);
             $ffield_id = 'rcmfd_vac_' . $rowid . '_' . $sql_arr['identity_id'];
             if ($this->force_vacto) {
                 $curaddress = $sql_arr['email'];
                 $defaults['vacto'] .= (!empty($defaults['vacto']) ? ',' : '') . $sql_arr['email'];
             } else {
                 $curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
             }
             $input_address = new html_checkbox(array('id' => $ffield_id, 'name' => '_vacto_check_' . $rowid . '[]', 'value' => $sql_arr['email'], 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_vac_to(this, ' . $rowid . ')', 'class' => 'checkbox'));
             $to_addresses .= $input_address->show($curaddress) . "&nbsp;" . html::label($ffield_id, rcmail::Q($sql_arr['email'])) . "<br />";
         }
     }
     // deduplicate vacto list
     $tmparr = explode(",", $defaults['vacto']);
     $tmparr = array_unique($tmparr);
     $defaults['vacto'] = implode(",", $tmparr);
     if ($rcmail->config->get('sieverules_limit_vacto', true) && strlen($to_addresses) > 0) {
         $vacfrom_input = $select_id->show($defaults['vacfrom']);
         $input_vacto = new html_hiddenfield(array('id' => $field_id_vacto, 'name' => '_vacto[]', 'value' => $defaults['vacto']));
         $vacto_input = $to_addresses . $input_vacto->show();
         $vac_help = $this->gettext('vactoexp');
     } else {
         $input_vacfrom = new html_inputfield(array('id' => $field_id_vacfrom, 'name' => '_vacfrom[]'));
         $vacfrom_input = $input_vacfrom->show($defaults['vacfrom']);
         $input_vacto = new html_inputfield(array('id' => $field_id_vacto, 'name' => '_vacto[]', 'class' => 'short'));
         $vacto_input = $input_vacto->show($defaults['vacto']);
         $vac_help = $this->gettext('vactoexp') . '<br /><br />' . $this->gettext('vactoexp_adv');
     }
     // from param
     $vacs_table->set_row_attribs(array('class' => $this->show_vacfrom ? 'advanced' : 'disabled', 'style' => $display['vacfrom']));
     $vacs_table->add(null, html::label($field_id_vacfrom, rcmail::Q($this->gettext('from'))));
     $vacs_table->add(null, $vacfrom_input);
     $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
     $vacs_table->add(null, $sig_button);
     // to param
     $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
     $vacs_table->add(array('style' => 'vertical-align: top;'), html::label($field_id_vacto, rcmail::Q($this->gettext('sieveto'))));
     $vacs_table->add(null, $vacto_input);
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(array('style' => 'vertical-align: top;'), $help_button);
     $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $vac_help);
     $field_id = 'rcmfd_sievevacperiod_' . $rowid;
     $input_period = new html_inputfield(array('id' => $field_id, 'name' => '_period[]', 'class' => 'short'));
     $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
     $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('period'))));
     $vacs_table->add(null, $input_period->show($defaults['period']));
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . (in_array('vacation-seconds', $ext) ? $vacs_table->size() + 1 : $vacs_table->size()) . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(null, $help_button);
     if (in_array('vacation-seconds', $ext)) {
         $input_periodtype = new html_radiobutton(array('id' => $field_id . '_days', 'name' => '_period_radio_' . $rowid, 'value' => 'days', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_period_type(this, ' . $rowid . ')', 'class' => 'radio'));
         $period_type_show = $input_periodtype->show($defaults['periodtype']) . "&nbsp;" . html::label($field_id . '_days', rcmail::Q($this->gettext('days')));
         $input_periodtype = new html_radiobutton(array('id' => $field_id . '_seconds', 'name' => '_period_radio_' . $rowid, 'value' => 'seconds', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_period_type(this, ' . $rowid . ')', 'class' => 'radio'));
         $period_type_show .= '&nbsp;&nbsp;' . $input_periodtype->show($defaults['periodtype']) . "&nbsp;" . html::label($field_id . '_seconds', rcmail::Q($this->gettext('seconds')));
         $input_periodtype = new html_hiddenfield(array('id' => 'rcmfd_sievevacperiodtype_' . $rowid, 'name' => '_periodtype[]'));
         $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
         $vacs_table->add(null, '&nbsp;');
         $vacs_table->add(null, $period_type_show . $input_periodtype->show($defaults['periodtype']));
         $vacs_table->add(null, '&nbsp;');
     }
     $vacs_table->set_row_attribs(array('style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $this->gettext('vacperiodexp'));
     $field_id = 'rcmfd_sievevachandle_' . $rowid;
     $input_handle = new html_inputfield(array('id' => $field_id, 'name' => '_handle[]', 'class' => 'short'));
     $vacs_table->set_row_attribs(array('class' => $this->show_vachandle ? 'advanced' : 'disabled', 'style' => $display['vachandle']));
     $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('sievevachandle'))));
     $vacs_table->add(null, $input_handle->show($defaults['handle']));
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(null, $help_button);
     $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $this->gettext('vachandleexp'));
     $field_id = 'rcmfd_sievevacsubject_' . $rowid;
     $input_subject = new html_inputfield(array('id' => $field_id, 'name' => '_subject[]'));
     $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('subject'))));
     $vacs_table->add(array('colspan' => 2), $input_subject->show($defaults['subject']));
     if (in_array('variables', $ext)) {
         $field_id = 'rcmfd_sievevacsubject_orig_' . $rowid;
//.........这里部分代码省略.........
开发者ID:Kofl,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:101,代码来源:sieverules.php

示例3: _action_row


//.........这里部分代码省略.........
             } else {
                 $curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
             }
             $input_address = new html_checkbox(array('id' => $ffield_id, 'name' => '_vacto_check_' . $rowid . '[]', 'value' => $sql_arr['email'], 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_vac_to(this, ' . $rowid . ')', 'class' => 'checkbox'));
             $to_addresses .= $input_address->show($curaddress) . "&nbsp;" . html::label($ffield_id, rcmail::Q($sql_arr['email'])) . "<br />";
         }
     }
     // deduplicate vacto list
     $tmparr = explode(",", $defaults['vacto']);
     $tmparr = array_unique($tmparr);
     $defaults['vacto'] = implode(",", $tmparr);
     if ($rcmail->config->get('sieverules_limit_vacto', true) && strlen($to_addresses) > 0) {
         $vacfrom_input = $select_id->show($defaults['vacfrom']);
         $input_vacto = new html_hiddenfield(array('id' => $field_id_vacto, 'name' => '_vacto[]', 'value' => $defaults['vacto']));
         $vacto_input = $to_addresses . $input_vacto->show();
         $vac_help = $this->gettext('vactoexp');
     } else {
         $input_vacfrom = new html_inputfield(array('id' => $field_id_vacfrom, 'name' => '_vacfrom[]'));
         $vacfrom_input = $input_vacfrom->show($defaults['vacfrom']);
         $input_vacto = new html_inputfield(array('id' => $field_id_vacto, 'name' => '_vacto[]', 'class' => 'short'));
         $vacto_input = $input_vacto->show($defaults['vacto']);
         $vac_help = $this->gettext('vactoexp') . '<br /><br />' . $this->gettext('vactoexp_adv');
     }
     // from param
     $vacs_table->set_row_attribs(array('class' => $this->show_vacfrom ? 'advanced' : 'disabled', 'style' => $display['vacfrom']));
     $vacs_table->add(null, html::label($field_id_vacfrom, rcmail::Q($this->gettext('from'))));
     $vacs_table->add(null, $vacfrom_input);
     $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
     $vacs_table->add(null, $sig_button);
     // to param
     $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
     $vacs_table->add(array('style' => 'vertical-align: top;'), html::label($field_id_vacto, rcmail::Q($this->gettext('sieveto'))));
     $vacs_table->add(null, $vacto_input);
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(array('style' => 'vertical-align: top;'), $help_button);
     $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $vac_help);
     $field_id = 'rcmfd_sievevacperiod_' . $rowid;
     $input_period = new html_inputfield(array('id' => $field_id, 'name' => '_period[]', 'class' => 'short'));
     $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
     $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('period'))));
     $vacs_table->add(null, $input_period->show($defaults['period']));
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . (in_array('vacation-seconds', $ext) ? $vacs_table->size() + 1 : $vacs_table->size()) . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(null, $help_button);
     if (in_array('vacation-seconds', $ext)) {
         $input_periodtype = new html_radiobutton(array('id' => $field_id . '_days', 'name' => '_period_radio_' . $rowid, 'value' => 'days', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_period_type(this, ' . $rowid . ')', 'class' => 'radio'));
         $period_type_show = $input_periodtype->show($defaults['periodtype']) . "&nbsp;" . html::label($field_id . '_days', rcmail::Q($this->gettext('days')));
         $input_periodtype = new html_radiobutton(array('id' => $field_id . '_seconds', 'name' => '_period_radio_' . $rowid, 'value' => 'seconds', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_period_type(this, ' . $rowid . ')', 'class' => 'radio'));
         $period_type_show .= '&nbsp;&nbsp;' . $input_periodtype->show($defaults['periodtype']) . "&nbsp;" . html::label($field_id . '_seconds', rcmail::Q($this->gettext('seconds')));
         $input_periodtype = new html_hiddenfield(array('id' => 'rcmfd_sievevacperiodtype_' . $rowid, 'name' => '_periodtype[]'));
         $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $display['vacadv']));
         $vacs_table->add(null, '&nbsp;');
         $vacs_table->add(null, $period_type_show . $input_periodtype->show($defaults['periodtype']));
         $vacs_table->add(null, '&nbsp;');
     }
     $vacs_table->set_row_attribs(array('style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $this->gettext('vacperiodexp'));
     $field_id = 'rcmfd_sievevachandle_' . $rowid;
     $input_handle = new html_inputfield(array('id' => $field_id, 'name' => '_handle[]', 'class' => 'short'));
     $vacs_table->set_row_attribs(array('class' => $this->show_vachandle ? 'advanced' : 'disabled', 'style' => $display['vachandle']));
     $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('sievevachandle'))));
     $vacs_table->add(null, $input_handle->show($defaults['handle']));
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(null, $help_button);
     $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'helpmsg'), $this->gettext('vachandleexp'));
开发者ID:ereslibre,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:67,代码来源:sieverules.php

示例4: 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

示例5: _action_row


//.........这里部分代码省略.........
     $user_identities = $rcmail->user->list_identities();
     if (count($user_identities)) {
         $field_id = 'rcmfd_sievevacfrom_' . $rowid;
         $select_id = new html_select(array('id' => $field_id, 'name' => "_vacfrom[]", 'class' => 'short', 'onchange' => JS_OBJECT_NAME . '.enable_sig(this);'));
         if ($this->show_vacfrom && in_array('variables', $ext)) {
             $select_id->add(Q($this->gettext('autodetect')), "auto");
         } elseif (!$this->show_vacfrom) {
             $select_id->add(Q($this->gettext('autodetect')), "");
         }
         foreach ($user_identities as $sql_arr) {
             $select_id->add($sql_arr['email'], $sql_arr['email']);
             $ffield_id = 'rcmfd_vac_' . $rowid . '_' . $sql_arr['identity_id'];
             if ($this->force_vacto) {
                 $curaddress = $sql_arr['email'];
                 $vacto .= (!empty($vacto) ? ',' : '') . $sql_arr['email'];
             } else {
                 $curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
             }
             $input_address = new html_checkbox(array('id' => $ffield_id, 'name' => '_vacto_check_' . $rowid . '[]', 'value' => $sql_arr['email'], 'onclick' => JS_OBJECT_NAME . '.sieverules_toggle_vac_to(this, ' . $rowid . ')', 'class' => 'checkbox'));
             $to_addresses .= $input_address->show($curaddress) . "&nbsp;" . html::label($ffield_id, Q($sql_arr['email'])) . "<br />";
         }
     }
     if ($rcmail->config->get('sieverules_limit_vacto', true) && strlen($to_addresses) > 0) {
         $vacs_table->set_row_attribs(array('class' => $vacadvclass_from, 'style' => $vacadvstyle_from));
         $vacs_table->add(null, html::label($field_id, Q($this->gettext('from'))));
         $vacs_table->add(null, $select_id->show($vacfrom));
         $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
         $vacs_table->add(null, $sig_button);
         $field_id = 'rcmfd_sievevacto_' . $rowid;
         $input_vacto = new html_hiddenfield(array('id' => $field_id, 'name' => '_vacto[]', 'value' => $vacto));
         $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
         $vacs_table->add(array('style' => 'vertical-align: top;'), Q($this->gettext('sieveto')));
         $vacs_table->add(null, $to_addresses . $input_vacto->show());
         $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
         $vacs_table->add(array('style' => 'vertical-align: top;'), $help_button);
         $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
         $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vactoexp'));
         $vacs_table->add_row();
     } else {
         $field_id = 'rcmfd_sievevacfrom_' . $rowid;
         $input_vacfrom = new html_inputfield(array('id' => $field_id, 'name' => '_vacfrom[]'));
         $vacs_table->set_row_attribs(array('class' => $vacadvclass_from, 'style' => $vacadvstyle_from));
         $vacs_table->add(null, html::label($field_id, Q($this->gettext('from'))));
         $vacs_table->add(null, $input_vacfrom->show($vacfrom));
         $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
         $vacs_table->add(null, $sig_button);
         $field_id = 'rcmfd_sievevacto_' . $rowid;
         $input_vacto = new html_inputfield(array('id' => $field_id, 'name' => '_vacto[]', 'class' => 'short'));
         $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
         $vacs_table->add(null, html::label($field_id, Q($this->gettext('sieveto'))));
         $vacs_table->add(null, $input_vacto->show($vacto));
         $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
         $vacs_table->add(null, $help_button);
         $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
         $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vactoexp') . '<br /><br />' . $this->gettext('vactoexp_adv'));
         $vacs_table->add_row();
     }
     $field_id = 'rcmfd_sievevacdays_' . $rowid;
     $input_day = new html_inputfield(array('id' => $field_id, 'name' => '_day[]', 'class' => 'short'));
     $vacs_table->add(null, html::label($field_id, Q($this->gettext('days'))));
     $vacs_table->add(null, $input_day->show($days));
     $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
     $vacs_table->add(null, $help_button);
     $vacs_table->set_row_attribs(array('style' => 'display: none;'));
     $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vacdaysexp'));
     $vacs_table->add_row();
开发者ID:nansenat16,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:67,代码来源:sieverules.php


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