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


PHP CUtil::closetags方法代码示例

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


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

示例1: array

         }
         if ($event['IS_MEETING'] == 'Y') {
             $arGuests = array('Y' => array(), 'N' => array(), 'Q' => array());
             foreach ($event['GUESTS'] as $key => $guest) {
                 $guest['url'] = str_replace(array('#ID#', '#USER_ID#'), $guest['id'], COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/', $_REQUEST['site_id']));
                 if ($guest['bHost']) {
                     $res['HOST'] = $guest;
                 } else {
                     $arGuests[$guest['status']][] = $guest;
                 }
             }
             $res['GUESTS'] = array_merge($arGuests['Y'], $arGuests['N'], $arGuests['Q']);
         }
         $res['DESCRIPTION'] = HTMLToTxt($res['DESCRIPTION']);
         if (strlen($res['DESCRIPTION']) > 150) {
             $res['DESCRIPTION'] = CUtil::closetags(substr($res['DESCRIPTION'], 0, 150)) . '...';
         }
     } else {
         $APPLICATION->ThrowException('event not found', 'event_not_found');
     }
     break;
 case 'calendar_add':
     if (!CBXFeatures::IsFeatureEnabled('Calendar')) {
         break;
     }
     $arParams = array('calendar_id' => $_REQUEST['cal'], 'site_id' => $_REQUEST['site_id'], 'from' => $_REQUEST['from'], 'to' => $_REQUEST['to'], 'name' => $_REQUEST['name'], 'absence' => $_REQUEST['absence'], 'cal_set_default' => $_REQUEST['cal_set_default']);
     $res = CTimeManCalendar::Add($arParams);
     $bReturnRes = is_array($res);
     break;
 case 'admin_data_report_full':
     $bReturnRes = true;
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:timeman.php

示例2: plannerActionShow

 protected static function plannerActionShow($arParams)
 {
     global $DB, $USER;
     $res = false;
     if ($arParams['ID'] > 0) {
         $event = self::getEvent(array('ID' => $arParams['ID'], 'SITE_ID' => $arParams['SITE_ID']));
         if ($event) {
             $today = ConvertTimeStamp(time() + CTimeZone::GetOffset(), 'SHORT');
             $now = time();
             $res = array('ID' => $event['ID'], 'NAME' => $event['NAME'], 'DESCRIPTION' => CCalendarEvent::ParseText($event['DETAIL_TEXT'], $event['ID'], $event['UF_WEBDAV_CAL_EVENT']), 'URL' => '/company/personal/user/' . $USER->GetID() . '/calendar/?EVENT_ID=' . $event['ID'], 'DATE_FROM' => MakeTimeStamp($event['DATE_FROM']), 'DATE_TO' => MakeTimeStamp($event['DATE_TO']), 'STATUS' => $event['STATUS']);
             $res['DATE_FROM_TODAY'] = ConvertTimeStamp(MakeTimeStamp($res['DATE_FROM']), 'SHORT') == $today;
             $res['DATE_TO_TODAY'] = ConvertTimeStamp(MakeTimeStamp($res['DATE_TO']), 'SHORT') == $today;
             if ($res['DATE_FROM_TODAY']) {
                 if (IsAmPmMode()) {
                     $res['DATE_F'] = FormatDate("today g:i a", $res['DATE_FROM']);
                     $res['DATE_T'] = FormatDate("g:i a", $res['DATE_TO']);
                 } else {
                     $res['DATE_F'] = FormatDate("today H:i", $res['DATE_FROM']);
                     $res['DATE_T'] = FormatDate("H:i", $res['DATE_TO']);
                 }
                 if ($res['DATE_TO_TODAY']) {
                     $res['DATE_F'] .= ' - ' . $res['DATE_T'];
                 }
                 if ($res['DATE_FROM'] > $now) {
                     $res['DATE_F_TO'] = GetMessage('TM_IN') . ' ' . FormatDate('Hdiff', time() * 2 - ($res['DATE_FROM'] - CTimeZone::GetOffset()));
                 }
             } else {
                 if ($res['DATE_TO_TODAY']) {
                     $res['DATE_F'] = FormatDate(str_replace(array('#today#', '#time#'), array('today', 'H:i'), GetMessage('TM_TILL')), $res['DATE_TO']);
                 } else {
                     $fmt = preg_replace('/:s$/', '', $DB->DateFormatToPHP(CSite::GetDateFormat("FULL")));
                     $res['DATE_F'] = FormatDate($fmt, $res['DATE_FROM']);
                     $res['DATE_F_TO'] = FormatDate($fmt, $res['DATE_TO']);
                 }
             }
             if ($event['IS_MEETING'] == 'Y') {
                 $arGuests = array('Y' => array(), 'N' => array(), 'Q' => array());
                 foreach ($event['GUESTS'] as $key => $guest) {
                     $guest['url'] = str_replace(array('#ID#', '#USER_ID#'), $guest['id'], COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/', $arParams['SITE_ID']));
                     if ($guest['bHost']) {
                         $res['HOST'] = $guest;
                     } else {
                         $arGuests[$guest['status']][] = $guest;
                     }
                 }
                 $res['GUESTS'] = array_merge($arGuests['Y'], $arGuests['N'], $arGuests['Q']);
             }
             if (strlen($res['DESCRIPTION']) > 150) {
                 $res['DESCRIPTION'] = CUtil::closetags(substr($res['DESCRIPTION'], 0, 150)) . '...';
             }
             $res = array('EVENT' => $res);
         }
     } else {
         $res = array('error' => 'event not found');
     }
     return $res;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:57,代码来源:calendar_event_handlers.php


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