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


PHP Vtiger_Functions::removeHtmlTags方法代码示例

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


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

示例1: get

 function get($key)
 {
     $value = parent::get($key);
     if ($key === 'content' && $_REQUEST['view'] == 'Detail') {
         return Vtiger_Functions::removeHtmlTags(array('link', 'style', 'a', 'img', 'script'), decode_html($value));
     }
     if ($key === 'uid' || $key === 'content') {
         return decode_html($value);
     }
     return $value;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:11,代码来源:Record.php

示例2: showEmailsList

 public function showEmailsList($srecord, $smodule, $Config, $type)
 {
     $return = [];
     $adb = PearDatabase::getInstance();
     $widgets = $this->modules_email_actions_widgets;
     $queryParams = [];
     if ($widgets[$smodule]) {
         $ids = [];
         $result = $adb->pquery('SELECT ossmailviewid FROM vtiger_ossmailview_relation WHERE crmid = ? AND `deleted` = ? ORDER BY `date` DESC LIMIT ' . $Config['widget_limit'], [$srecord, 0]);
         while ($row = $adb->fetch_array($result)) {
             $ids[] = $row['ossmailviewid'];
         }
         if (count($ids) == 0) {
             return [];
         }
         $queryParams[] = $ids;
         if ($type != 'all') {
             $ifwhere = ' AND type = ?';
             $queryParams[] = $type;
         }
         $query = 'SELECT vtiger_ossmailview.* FROM vtiger_ossmailview INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ossmailview.ossmailviewid';
         $query .= ' WHERE ossmailviewid IN (' . generateQuestionMarks($ids) . ')' . $ifwhere;
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $moduleName = 'OSSMailView';
         $instance = CRMEntity::getInstance($moduleName);
         $securityParameter = $instance->getUserAccessConditionsQuerySR($moduleName, $currentUser);
         if ($securityParameter != '') {
             $query .= $securityParameter;
         }
         $query .= ' ORDER BY ossmailviewid DESC LIMIT ' . $Config['widget_limit'];
         $result = $adb->pquery($query, $queryParams, true);
         while ($row = $adb->fetch_array($result)) {
             $from = $this->findRecordsById($row['from_id']);
             $to = $this->findRecordsById($row['to_id']);
             $return[$row['ossmailviewid']]['id'] = $row['ossmailviewid'];
             $return[$row['ossmailviewid']]['date'] = $row['date'];
             $return[$row['ossmailviewid']]['subject'] = '<a href="index.php?module=OSSMailView&view=preview&record=' . $row['ossmailviewid'] . '" target="' . $Config['target'] . '"> ' . $this->limit_text($row['subject']) . '</a>';
             $return[$row['ossmailviewid']]['attachments'] = $row['attachments_exist'];
             $return[$row['ossmailviewid']]['from'] = $from == '' && $from ? $from : $this->limit_text($row['from_email']);
             $return[$row['ossmailviewid']]['to'] = $to == '' && $to ? $to : $this->limit_text($row['to_email']);
             $return[$row['ossmailviewid']]['type'] = $row['type'];
             $return[$row['ossmailviewid']]['body'] = Vtiger_Functions::removeHtmlTags(array('link', 'style', 'a', 'img', 'script', 'head', 'base'), decode_html($row['content']));
         }
     }
     return $return;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:46,代码来源:Record.php

示例3: showEmailsList

 public function showEmailsList($srecord, $smodule, $config, $type, $filter = 'All')
 {
     $return = [];
     $adb = PearDatabase::getInstance();
     $widgets = $this->modules_email_actions_widgets;
     $queryParams = [];
     if ($widgets[$smodule]) {
         $ids = [];
         $relatedID = [];
         if ($filter == 'All' || $filter == 'Contacts') {
             $result = $adb->pquery('SELECT vtiger_contactdetails.contactid FROM vtiger_contactdetails ' . 'INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid ' . 'WHERE vtiger_contactdetails.parentid = ? AND vtiger_crmentity.deleted = ?', [$srecord, 0]);
             while ($row = $adb->fetch_array($result)) {
                 $relatedID[] = $row['contactid'];
             }
         }
         if ($filter != 'Contacts') {
             $relatedID[] = $srecord;
         }
         $query = 'SELECT ossmailviewid FROM vtiger_ossmailview_relation WHERE crmid IN(' . implode(',', $relatedID) . ') AND `deleted` = ? ORDER BY `date` DESC';
         if ($config['widget_limit'] != '') {
             $query .= ' LIMIT ' . $config['widget_limit'];
         }
         $result = $adb->pquery($query, [0]);
         while ($row = $adb->fetch_array($result)) {
             $ids[] = $row['ossmailviewid'];
         }
         if (count($ids) == 0) {
             return [];
         }
         $queryParams[] = $ids;
         if ($type != 'All') {
             $ifwhere = ' AND type = ?';
             $queryParams[] = $type;
         }
         $query = 'SELECT vtiger_ossmailview.* FROM vtiger_ossmailview INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ossmailview.ossmailviewid';
         $query .= ' WHERE ossmailviewid IN (' . generateQuestionMarks($ids) . ')' . $ifwhere;
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $moduleName = 'OSSMailView';
         $instance = CRMEntity::getInstance($moduleName);
         $securityParameter = $instance->getUserAccessConditionsQuerySR($moduleName, $currentUser);
         if ($securityParameter != '') {
             $query .= $securityParameter;
         }
         $query .= ' ORDER BY ossmailviewid DESC';
         if ($config['widget_limit'] != '') {
             $query .= ' LIMIT ' . $config['widget_limit'];
         }
         $result = $adb->pquery($query, $queryParams, true);
         while ($row = $adb->fetch_array($result)) {
             $from = $this->findRecordsById($row['from_id']);
             $from = $from && $from != '' ? $from : $row['from_email'];
             $to = $this->findRecordsById($row['to_id']);
             $to = $to && $to != '' ? $to : $row['to_email'];
             $content = Vtiger_Functions::removeHtmlTags(['link', 'style', 'a', 'img', 'script', 'base'], decode_html($row['content']));
             $return[] = ['id' => $row['ossmailviewid'], 'date' => $row['date'], 'firstLetter' => strtoupper(Vtiger_Functions::textLength(trim(strip_tags($from)), 1, false)), 'subject' => '<a href="index.php?module=OSSMailView&view=preview&record=' . $row['ossmailviewid'] . '" target="' . $config['target'] . '"> ' . $row['subject'] . '</a>', 'attachments' => $row['attachments_exist'], 'from' => $from, 'to' => $to, 'url' => 'index.php?module=OSSMailView&view=preview&record=' . $row['ossmailviewid'], 'type' => $row['type'], 'teaser' => Vtiger_Functions::textLength(trim(preg_replace('/[ \\t]+/', ' ', strip_tags($content))), 100), 'body' => $content];
         }
     }
     return $return;
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:59,代码来源:Record.php


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