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


PHP rcube_utils::html_identifier方法代码示例

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


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

示例1: render_folder_tree_html

 /**
  * Return html for a structured list <ul> for the mailbox tree
  */
 public function render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $attrib, $nestLevel = 0)
 {
     $maxlength = intval($attrib['maxlength']);
     $realnames = (bool) $attrib['realnames'];
     $msgcounts = $this->storage->get_cache('messagecount');
     $collapsed = $this->config->get('collapsed_folders');
     $realnames = $this->config->get('show_real_foldernames');
     $out = '';
     foreach ($arrFolders as $folder) {
         $title = null;
         $folder_class = $this->folder_classname($folder['id']);
         $is_collapsed = strpos($collapsed, '&' . rawurlencode($folder['id']) . '&') !== false;
         $unread = $msgcounts ? intval($msgcounts[$folder['id']]['UNSEEN']) : 0;
         if ($folder_class && !$realnames) {
             $foldername = $this->gettext($folder_class);
         } else {
             $foldername = $folder['name'];
             // shorten the folder name to a given length
             if ($maxlength && $maxlength > 1) {
                 $fname = abbreviate_string($foldername, $maxlength);
                 if ($fname != $foldername) {
                     $title = $foldername;
                 }
                 $foldername = $fname;
             }
         }
         // make folder name safe for ids and class names
         $folder_id = rcube_utils::html_identifier($folder['id'], true);
         $classes = array('mailbox');
         // set special class for Sent, Drafts, Trash and Junk
         if ($folder_class) {
             $classes[] = $folder_class;
         }
         if ($folder['id'] == $mbox_name) {
             $classes[] = 'selected';
         }
         if ($folder['virtual']) {
             $classes[] = 'virtual';
         } else {
             if ($unread) {
                 $classes[] = 'unread';
             }
         }
         $js_name = $this->JQ($folder['id']);
         $html_name = $this->Q($foldername) . ($unread ? html::span('unreadcount', sprintf($attrib['unreadwrap'], $unread)) : '');
         $link_attrib = $folder['virtual'] ? array() : array('href' => $this->url(array('_mbox' => $folder['id'])), 'onclick' => sprintf("return %s.command('list','%s',this,event)", rcmail_output::JS_OBJECT_NAME, $js_name), 'rel' => $folder['id'], 'title' => $title);
         $out .= html::tag('li', array('id' => "rcmli" . $folder_id, 'class' => join(' ', $classes), 'noclose' => true), html::a($link_attrib, $html_name));
         if (!empty($folder['folders'])) {
             $out .= html::div('treetoggle ' . ($is_collapsed ? 'collapsed' : 'expanded'), ' ');
         }
         $jslist[$folder['id']] = array('id' => $folder['id'], 'name' => $foldername, 'virtual' => $folder['virtual']);
         if (!empty($folder_class)) {
             $jslist[$folder['id']]['class'] = $folder_class;
         }
         if (!empty($folder['folders'])) {
             $out .= html::tag('ul', array('style' => $is_collapsed ? "display:none;" : null), $this->render_folder_tree_html($folder['folders'], $mbox_name, $jslist, $attrib, $nestLevel + 1));
         }
         $out .= "</li>\n";
     }
     return $out;
 }
开发者ID:peknur,项目名称:roundcubemail,代码行数:64,代码来源:rcmail.php

示例2: action_delete

 /**
  * Handler for ACL delete action
  */
 private function action_delete()
 {
     $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true));
     //UTF7-IMAP
     $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC));
     $user = explode(',', $user);
     foreach ($user as $u) {
         $u = trim($u);
         if ($this->rc->storage->delete_acl($mbox, $u)) {
             $this->rc->output->command('acl_remove_row', rcube_utils::html_identifier($u));
         } else {
             $error = true;
         }
     }
     if (!$error) {
         $this->rc->output->show_message('acl.deletesuccess', 'confirmation');
     } else {
         $this->rc->output->show_message('acl.deleteerror', 'error');
     }
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:23,代码来源:acl.php

示例3: html_identifier

function html_identifier($str, $encode = false)
{
    return rcube_utils::html_identifier($str, $encode);
}
开发者ID:noikiy,项目名称:roundcubemail,代码行数:4,代码来源:bc.php

示例4: list_tree_html

 /**
  * Return html for a structured list <ul> for the folder tree
  */
 public function list_tree_html($node, $data, &$jsenv, $attrib)
 {
     $out = '';
     foreach ($node->children as $folder) {
         $id = $folder->id;
         $prop = $data[$id];
         $is_collapsed = false;
         // TODO: determine this somehow?
         $content = $this->calendar_list_item($id, $prop, $jsenv, $attrib['activeonly']);
         if (!empty($folder->children)) {
             $content .= html::tag('ul', array('style' => $is_collapsed ? "display:none;" : null), $this->list_tree_html($folder, $data, $jsenv, $attrib));
         }
         if (strlen($content)) {
             $out .= html::tag('li', array('id' => 'rcmlical' . rcube_utils::html_identifier($id), 'class' => $prop['group'] . ($prop['virtual'] ? ' virtual' : '')), $content);
         }
     }
     return $out;
 }
开发者ID:elurofilico,项目名称:i-MSCP-plugins,代码行数:21,代码来源:calendar_ui.php

示例5: html_identifier

function html_identifier($str, $encode = false)
{
    _deprecation_warning(__FUNCTION__);
    return rcube_utils::html_identifier($str, $encode);
}
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:5,代码来源:bc.php


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