當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。