本文整理汇总了PHP中CCalendar::GetFromToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::GetFromToHtml方法的具体用法?PHP CCalendar::GetFromToHtml怎么用?PHP CCalendar::GetFromToHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalendar
的用法示例。
在下文中一共展示了CCalendar::GetFromToHtml方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
?>
</a></td>
</tr>
<tr>
<td class="feed-calendar-view-text-cell-l"><?php
echo GetMessage('ECLFV_EVENT_START');
?>
:</td>
<td class="feed-calendar-view-text-cell-r"><span id="feed-event-view-from-<?php
echo $id;
?>
"></span>
<?php
if ($event['DT_SKIP_TIME'] != 'Y' && (intVal($event['~USER_OFFSET_FROM']) != 0 || intVal($event['~USER_OFFSET_TO']) != 0 || $event['TZ_FROM'] != $event['TZ_TO'])) {
if ($event['TZ_FROM'] == $event['TZ_TO']) {
$timezoneHint = CCalendar::GetFromToHtml(CCalendar::Timestamp($event['DATE_FROM']), CCalendar::Timestamp($event['DATE_TO']), $event['DT_SKIP_TIME'] == 'Y', $event['DT_LENGTH']);
$timezoneHint .= ' (' . $event['TZ_FROM'] . ')';
} else {
$timezoneHint = GetMessage('EC_VIEW_DATE_FROM_TO', array('#DATE_FROM#' => $event['DATE_FROM'] . ' (' . $event['TZ_FROM'] . ')', '#DATE_TO#' => $event['DATE_TO'] . ' (' . $event['TZ_TO'] . ')'));
}
?>
<span id="feed-event-tz-hint-<?php
echo $id;
?>
" data-bx-hint="<?php
echo $timezoneHint;
?>
" class="bx-cal-view-timezon-icon feed-event-view-timezon-icon"></span>
<?php
}
?>
示例2: GetMessage
<?/* ####### TAB 0 : BASIC ####### */?>
<div id="<?=$id?>view-tab-0-cont" class="bxec-d-cont-div" style="display: block;">
<div class="bx-cal-view-icon">
<div class="bx-cal-view-icon-day"><?= $event['FROM_WEEK_DAY']?></div>
<div class="bx-cal-view-icon-date"><?= $event['FROM_MONTH_DAY']?></div>
</div>
<div class="bx-cal-view-text">
<table>
<tr>
<td class="bx-cal-view-text-cell-l"><?= GetMessage('EC_T_NAME')?>:</td>
<td class="bx-cal-view-text-cell-r"><span class="bx-cal-view-name"><?= htmlspecialcharsEx($event['NAME'])?></span></td>
</tr>
<tr>
<td class="bx-cal-view-text-cell-l"><?= GetMessage('EC_DATE')?>:</td>
<td class="bx-cal-view-text-cell-r bx-cal-view-from-to">
<?= CCalendar::GetFromToHtml($event['DT_FROM_TS'], $event['DT_TO_TS'], $event['DT_SKIP_TIME'] == 'Y', $event['DT_LENGTH']);?>
</td>
</tr>
<?
if ($event['RRULE']):?>
<?
$event['RRULE'] = CCalendarEvent::ParseRRULE($event['RRULE']);
switch ($event['RRULE']['FREQ'])
{
case 'DAILY':
if ($event['RRULE']['INTERVAL'] == 1)
$repeatHTML = GetMessage('EC_RRULE_EVERY_DAY');
else
$repeatHTML = GetMessage('EC_RRULE_EVERY_DAY_1', array('#DAY#' => $event['RRULE']['INTERVAL']));
break;
case 'WEEKLY':
示例3: elseif
$arEvents = CCalendar::GetNearestEventsList(array('bCurUserList' => $arParams['B_CUR_USER_LIST'], 'fromLimit' => $fromLimit, 'toLimit' => $toLimit, 'type' => $arParams['CALENDAR_TYPE'], 'sectionId' => $arParams['CALENDAR_SECTION_ID']));
if ($arEvents == 'access_denied') {
$arResult['ACCESS_DENIED'] = true;
} elseif ($arEvents == 'inactive_feature') {
$arResult['INACTIVE_FEATURE'] = true;
} elseif (is_array($arEvents)) {
if (strpos($arParams['DETAIL_URL'], '?') !== FALSE) {
$arParams['DETAIL_URL'] = substr($arParams['DETAIL_URL'], 0, strpos($arParams['DETAIL_URL'], '?'));
}
$arParams['DETAIL_URL'] = str_replace('#user_id#', $curUserId, strtolower($arParams['DETAIL_URL']));
for ($i = 0, $l = count($arEvents); $i < $l; $i++) {
$arEvents[$i]['_DETAIL_URL'] = $arParams['DETAIL_URL'] . '?EVENT_ID=' . $arEvents[$i]['ID'] . '&EVENT_DATE=' . $arEvents[$i]['DT_FROM'];
if ($arEvents[$i]['IS_MEETING'] && $arEvents[$i]['USER_MEETING']['STATUS'] == 'Q') {
$arEvents[$i]['_ADD_CLASS'] = ' calendar-not-confirmed';
$arEvents[$i]['_Q_ICON'] = '<span class="calendar-reminder" title="' . GetMessage('EC_NOT_CONFIRMED') . '">[?]</span>';
} else {
$arEvents[$i]['_ADD_CLASS'] = '';
$arEvents[$i]['_Q_ICON'] = '';
}
if ($arEvents[$i]['IMPORTANCE'] == 'high') {
$arEvents[$i]['_ADD_CLASS'] = ' imortant-event';
}
$arEvents[$i]['~FROM_TO_HTML'] = CCalendar::GetFromToHtml($arEvents[$i]['DT_FROM_TS'], $arEvents[$i]['DT_TO_TS'], $arEvents[$i]['DT_SKIP_TIME'] == 'Y', $arEvents[$i]['DT_LENGTH']);
$arResult['ITEMS'][] = $arEvents[$i];
}
array_splice($arResult['ITEMS'], intVal($arParams['EVENTS_COUNT']));
}
if ($arParams['RETURN_ARRAY'] == 'Y') {
return $arResult;
}
$this->IncludeComponentTemplate();
示例4: DialogViewEvent
//.........这里部分代码省略.........
<div id="<?php
echo $id;
?>
view-tab-0-cont" class="bxec-d-cont-div" style="display: block;">
<div class="bx-cal-view-icon">
<div class="bx-cal-view-icon-day"><?php
echo $event['FROM_WEEK_DAY'];
?>
</div>
<div class="bx-cal-view-icon-date"><?php
echo $event['FROM_MONTH_DAY'];
?>
</div>
</div>
<div class="bx-cal-view-text">
<table>
<tr>
<td class="bx-cal-view-text-cell-l"><?php
echo GetMessage('EC_T_NAME');
?>
:</td>
<td class="bx-cal-view-text-cell-r"><span class="bx-cal-view-name"><?php
echo htmlspecialcharsEx($event['NAME']);
?>
</span></td>
</tr>
<tr>
<td class="bx-cal-view-text-cell-l"><?php
echo GetMessage('EC_DATE');
?>
:</td>
<td class="bx-cal-view-text-cell-r bx-cal-view-from-to">
<?php
echo CCalendar::GetFromToHtml($event['DT_FROM_TS'], $event['DT_TO_TS'], $event['DT_SKIP_TIME'] == 'Y', $event['DT_LENGTH']);
?>
</td>
</tr>
<?php
if ($event['RRULE']) {
?>
<?php
$event['RRULE'] = CCalendarEvent::ParseRRULE($event['RRULE']);
switch ($event['RRULE']['FREQ']) {
case 'DAILY':
if ($event['RRULE']['INTERVAL'] == 1) {
$repeatHTML = GetMessage('EC_RRULE_EVERY_DAY');
} else {
$repeatHTML = GetMessage('EC_RRULE_EVERY_DAY_1', array('#DAY#' => $event['RRULE']['INTERVAL']));
}
break;
case 'WEEKLY':
$daysList = array();
foreach ($event['RRULE']['BYDAY'] as $day) {
$daysList[] = GetMessage('EC_' . $day);
}
$daysList = implode(', ', $daysList);
if ($event['RRULE']['INTERVAL'] == 1) {
$repeatHTML = GetMessage('EC_RRULE_EVERY_WEEK', array('#DAYS_LIST#' => $daysList));
} else {
$repeatHTML = GetMessage('EC_RRULE_EVERY_WEEK_1', array('#WEEK#' => $event['RRULE']['INTERVAL'], '#DAYS_LIST#' => $daysList));
}
break;
case 'MONTHLY':
if ($event['RRULE']['INTERVAL'] == 1) {
$repeatHTML = GetMessage('EC_RRULE_EVERY_MONTH');
} else {