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


PHP CCalendar::FormatTime方法代码示例

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


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

示例1: elseif

$arResult["TIME_ZONE_LIST"] = CTimeZone::GetZones();
if (empty($arResult["ITEM"]["WORKTIME_TIMEZONE"])) {
    if (LANGUAGE_ID == "ru") {
        $arResult["ITEM"]["WORKTIME_TIMEZONE"] = "Europe/Moscow";
    } elseif (LANGUAGE_ID == "de") {
        $arResult["ITEM"]["WORKTIME_TIMEZONE"] = "Europe/Berlin";
    } elseif (LANGUAGE_ID == "ua") {
        $arResult["ITEM"]["WORKTIME_TIMEZONE"] = "Europe/Kiev";
    } else {
        $arResult["ITEM"]["WORKTIME_TIMEZONE"] = "America/New_York";
    }
}
$arResult["WEEK_DAYS"] = array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU');
$arResult["WORKTIME_LIST_FROM"] = array();
$arResult["WORKTIME_LIST_TO"] = array();
if (CModule::IncludeModule("calendar")) {
    $arResult["WORKTIME_LIST_FROM"][strval(0)] = CCalendar::FormatTime(0, 0);
    for ($i = 0; $i < 24; $i++) {
        if ($i !== 0) {
            $arResult["WORKTIME_LIST_FROM"][strval($i)] = CCalendar::FormatTime($i, 0);
            $arResult["WORKTIME_LIST_TO"][strval($i)] = CCalendar::FormatTime($i, 0);
        }
        $arResult["WORKTIME_LIST_FROM"][strval($i) . '.30'] = CCalendar::FormatTime($i, 30);
        $arResult["WORKTIME_LIST_TO"][strval($i) . '.30'] = CCalendar::FormatTime($i, 30);
    }
    $arResult["WORKTIME_LIST_TO"][strval('23.59')] = CCalendar::FormatTime(23, 59);
}
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) {
    $this->IncludeComponentTemplate();
}
return $arResult;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例2: DialogSettings

    public static function DialogSettings($Params)
    {
        $id = $Params['id'];
        $arTabs = array(array('name' => GetMessage('EC_SET_TAB_PERSONAL'), 'title' => GetMessage('EC_SET_TAB_PERSONAL_TITLE'), 'id' => $id . "set-tab-0"), array('name' => GetMessage('EC_SET_TAB_BASE'), 'title' => GetMessage('EC_SET_TAB_BASE_TITLE'), 'id' => $id . "set-tab-1", 'show' => CCalendarType::CanDo('calendar_type_access', $Params['type'])), array('name' => GetMessage('EC_SECT_ACCESS_TAB'), 'title' => GetMessage('EC_SECT_ACCESS_TAB'), 'id' => $id . "set-tab-2", 'show' => CCalendarType::CanDo('calendar_type_access', $Params['type'])));
        $arDays = self::GetWeekDays();
        $arWorTimeList = array();
        for ($i = 0; $i < 24; $i++) {
            $arWorTimeList[strval($i)] = CCalendar::FormatTime($i, 0);
            $arWorTimeList[strval($i) . '.30'] = CCalendar::FormatTime($i, 30);
        }
        $timezoneList = CCalendar::GetTimezoneList();
        $bInPersonal = $Params['inPersonalCalendar'];
        ?>
<div id="bxec_uset_<?php 
        echo $id;
        ?>
" class="bxec-popup">
	<div style="width: 500px; height: 1px;"></div>
	<div class="bxec-d-tabs" id="<?php 
        echo $id;
        ?>
_set_tabs">
		<?php 
        foreach ($arTabs as $tab) {
            ?>
			<div class="bxec-d-tab <?php 
            if ($tab['active']) {
                echo 'bxec-d-tab-act';
            }
            ?>
" title="<?php 
            echo isset($tab['title']) ? $tab['title'] : $tab['name'];
            ?>
" id="<?php 
            echo $tab['id'];
            ?>
" <?php 
            if ($tab['show'] === false) {
                echo 'style="display:none;"';
            }
            ?>
>
				<b></b><div><span><?php 
            echo $tab['name'];
            ?>
</span></div><i></i>
			</div>
		<?php 
        }
        ?>
	</div>
	<div class="bxec-d-cont"  id="<?php 
        echo $id;
        ?>
_set_tabcont">
<?php 
        /* ####### TAB 0 : PERSONAL ####### */
        ?>
<div id="<?php 
        echo $id;
        ?>
set-tab-0-cont" class="bxec-d-cont-div" style="display: block;">

	<!-- default meeting calendar -->
	<?php 
        if ($bInPersonal) {
            ?>
	<div class="bxec-popup-row">
		<span class="bxec-field-label-3"><label for="<?php 
            echo $id;
            ?>
_set_tz_sel"><?php 
            echo GetMessage('EC_TIMEZONE');
            ?>
:</label></span>
		<span  class="bxec-field-val-2">
			<select id="<?php 
            echo $id;
            ?>
_set_tz_sel" style="max-width: 235px;">
				<option value=""> - </option>
				<?php 
            foreach ($timezoneList as $tz) {
                ?>
					<option value="<?php 
                echo $tz['timezone_id'];
                ?>
"><?php 
                echo htmlspecialcharsEx($tz['title']);
                ?>
</option>
				<?php 
            }
            ?>
			</select>
		</span>
	</div>
	<div class="bxec-popup-row">
		<span class="bxec-field-label-3"><label for="<?php 
            echo $id;
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:calendar_sceleton.php

示例3: urlencode

echo $APPLICATION->GetCurPage();
?>
?mid=<?php 
echo urlencode($mid);
?>
&amp;lang=<?php 
echo LANGUAGE_ID;
?>
">
<?php 
echo bitrix_sessid_post();
$arDays = array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU');
$arWorTimeList = array();
for ($i = 0; $i < 24; $i++) {
    $arWorTimeList[strval($i)] = CCalendar::FormatTime($i, 0);
    $arWorTimeList[strval($i) . '.30'] = CCalendar::FormatTime($i, 30);
}
$tabControl->BeginNextTab();
?>
	<tr>
		<td><label for="cal_work_time"><?php 
echo GetMessage("CAL_WORK_TIME");
?>
:</label></td>
		<td>
			<select id="cal_work_time" name="work_time_start">
				<?php 
foreach ($arWorTimeList as $key => $val) {
    ?>
					<option value="<?php 
    echo $key;
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:options.php


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