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


PHP rcube_label函数代码示例

本文整理汇总了PHP中rcube_label函数的典型用法代码示例。如果您正苦于以下问题:PHP rcube_label函数的具体用法?PHP rcube_label怎么用?PHP rcube_label使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: settings_table

 function settings_table($args)
 {
     if ($args['section'] == 'mailbox') {
         $a_list_cols = rcmail::get_instance()->config->get('list_cols');
         $args['blocks']['roworder']['name'] = Q($this->gettext('roworder', 'msglistcols'));
         for ($i = 0; $i < 9; $i++) {
             $field_id = 'rcmfd_list_col' . $i;
             $select_col = new html_select(array('name' => '_list_cols[]', 'id' => $field_id));
             $select_col->add(rcube_label('skip', 'msglistcols'), '');
             $select_col->add(rcube_label('subject'), 'subject');
             $select_col->add(rcube_label('from'), 'from');
             $select_col->add(rcube_label('to'), 'to');
             $select_col->add(rcube_label('cc'), 'cc');
             $select_col->add(rcube_label('replyto'), 'replyto');
             $select_col->add(rcube_label('date'), 'date');
             $select_col->add(rcube_label('size'), 'size');
             $select_col->add(rcube_label('flagged', 'msglistcols'), 'flag');
             $select_col->add(rcube_label('attachment', 'msglistcols'), 'attachment');
             $args['blocks']['roworder']['options']['listcol_' . $i]['title'] = Q($this->gettext('list_col_' . $i, 'msglistcols'));
             if (!empty($a_list_cols[$i])) {
                 $selected = $a_list_cols[$i];
             } else {
                 $selected = "";
             }
             $args['blocks']['roworder']['options']['listcol_' . $i]['content'] = $select_col->show($selected);
             unset($select_col);
         }
     }
     return $args;
 }
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:30,代码来源:msglistcols.php

示例2: select_menu

 function select_menu()
 {
     $rcmail = rcmail::get_instance();
     $skin = $rcmail->config->get('skin');
     if ($skin == 'classic' or $skin == 'default') {
         $out .= "<div id=\"selectmenu\" class=\"popupmenu\">\n        <ul>\n          <li><a title=\"" . rcube_label('all') . "\" href=\"#\" onclick=\"return rcmail.command('select-all','',this)\" class=\"active\">" . rcube_label('all') . "</a></li>\n          <li><a title=\"" . rcube_label('currpage') . "\" href=\"#\" onclick=\"return rcmail.command('select-all','page',this)\" class=\"active\">" . rcube_label('currpage') . "</a></li>\n          <li><a title=\"" . rcube_label('unread') . "\" href=\"#\" onclick=\"return rcmail.command('select-all','unread',this)\" class=\"active\">" . rcube_label('unread') . "</a></li>\n          <li><a title=\"" . rcube_label('invert') . "\" href=\"#\" onclick=\"return rcmail.command('select-all','invert',this)\" class=\"active\">" . rcube_label('invert') . "</a></li>\n          <li><a title=\"" . rcube_label('none') . "\" href=\"#\" onclick=\"return rcmail.command('select-none','',this)\" class=\"active\">" . rcube_label('none') . "</a></li>\n        </ul>";
     } else {
         $out .= "<div id=\"selectmenu\" class=\"popupmenu dropdown\">\n        <ul>\n          <li title=\"" . rcube_label('all') . "\" onclick=\"return rcmail.command('select-all','',this)\" class=\"active\">" . rcube_label('all') . "</li>\n          <li title=\"" . rcube_label('currpage') . "\" onclick=\"return rcmail.command('select-all','page',this)\" class=\"active\">" . rcube_label('currpage') . "</li>\n          <li title=\"" . rcube_label('unread') . "\" onclick=\"return rcmail.command('select-all','unread',this)\" class=\"active\">" . rcube_label('unread') . "</li>\n          <li title=\"" . rcube_label('invert') . "\" onclick=\"return rcmail.command('select-all','invert',this)\" class=\"active\">" . rcube_label('invert') . "</li>\n          <li title=\"" . rcube_label('none') . "\" onclick=\"return rcmail.command('select-none','',this)\" class=\"active\">" . rcube_label('none') . "</li>\n        </ul>";
     }
     $out .= "</div>";
     $rcmail->output->add_gui_object('selectmenu', 'selectmenu');
     $rcmail->output->add_footer($out);
 }
开发者ID:namesco,项目名称:chbox,代码行数:13,代码来源:chbox.php

示例3: __construct

 public function __construct($dbid)
 {
     $dbh = rcmail::get_instance()->db;
     $this->ready = $dbh && !$dbh->is_error();
     $this->groups = true;
     $this->readonly = false;
     $this->id = $dbid;
     $this->config = self::carddavconfig($dbid);
     $prefs = carddav_common::get_adminsettings();
     if ($this->config['presetname']) {
         if ($prefs[$this->config['presetname']]['readonly']) {
             $this->readonly = true;
         }
     }
     $this->coltypes = array('name' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('name'), 'category' => 'main'), 'firstname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('firstname'), 'category' => 'main'), 'surname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('surname'), 'category' => 'main'), 'email' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('email'), 'subtypes' => array('home', 'work', 'other', 'internet'), 'category' => 'main'), 'middlename' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('middlename'), 'category' => 'main'), 'prefix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('nameprefix'), 'category' => 'main'), 'suffix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('namesuffix'), 'category' => 'main'), 'nickname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('nickname'), 'category' => 'main'), 'jobtitle' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('jobtitle'), 'category' => 'main'), 'organization' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('organization'), 'category' => 'main'), 'department' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('department'), 'category' => 'main'), 'gender' => array('type' => 'select', 'limit' => 1, 'label' => rcube_label('gender'), 'options' => array('male' => rcube_label('male'), 'female' => rcube_label('female')), 'category' => 'personal'), 'phone' => array('type' => 'text', 'size' => 40, 'maxlength' => 20, 'label' => rcube_label('phone'), 'subtypes' => array('home', 'home2', 'work', 'work2', 'mobile', 'cell', 'main', 'homefax', 'workfax', 'car', 'pager', 'video', 'assistant', 'other'), 'category' => 'main'), 'address' => array('type' => 'composite', 'label' => rcube_label('address'), 'subtypes' => array('home', 'work', 'other'), 'childs' => array('street' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('street'), 'category' => 'main'), 'locality' => array('type' => 'text', 'size' => 28, 'maxlength' => 50, 'label' => rcube_label('locality'), 'category' => 'main'), 'zipcode' => array('type' => 'text', 'size' => 8, 'maxlength' => 15, 'label' => rcube_label('zipcode'), 'category' => 'main'), 'region' => array('type' => 'text', 'size' => 12, 'maxlength' => 50, 'label' => rcube_label('region'), 'category' => 'main'), 'country' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('country'), 'category' => 'main')), 'category' => 'main'), 'birthday' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('birthday'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), 'anniversary' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('anniversary'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), 'website' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('website'), 'subtypes' => array('homepage', 'work', 'blog', 'profile', 'other'), 'category' => 'main'), 'notes' => array('type' => 'textarea', 'size' => 40, 'rows' => 15, 'maxlength' => 500, 'label' => rcube_label('notes'), 'limit' => 1), 'photo' => array('type' => 'image', 'limit' => 1, 'category' => 'main'), 'assistant' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('assistant'), 'category' => 'personal'), 'manager' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('manager'), 'category' => 'personal'), 'spouse' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('spouse'), 'category' => 'personal'));
     /* }}} */
     $this->addextrasubtypes();
 }
开发者ID:nysander,项目名称:rcmcarddav,代码行数:18,代码来源:carddav_backend.php

示例4: header_alter_charsets

 function header_alter_charsets($p)
 {
     if ($msg_uid = get_input_value('_uid', RCUBE_INPUT_GET)) {
         $rcmail = rcmail::get_instance();
         $alter_charset = (array) $rcmail->config->get('alter_charset', array());
         $charset = $this->charset($msg_uid);
         $url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
         //error_log($charset."\n",3,"/var/log/nginx/checkmail_error.log");
         if ($alias_charset = get_input_value('_alter_charset', RCUBE_INPUT_GET)) {
             $charset = $alter_charset[$alias_charset];
             $url = str_replace('&_alter_charset=' . $alias_charset, '', $url);
         }
         $selector = '';
         foreach ($alter_charset as $key => $value) {
             $selector .= sprintf('<input type="radio" id="r_%s" onclick="window.location.href=\'https://%s&_alter_charset=%s\';" value="%s" %s>', $key, $url, $key, $key, current(array_keys($alter_charset, $charset)) == $key ? 'checked' : '') . html::label($attrib['id'], strtolower($value));
         }
         $p['output']['selectcharset'] = array('title' => rcube_label('charset'), 'value' => strtr($selector, "\r\n", "  "));
     }
     return $p;
 }
开发者ID:umount,项目名称:rcplugin_altercharset,代码行数:20,代码来源:alter_charset.php

示例5: filters_form

 function filters_form()
 {
     $this->rc->imap_connect();
     $table = new html_table(array('cols' => 4));
     $table->add('title', Q($this->gettext('whatfilter') . ":"));
     $select = new html_select(array('name' => '_whatfilter', 'id' => 'whatfilter'));
     $select->add($this->gettext('from'), 'from');
     $select->add($this->gettext('to'), 'to');
     $select->add($this->gettext('cc'), 'cc');
     $select->add($this->gettext('subject'), 'subject');
     $table->add('', $select->show($this->gettext('from')));
     $table->add_row();
     $table->add('title', Q($this->gettext('searchstring') . ":"));
     $inputfield = new html_inputfield(array('name' => '_searchstring', 'id' => 'searchstring'));
     $table->add('', $inputfield->show(""));
     $table->add('title', Q($this->gettext('casesensitive') . ":"));
     $checkbox = new html_checkbox(array('name' => '_casesensitive', 'id' => 'casesensitive', 'value' => '1'));
     $casesensitive = $this->rc->config->get('caseInsensitiveSearch', true);
     $table->add('', $checkbox->show($casesensitive ? 1 : 0));
     $table->add_row();
     $table->add('title', Q($this->gettext('moveto') . ":"));
     $select = rcmail_mailbox_select(array('name' => '_folders', 'id' => 'folders'));
     $table->add('title', $select->show());
     $table->add_row();
     # new option: all, read and unread messages
     $table->add('title', Q($this->gettext('messagecount') . ":"));
     $select = new html_select(array('name' => '_messages', 'id' => 'messages'));
     $select->add($this->gettext('all'), 'all');
     $select->add($this->gettext('unread'), 'unread');
     $select->add($this->gettext('markread'), 'markread');
     $table->add('', $select->show($this->gettext('all')));
     // get mailbox list
     $a_folders = $this->rc->imap->list_mailboxes('', '*');
     $delimiter = $this->rc->imap->get_hierarchy_delimiter();
     $a_mailboxes = array();
     foreach ($a_folders as $folder) {
         rcmail_build_folder_tree($a_mailboxes, $folder, $delimiter);
     }
     // load saved filters
     $user = $this->rc->user;
     $arr_prefs = $user->get_prefs();
     $i = 1;
     $flag = false;
     $table2 = new html_table(array('cols' => 2));
     //To prevent PHP Warning when no filter already set
     if (!empty($arr_prefs['filters'])) {
         foreach ($arr_prefs['filters'] as $key => $saved_filter) {
             $flag = true;
             $folder_id = $saved_filter['destfolder'];
             $folder_name = "";
             if (strtoupper($folder_id) == 'INBOX') {
                 $folder_name = rcube_label('inbox');
             } else {
                 foreach ($a_mailboxes as $folder => $vet) {
                     if ($vet['id'] == $folder_id) {
                         $folder_name = $vet['name'];
                         break;
                     }
                 }
             }
             $messages = $saved_filter['messages'];
             $msg = $i . " - " . $this->gettext('msg_if_field') . " <b>" . $this->gettext($saved_filter['whatfilter']) . "</b> " . $this->gettext('msg_contains') . " <b>" . $saved_filter['searchstring'] . "</b> " . ($saved_filter['casesensitive'] == '1' ? $this->gettext('msg_and_is') . " <b>" . $this->gettext('casesensitive') . "</b> " : "") . $this->gettext('msg_move_msg_in') . " <b>" . $folder_name . "</b> " . "(" . $this->gettext('messagecount') . ": " . $this->gettext($saved_filter['messages']) . ")";
             $table2->add('title', $msg);
             $dlink = "<a href='./?_task=settings&_action=plugin.filters-delete&filterid=" . $key . "'>" . $this->gettext('delete') . "</a>";
             $table2->add('title', $dlink);
             $i++;
         }
     }
     if (!$flag) {
         $table2->add('title', Q($this->gettext('msg_no_stored_filters')));
     }
     $out = html::div(array('class' => 'box'), html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('filters')) . html::div(array('class' => 'boxcontent'), $table->show() . html::p(null, $this->rc->output->button(array('command' => 'plugin.filters-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
     $out .= html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('storedfilters')) . html::div(array('class' => 'uibox listbox scroller', 'style' => 'margin-top:205px;'), html::div(array('class' => 'boxcontent'), $table2->show()));
     $this->rc->output->add_gui_object('filtersform', 'filters-form');
     return $this->rc->output->form_tag(array('id' => 'filters-form', 'name' => 'filters-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.filters-save'), $out);
 }
开发者ID:PVasileff,项目名称:RC_Filters,代码行数:76,代码来源:filters.php

示例6: parse_structure

 /**
  * Raad the message structure returend by the IMAP server
  * and build flat lists of content parts and attachments
  *
  * @param object rcube_message_part Message structure node
  * @param bool  True when called recursively
  */
 private function parse_structure($structure, $recursive = false)
 {
     $message_ctype_primary = strtolower($structure->ctype_primary);
     $message_ctype_secondary = strtolower($structure->ctype_secondary);
     // show message headers
     if ($recursive && is_array($structure->headers) && isset($structure->headers['subject'])) {
         $c = new stdClass();
         $c->type = 'headers';
         $c->headers =& $structure->headers;
         $this->parts[] = $c;
     }
     // print body if message doesn't have multiple parts
     if ($message_ctype_primary == 'text' && !$recursive) {
         $structure->type = 'content';
         $this->parts[] =& $structure;
     } else {
         if ($message_ctype_primary == 'application' && $message_ctype_secondary == 'pgp' && !$recursive) {
             $structure->type = 'content';
             $this->parts[] =& $structure;
         } else {
             if ($message_ctype_primary == 'multipart' && $message_ctype_secondary == 'alternative' && is_array($structure->parts)) {
                 // get html/plaintext parts
                 $plain_part = $html_part = $print_part = $related_part = null;
                 foreach ($structure->parts as $p => $sub_part) {
                     $rel_parts = $attachmnts = null;
                     $sub_ctype_primary = strtolower($sub_part->ctype_primary);
                     $sub_ctype_secondary = strtolower($sub_part->ctype_secondary);
                     // check if sub part is
                     if ($sub_ctype_primary == 'text' && $sub_ctype_secondary == 'plain') {
                         $plain_part = $p;
                     } else {
                         if ($sub_ctype_primary == 'text' && $sub_ctype_secondary == 'html') {
                             $html_part = $p;
                         } else {
                             if ($sub_ctype_primary == 'text' && $sub_ctype_secondary == 'enriched') {
                                 $enriched_part = $p;
                             } else {
                                 if ($sub_ctype_primary == 'multipart' && in_array($sub_ctype_secondary, array('related', 'mixed', 'alternative'))) {
                                     $related_part = $p;
                                 }
                             }
                         }
                     }
                 }
                 // parse related part (alternative part could be in here)
                 if ($related_part !== null && !$this->parse_alternative) {
                     $this->parse_alternative = true;
                     $this->parse_structure($structure->parts[$related_part], true);
                     $this->parse_alternative = false;
                     // if plain part was found, we should unset it if html is preferred
                     if ($this->opt['prefer_html'] && count($this->parts)) {
                         $plain_part = null;
                     }
                 }
                 // choose html/plain part to print
                 if ($html_part !== null && $this->opt['prefer_html']) {
                     $print_part =& $structure->parts[$html_part];
                 } else {
                     if ($enriched_part !== null) {
                         $print_part =& $structure->parts[$enriched_part];
                     } else {
                         if ($plain_part !== null) {
                             $print_part =& $structure->parts[$plain_part];
                         }
                     }
                 }
                 // add the right message body
                 if (is_object($print_part)) {
                     $print_part->type = 'content';
                     $this->parts[] = $print_part;
                 } else {
                     if ($html_part !== null && empty($this->parts)) {
                         $c = new stdClass();
                         $c->type = 'content';
                         $c->body = rcube_label('htmlmessage');
                         $c->ctype_primary = 'text';
                         $c->ctype_secondary = 'plain';
                         $this->parts[] = $c;
                     }
                 }
                 // add html part as attachment
                 if ($html_part !== null && $structure->parts[$html_part] !== $print_part) {
                     $html_part =& $structure->parts[$html_part];
                     $html_part->filename = rcube_label('htmlmessage');
                     $html_part->mimetype = 'text/html';
                     $this->attachments[] = $html_part;
                 }
             } else {
                 if ($message_ctype_primary == 'multipart' && $message_ctype_secondary == 'encrypted') {
                     $p = new stdClass();
                     $p->type = 'content';
                     $p->ctype_primary = 'text';
                     $p->ctype_secondary = 'plain';
//.........这里部分代码省略.........
开发者ID:jin255ff,项目名称:company_website,代码行数:101,代码来源:rcube_message.php

示例7: attachments_form

 /**
  * Generate the form for event attachments upload
  */
 function attachments_form($attrib = array())
 {
     // add ID if not given
     if (!$attrib['id']) {
         $attrib['id'] = 'rcmUploadForm';
     }
     // 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,代码来源:calendar_ui.php

示例8: charset_selector

 /**
  * GUI object 'charsetselector'
  *
  * @param array Named parameters for the select tag
  * @return string HTML code for the gui object
  */
 function charset_selector($attrib)
 {
     // pass the following attributes to the form class
     $field_attrib = array('name' => '_charset');
     foreach ($attrib as $attr => $value) {
         if (in_array($attr, array('id', 'name', 'class', 'style', 'size', 'tabindex'))) {
             $field_attrib[$attr] = $value;
         }
     }
     $charsets = array('UTF-8' => 'UTF-8 (' . rcube_label('unicode') . ')', 'US-ASCII' => 'ASCII (' . rcube_label('english') . ')', 'ISO-8859-1' => 'ISO-8859-1 (' . rcube_label('westerneuropean') . ')', 'ISO-8859-2' => 'ISO-8859-2 (' . rcube_label('easterneuropean') . ')', 'ISO-8859-4' => 'ISO-8859-4 (' . rcube_label('baltic') . ')', 'ISO-8859-5' => 'ISO-8859-5 (' . rcube_label('cyrillic') . ')', 'ISO-8859-6' => 'ISO-8859-6 (' . rcube_label('arabic') . ')', 'ISO-8859-7' => 'ISO-8859-7 (' . rcube_label('greek') . ')', 'ISO-8859-8' => 'ISO-8859-8 (' . rcube_label('hebrew') . ')', 'ISO-8859-9' => 'ISO-8859-9 (' . rcube_label('turkish') . ')', 'ISO-8859-10' => 'ISO-8859-10 (' . rcube_label('nordic') . ')', 'ISO-8859-11' => 'ISO-8859-11 (' . rcube_label('thai') . ')', 'ISO-8859-13' => 'ISO-8859-13 (' . rcube_label('baltic') . ')', 'ISO-8859-14' => 'ISO-8859-14 (' . rcube_label('celtic') . ')', 'ISO-8859-15' => 'ISO-8859-15 (' . rcube_label('westerneuropean') . ')', 'ISO-8859-16' => 'ISO-8859-16 (' . rcube_label('southeasterneuropean') . ')', 'WINDOWS-1250' => 'Windows-1250 (' . rcube_label('easterneuropean') . ')', 'WINDOWS-1251' => 'Windows-1251 (' . rcube_label('cyrillic') . ')', 'WINDOWS-1252' => 'Windows-1252 (' . rcube_label('westerneuropean') . ')', 'WINDOWS-1253' => 'Windows-1253 (' . rcube_label('greek') . ')', 'WINDOWS-1254' => 'Windows-1254 (' . rcube_label('turkish') . ')', 'WINDOWS-1255' => 'Windows-1255 (' . rcube_label('hebrew') . ')', 'WINDOWS-1256' => 'Windows-1256 (' . rcube_label('arabic') . ')', 'WINDOWS-1257' => 'Windows-1257 (' . rcube_label('baltic') . ')', 'WINDOWS-1258' => 'Windows-1258 (' . rcube_label('vietnamese') . ')', 'ISO-2022-JP' => 'ISO-2022-JP (' . rcube_label('japanese') . ')', 'ISO-2022-KR' => 'ISO-2022-KR (' . rcube_label('korean') . ')', 'ISO-2022-CN' => 'ISO-2022-CN (' . rcube_label('chinese') . ')', 'EUC-JP' => 'EUC-JP (' . rcube_label('japanese') . ')', 'EUC-KR' => 'EUC-KR (' . rcube_label('korean') . ')', 'EUC-CN' => 'EUC-CN (' . rcube_label('chinese') . ')', 'BIG5' => 'BIG5 (' . rcube_label('chinese') . ')', 'GB2312' => 'GB2312 (' . rcube_label('chinese') . ')');
     if (!empty($_POST['_charset'])) {
         $set = $_POST['_charset'];
     } else {
         if (!empty($attrib['selected'])) {
             $set = $attrib['selected'];
         } else {
             $set = $this->get_charset();
         }
     }
     $set = strtoupper($set);
     if (!isset($charsets[$set])) {
         $charsets[$set] = $set;
     }
     $select = new html_select($field_attrib);
     $select->add(array_values($charsets), array_keys($charsets));
     return $select->show($set);
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:33,代码来源:rcube_template.php

示例9: get_address_sources

 /**
  * Return address books list
  *
  * @param boolean True if the address book needs to be writeable
  * @return array  Address books array
  */
 public function get_address_sources($writeable = false)
 {
     $abook_type = strtolower($this->config->get('address_book_type'));
     $ldap_config = $this->config->get('ldap_public');
     $autocomplete = (array) $this->config->get('autocomplete_addressbooks');
     $list = array();
     // We are using the DB address book
     if ($abook_type != 'ldap') {
         $contacts = new rcube_contacts($this->db, null);
         $list['0'] = array('id' => 0, 'name' => rcube_label('personaladrbook'), 'groups' => $contacts->groups, 'readonly' => false, 'autocomplete' => in_array('sql', $autocomplete));
     }
     if ($ldap_config) {
         $ldap_config = (array) $ldap_config;
         foreach ($ldap_config as $id => $prop) {
             $list[$id] = array('id' => $id, 'name' => $prop['name'], 'groups' => false, 'readonly' => !$prop['writable'], 'autocomplete' => in_array('sql', $autocomplete));
         }
     }
     $plugin = $this->plugins->exec_hook('address_sources', array('sources' => $list));
     $list = $plugin['sources'];
     if ($writeable && !empty($list)) {
         foreach ($list as $idx => $item) {
             if ($item['readonly']) {
                 unset($list[$idx]);
             }
         }
     }
     return $list;
 }
开发者ID:shaunfreeman,项目名称:Uthando-CMS,代码行数:34,代码来源:rcmail.php

示例10: get_address_sources

 /**
  * Return address books list
  *
  * @param boolean True if the address book needs to be writeable
  *
  * @return array  Address books array
  */
 public function get_address_sources($writeable = false)
 {
     $abook_type = strtolower($this->config->get('address_book_type'));
     $ldap_config = $this->config->get('ldap_public');
     $autocomplete = (array) $this->config->get('autocomplete_addressbooks');
     $list = array();
     // We are using the DB address book
     if ($abook_type != 'ldap') {
         if (!isset($this->address_books['0'])) {
             $this->address_books['0'] = new rcube_contacts($this->db, $this->user->ID);
         }
         $list['0'] = array('id' => '0', 'name' => rcube_label('personaladrbook'), 'groups' => $this->address_books['0']->groups, 'readonly' => $this->address_books['0']->readonly, 'autocomplete' => in_array('sql', $autocomplete), 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'));
     }
     if ($ldap_config) {
         $ldap_config = (array) $ldap_config;
         foreach ($ldap_config as $id => $prop) {
             $list[$id] = array('id' => $id, 'name' => $prop['name'], 'groups' => is_array($prop['groups']), 'readonly' => !$prop['writable'], 'hidden' => $prop['hidden'], 'autocomplete' => in_array($id, $autocomplete));
         }
     }
     $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list));
     $list = $plugin['sources'];
     foreach ($list as $idx => $item) {
         // register source for shutdown function
         if (!is_object($this->address_books[$item['id']])) {
             $this->address_books[$item['id']] = $item;
         }
         // remove from list if not writeable as requested
         if ($writeable && $item['readonly']) {
             unset($list[$idx]);
         }
     }
     return $list;
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:40,代码来源:rcmail.php

示例11: get_form_part

 /**
  * Helper function used in calendar_form_content(). Creates a part of the form.
  */
 private function get_form_part($form)
 {
     $content = '';
     if (is_array($form['content']) && !empty($form['content'])) {
         $table = new html_table(array('cols' => 2));
         foreach ($form['content'] as $col => $colprop) {
             $label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col);
             $table->add('title', html::label($colprop['id'], Q($label)));
             $table->add(null, $colprop['value']);
         }
         $content = $table->show();
     } else {
         $content = $form['content'];
     }
     return $content;
 }
开发者ID:svenjantzen,项目名称:plugins,代码行数:19,代码来源:kolab_driver.php

示例12: prefs_table

 /**
  * Hook to inject plugin-specific user settings
  */
 function prefs_table($args)
 {
     global $CURR_SECTION;
     if ($args['section'] == 'folders') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         // load folders list when needed
         if ($CURR_SECTION) {
             $select = $rcmail->folder_selector(array('noselection' => '---', 'realnames' => true, 'maxlength' => 30, 'exceptions' => array('INBOX'), 'folder_filter' => 'mail', 'folder_rights' => 'w'));
         } else {
             $select = new html_select();
         }
         $args['blocks']['main']['options']['archive_mbox'] = array('title' => $this->gettext('archivefolder'), 'content' => $select->show($rcmail->config->get('archive_mbox'), array('name' => "_archive_mbox")));
         // add option for structuring the archive folder
         $archive_type = new html_select(array('name' => '_archive_type', 'id' => 'ff_archive_type'));
         $archive_type->add($this->gettext('none'), '');
         $archive_type->add($this->gettext('archivetypeyear'), 'year');
         $archive_type->add($this->gettext('archivetypemonth'), 'month');
         $archive_type->add($this->gettext('archivetypesender'), 'sender');
         $archive_type->add($this->gettext('archivetypefolder'), 'folder');
         $args['blocks']['archive'] = array('name' => Q(rcube_label('settingstitle', 'archive')), 'options' => array('archive_type' => array('title' => $this->gettext('archivetype'), 'content' => $archive_type->show($rcmail->config->get('archive_type')))));
     }
     return $args;
 }
开发者ID:rasky,项目名称:roundcubemail,代码行数:27,代码来源:archive.php

示例13: pfadmin_autoresponder_save

 function pfadmin_autoresponder_save()
 {
     $rcmail = rcmail::get_instance();
     $user = $rcmail->user->data['username'];
     $enabled = get_input_value('_autoresponderenabled', RCUBE_INPUT_POST);
     if (!$enabled) {
         $enabled = 0;
     }
     if (isset($_SESSION['dnsblacklisted']) && $_SESSION['dnsblacklisted'] != 'pass') {
         $enabled = 0;
     }
     $subject = get_input_value('_autorespondersubject', RCUBE_INPUT_POST);
     $body = get_input_value('_autoresponderbody', RCUBE_INPUT_POST);
     $date = get_input_value('_autoresponderdate', RCUBE_INPUT_POST);
     $datefrom = get_input_value('_autoresponderdatefrom', RCUBE_INPUT_POST);
     // check $datefrom
     if (preg_match("/^\\s*\$/", $datefrom) or !preg_match($this->date_format_regexp, $datefrom)) {
         $datefrom = "now()";
     }
     if (preg_match("/^\\s*\$/", $date) or !preg_match($this->date_format_regexp, $date)) {
         $date = "NULL";
     }
     if (!$enabled) {
         $date = $datefrom = "NULL";
     }
     if (!($res = $this->_save($user, $enabled, $subject, $body, $date, $datefrom))) {
         if (isset($_SESSION['dnsblacklisted']) && $_SESSION['dnsblacklisted'] != 'pass') {
             $this->add_texts('../dnsbl/localization/');
             $rcmail->output->command('display_message', sprintf(rcube_label('dnsblacklisted', 'pfadmin_autoresponder'), $_SESSION['clientip']), 'error');
         } else {
             $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
         }
     } else {
         $rcmail->output->command('display_message', "DUPA." . $res, 'error');
     }
     if (!$rcmail->config->get('db_persistent')) {
         if ($dsn = $rcmail->config->get('db_dsnw')) {
             $rcmail->db = rcube_db::factory($dsn, '', false);
         }
     }
     $this->pfadmin_autoresponder_init();
 }
开发者ID:Greybrow,项目名称:rcb-pfa-autoresponder,代码行数:42,代码来源:pfadmin_autoresponder.php

示例14: preferencesList


//.........这里部分代码省略.........
     if (isset($no_override['skin'])) {
         return $args;
     }
     $config = $RCMAIL->config->all();
     $skins = rcmail_get_skins();
     if (count($skins) <= 1) {
         return $args;
     }
     sort($skins);
     $this->add_texts('localization');
     // remove the interface skin block created by Roundcube
     unset($args['blocks']['skin']);
     // add the current browser type to the "Browser Options" section
     if ($this->phone) {
         $browser = $this->gettext("phone");
     } else {
         if ($this->tablet) {
             $browser = $this->gettext("tablet");
         } else {
             $browser = $this->gettext("desktop");
         }
     }
     $args['blocks']['browser']['options']['currentbrowser'] = array('title' => $this->gettext("current_device"), 'content' => $browser);
     // create skin selection hidden blocks that will be shown in dialogs, if mobile, create the selects
     // since we don't use dialogs in mobile
     if ($this->desktop) {
         $desktopList = "";
         $tabletList = "";
         $phoneList = "";
     } else {
         $desktopSelect = new html_select(array("name" => "_skin", "id" => "rcmfd_skin"));
         $tabletSelect = new html_select(array("name" => "_tablet_skin", "id" => "rcmfd_tablet_skin"));
         $phoneSelect = new html_select(array("name" => "_phone_skin", "id" => "rcmfd_phone_skin"));
     }
     foreach ($skins as $skin) {
         $thumbnail = "./skins/{$skin}/thumbnail.png";
         if (!is_file($thumbnail)) {
             $thumbnail = './program/resources/blank.gif';
         }
         $skinname = ucfirst($skin);
         $author = "";
         $license = "";
         $meta = @json_decode(@file_get_contents("./skins/{$skin}/meta.json"), true);
         if (is_array($meta) && $meta['name']) {
             $skinname = $meta['name'];
             $author = $this->encode($meta['author']);
             // we don't use links since the entire item is a link already
             $license = $this->encode($meta['license']);
         }
         if ($this->desktop) {
             // create the skin display boxes, add them to the appropriate lists for selection and set the
             // selected item
             $selected = $skin == $this->desktopSkin;
             $item = $this->skinItem("desktop", $skin, $skinname, $thumbnail, $author, $license, $selected);
             $desktopList .= $item;
             if ($selected) {
                 $desktopSelect = $item;
             }
             $selected = $skin == $this->tabletSkin;
             $item = $this->skinItem("tablet", $skin, $skinname, $thumbnail, $author, $license, $selected);
             $tabletList .= $item;
             if ($selected) {
                 $tabletSelect = $item;
             }
             $selected = $skin == $this->phoneSkin;
             $item = $this->skinItem("phone", $skin, $skinname, $thumbnail, $author, $license, $selected);
             $phoneList .= $item;
             if ($selected) {
                 $phoneSelect = $item;
             }
         } else {
             $desktopSelect->add($skinname, $skin);
             $tabletSelect->add($skinname, $skin);
             $phoneSelect->add($skinname, $skin);
         }
     }
     if ($this->desktop) {
         if (!$desktopSelect) {
             $desktopSelect = "<a href='javascript:void(0)' onclick='rcs_skins.dialog(\"desktop\", \"\", this)'>" . $this->encode($this->gettext("select")) . "</a>";
         }
         if (!$tabletSelect) {
             $tabletSelect = "<a href='javascript:void(0)' onclick='rcs_skins.dialog(\"tablet\", \"\", this)'>" . $this->encode($this->gettext("select")) . "</a>";
         }
         if (!$phoneSelect) {
             $phoneSelect = "<a href='javascript:void(0)' onclick='rcs_skins.dialog(\"phone\", \"\", this)'>" . $this->encode($this->gettext("select")) . "</a>";
         }
         $desktopSelect = "<div class='skin-select' id='desktop-skin-select'>{$desktopSelect}</div>" . "<div class='skin-list' id='desktop-skin-list' title='" . $this->encode($this->gettext("select_desktop_skin")) . "'>" . $desktopList . "</div>";
         $tabletSelect = "<div class='skin-select' id='tablet-skin-select'>{$tabletSelect}</div>" . "<div class='skin-list' id='tablet-skin-list' title='" . $this->encode($this->gettext("select_tablet_skin")) . "'>" . $tabletList . "</div>";
         $phoneSelect = "<div class='skin-select' id='phone-skin-select'>{$phoneSelect}</div>" . "<div class='skin-list' id='phone-skin-list' title='" . $this->encode($this->gettext("select_phone_skin")) . "'>" . $phoneList . "</div>" . "<div id='skinPost'>" . "<input id='desktop-skin-post' type='hidden' name='_skin' value='{$this->desktopSkin}' />" . "<input id='tablet-skin-post' type='hidden' name='_tablet_skin' value='{$this->tabletSkin}' />" . "<input id='phone-skin-post' type='hidden' name='_phone_skin' value='{$this->phoneSkin}' />" . "</div>";
     } else {
         $desktopSelect = $desktopSelect->show($this->desktopSkin);
         $tabletSelect = $tabletSelect->show($this->tabletSkin);
         $phoneSelect = $phoneSelect->show($this->phoneSkin);
     }
     $args['blocks']['skin']['name'] = $this->encode(rcube_label('skin'));
     $args['blocks']['skin']['options']['desktop_skin'] = array('title' => $this->gettext("desktop_skin"), 'content' => $desktopSelect);
     $args['blocks']['skin']['options']['tablet_skin'] = array('title' => $this->gettext("tablet_skin"), 'content' => $tabletSelect);
     $args['blocks']['skin']['options']['phone_skin'] = array('title' => $this->gettext("phone_skin"), 'content' => $phoneSelect);
     return $args;
 }
开发者ID:xslayer93,项目名称:MobileCube3,代码行数:101,代码来源:rcs_skins.php

示例15: _fetch_groups

 /**
  * Fetch groups from server
  */
 private function _fetch_groups($vlv_page = null)
 {
     // special case: list groups from 'group_filters' config
     if ($vlv_page === null && !empty($this->prop['group_filters'])) {
         $groups = array();
         // list regular groups configuration as special filter
         if (!empty($this->prop['groups']['filter'])) {
             $id = '__groups__';
             $groups[$id] = array('ID' => $id, 'name' => rcube_label('groups'), 'virtual' => true) + $this->prop['groups'];
         }
         foreach ($this->prop['group_filters'] as $id => $prop) {
             $groups[$id] = $prop + array('ID' => $id, 'name' => ucfirst($id), 'virtual' => true, 'base_dn' => $this->base_dn);
         }
         return $groups;
     }
     if ($this->cache && $vlv_page === null && ($groups = $this->cache->get('groups')) !== null) {
         return $groups;
     }
     $base_dn = $this->groups_base_dn;
     $filter = $this->prop['groups']['filter'];
     $scope = $this->prop['groups']['scope'];
     $name_attr = $this->prop['groups']['name_attr'];
     $email_attr = $this->prop['groups']['email_attr'] ? $this->prop['groups']['email_attr'] : 'mail';
     $sort_attrs = $this->prop['groups']['sort'] ? (array) $this->prop['groups']['sort'] : array($name_attr);
     $sort_attr = $sort_attrs[0];
     $ldap = $this->ldap;
     // use vlv to list groups
     if ($this->prop['groups']['vlv']) {
         $page_size = 200;
         if (!$this->prop['groups']['sort']) {
             $this->prop['groups']['sort'] = $sort_attrs;
         }
         $ldap = clone $this->ldap;
         $ldap->set_config($this->prop['groups']);
         $ldap->set_vlv_page($vlv_page + 1, $page_size);
     }
     $attrs = array_unique(array('dn', 'objectClass', $name_attr, $email_attr, $sort_attr));
     $ldap_data = $ldap->search($base_dn, $filter, $scope, $attrs, $this->prop['groups']);
     if ($ldap_data === false) {
         return array();
     }
     $groups = array();
     $group_sortnames = array();
     $group_count = $ldap_data->count();
     foreach ($ldap_data as $entry) {
         if (!$entry['dn']) {
             // DN is mandatory
             $entry['dn'] = $ldap_data->get_dn();
         }
         $group_name = is_array($entry[$name_attr]) ? $entry[$name_attr][0] : $entry[$name_attr];
         $group_id = self::dn_encode($entry['dn']);
         $groups[$group_id]['ID'] = $group_id;
         $groups[$group_id]['dn'] = $entry['dn'];
         $groups[$group_id]['name'] = $group_name;
         $groups[$group_id]['member_attr'] = $this->get_group_member_attr($entry['objectclass']);
         // list email attributes of a group
         for ($j = 0; $entry[$email_attr] && $j < $entry[$email_attr]['count']; $j++) {
             if (strpos($entry[$email_attr][$j], '@') > 0) {
                 $groups[$group_id]['email'][] = $entry[$email_attr][$j];
             }
         }
         $group_sortnames[] = mb_strtolower($entry[$sort_attr][0]);
     }
     // recursive call can exit here
     if ($vlv_page > 0) {
         return $groups;
     }
     // call recursively until we have fetched all groups
     while ($this->prop['groups']['vlv'] && $group_count == $page_size) {
         $next_page = $this->_fetch_groups(++$vlv_page);
         $groups = array_merge($groups, $next_page);
         $group_count = count($next_page);
     }
     // when using VLV the list of groups is already sorted
     if (!$this->prop['groups']['vlv']) {
         array_multisort($group_sortnames, SORT_ASC, SORT_STRING, $groups);
     }
     // cache this
     if ($this->cache) {
         $this->cache->set('groups', $groups);
     }
     return $groups;
 }
开发者ID:rasky,项目名称:roundcubemail,代码行数:86,代码来源:rcube_ldap.php


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