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


PHP IsAmPmMode函数代码示例

本文整理汇总了PHP中IsAmPmMode函数的典型用法代码示例。如果您正苦于以下问题:PHP IsAmPmMode函数的具体用法?PHP IsAmPmMode怎么用?PHP IsAmPmMode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: GetMessage

                     }
                 } else {
                     $arResult["strMessage"] = GetMessage("SONET_LOG_COMMENT_EMPTY");
                 }
             } else {
                 $arResult["strMessage"] = GetMessage("SONET_LOG_COMMENT_NO_PERMISSIONS");
             }
         }
     }
 } elseif ($action == "get_comment") {
     $comment_id = $_REQUEST["cid"];
     if ($arComment = CSocNetLogComments::GetByID($comment_id)) {
         $arResult["arComment"] = $arComment;
         $dateFormated = FormatDate($GLOBALS['DB']->DateFormatToPHP(FORMAT_DATE), MakeTimeStamp(array_key_exists("LOG_DATE_FORMAT", $arComment) ? $arComment["LOG_DATE_FORMAT"] : $arComment["LOG_DATE"]));
         $timeFormat = isset($_REQUEST["dtf"]) ? $_REQUEST["dtf"] : CSite::GetTimeFormat();
         $timeFormated = FormatDateFromDB(array_key_exists("LOG_DATE_FORMAT", $arComment) ? $arComment["LOG_DATE_FORMAT"] : $arComment["LOG_DATE"], stripos($timeFormat, 'a') || ($timeFormat == 'FULL' && IsAmPmMode()) !== false ? 'H:MI T' : 'HH:MI');
         if (intval($arComment["USER_ID"]) > 0) {
             $arParams = array("PATH_TO_USER" => $_REQUEST["p_user"], "NAME_TEMPLATE" => $_REQUEST["nt"], "SHOW_LOGIN" => $_REQUEST["sl"], "AVATAR_SIZE" => $_REQUEST["as"], "PATH_TO_SMILE" => $_REQUEST["p_smile"]);
             $arUser = array("ID" => $arComment["USER_ID"], "NAME" => $arComment["~CREATED_BY_NAME"], "LAST_NAME" => $arComment["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arComment["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arComment["~CREATED_BY_LOGIN"], "PERSONAL_PHOTO" => $arComment["~CREATED_BY_PERSONAL_PHOTO"], "PERSONAL_GENDER" => $arComment["~CREATED_BY_PERSONAL_GENDER"]);
             $bUseLogin = $arParams["SHOW_LOGIN"] != "N" ? true : false;
             $arCreatedBy = array("FORMATTED" => CUser::FormatName($arParams["NAME_TEMPLATE"], $arUser, $bUseLogin), "URL" => CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComment["USER_ID"], "id" => $arComment["USER_ID"])));
         } else {
             $arCreatedBy = array("FORMATTED" => GetMessage("SONET_C73_CREATED_BY_ANONYMOUS"));
         }
         $arTmpCommentEvent = array("LOG_DATE" => $arComment["LOG_DATE"], "LOG_DATE_FORMAT" => $arComment["LOG_DATE_FORMAT"], "LOG_DATE_DAY" => ConvertTimeStamp(MakeTimeStamp($arComment["LOG_DATE"]), "SHORT"), "LOG_TIME_FORMAT" => $timeFormated, "MESSAGE" => $arComment["MESSAGE"], "MESSAGE_FORMAT" => $arComment["~MESSAGE"], "CREATED_BY" => $arCreatedBy, "AVATAR_SRC" => CSocNetLogTools::FormatEvent_CreateAvatar($arUser, $arParams, ""), "USER_ID" => $arComment["USER_ID"]);
         $arEventTmp = CSocNetLogTools::FindLogCommentEventByID($arComment["EVENT_ID"]);
         if ($arEventTmp && array_key_exists("CLASS_FORMAT", $arEventTmp) && array_key_exists("METHOD_FORMAT", $arEventTmp)) {
             $arFIELDS_FORMATTED = call_user_func(array($arEventTmp["CLASS_FORMAT"], $arEventTmp["METHOD_FORMAT"]), $arComment, $arParams);
             $arTmpCommentEvent["MESSAGE_FORMAT"] = htmlspecialcharsback($arFIELDS_FORMATTED["EVENT_FORMATTED"]["MESSAGE"]);
         }
         $arResult["arCommentFormatted"] = $arTmpCommentEvent;
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:ajax.php

示例2: ViewEventManager

	}
});

(function() {
	var BX = window.BX;

	function ViewEventManager(data)
	{
		this.Init(data);
	}

	ViewEventManager.prototype.Init = function(data)
	{
		var _this = this;
		this.bAmPm = <?php 
echo IsAmPmMode() ? 'true' : 'false';
?>
;
		this.userId = data.USER_ID;
		this.oEvent = data.EVENT;
		this.bDeleted = data.DELETED == 'Y';
		this.oAttendees = this.oEvent.IS_MEETING ? data.ATTENDEES : {};

		this.importance = {
			high: '<?php 
echo GetMessageJS('MBCAL_VIEWEV_IMP_HIGH');
?>
',
			normal: '<?php 
echo GetMessageJS('MBCAL_VIEWEV_IMP_NORMAL');
?>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例3: in_array

             echo "{error: 'access denied', type: 'fatal'}";
             die;
         }
     }
 } else {
     $arAccessUsers = CTimeMan::GetAccess();
     $bCanEditAll = in_array('*', $arAccessUsers['WRITE']);
     $bCanReadAll = in_array('*', $arAccessUsers['READ']);
     if (!$bCanReadAll && !in_array($ID, $arAccessUsers["READ"])) {
         echo "{error: 'access denied', type: 'fatal'}";
         die;
     }
 }
 $arFields = array();
 foreach ($arNeededSettings as $key) {
     if (IsAmPmMode() && ($key == 'UF_TM_MAX_START' || $key == 'UF_TM_MIN_FINISH')) {
         $v = trim($_REQUEST[$key]);
         if (strlen($v) > 0) {
             if (preg_match_all('/^(\\d+):(\\d+)\\s*(am|pm)$/i', $v, $matches)) {
                 $v = intval($matches[1][0]) + (strtolower($matches[3][0]) == 'pm' ? 12 : 0) . ':' . $matches[2][0];
             }
         }
         $arFields[$key] = $v;
     } else {
         $arFields[$key] = $_REQUEST[$key];
     }
 }
 if ($arFields['UF_TM_ALLOWED_DELTA']) {
     $arFields['UF_TM_ALLOWED_DELTA'] = CTimeMan::FormatTime($arFields['UF_TM_ALLOWED_DELTA'], true);
 }
 $arAllFields = $USER_FIELD_MANAGER->GetUserFields($source == 'department' ? 'IBLOCK_' . COption::GetOptionInt('intranet', 'iblock_structure') . '_SECTION' : 'USER');
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:timeman.php

示例4: FormatTime

 public static function FormatTime($h = 0, $m = 0)
 {
     $m = intVal($m);
     if ($m > 59) {
         $m = 59;
     } elseif ($m < 0) {
         $m = 0;
     }
     if ($m < 10) {
         $m = '0' . $m;
     }
     $h = intVal($h);
     if ($h > 24) {
         $h = 24;
     }
     if ($h < 0) {
         $h = 0;
     }
     if (IsAmPmMode()) {
         $ampm = 'am';
         if ($h == 0) {
             $h = 12;
         } else {
             if ($h == 12) {
                 $ampm = 'pm';
             } else {
                 if ($h > 12) {
                     $ampm = 'pm';
                     $h -= 12;
                 }
             }
         }
         $res = $h . ':' . $m . ' ' . $ampm;
     } else {
         $res = ($h < 10 ? '0' : '') . $h . ':' . $m;
     }
     return $res;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:38,代码来源:calendar.php

示例5: BX

</span><span class="finder-box-tab-right"></span></span><span class="finder-box-tab" onclick="switchTab('search'); BX('findex_box_text').focus()" id="meeting_selector_tab_search"><span class="finder-box-tab-left"></span><span class="finder-box-tab-text"><?php 
echo GetMessage('ME_MS_TAB_SEARCH');
?>
</span><span class="finder-box-tab-right"></span></span>
					</div>
					<div class="popup-window-hr popup-window-buttons-hr"><i></i></div>
					<div class="finder-box-tabs-content" id="meeting_selector_list">
						<div id="meeting_selector_last" style="display: block;">
<?php 
foreach ($arResult['MEETINGS'] as $arMeeting) {
    ?>
							<a class="finder-box-item finder-box-item-text" href="<?php 
    echo htmlspecialcharsbx($arMeeting['URL']);
    ?>
"><span class="finder-box-item-date"><?php 
    echo FormatDate($DB->DateFormatToPhp(FORMAT_DATE) . (IsAmPmMode() ? ' h:i a' : ' H:i'), MakeTimeStamp($arMeeting['DATE_START']));
    ?>
</span> <?php 
    echo $arMeeting['TITLE'];
    ?>
</a>
<?php 
}
?>
						</div>
						<div id="meeting_selector_search" style="display: none;"></div>
					</div>
				</td>
				<td class="finder-box-right-column">
					<div class="finder-box-selected-items" id="meeting_selector_agenda"></div>
				</td>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例6: ToLower

             $arComment["DateFormated"] = ToLower($arComment["DateFormated"]);
             $arComment["DATE_CREATE_DATE"] = ToLower($arComment["DATE_CREATE_DATE"]);
         }
         // strip current year
         if (!empty($arParams['DATE_TIME_FORMAT_S']) && ($arParams['DATE_TIME_FORMAT_S'] == 'j F Y G:i' || $arParams['DATE_TIME_FORMAT_S'] == 'j F Y g:i a')) {
             $arComment["DateFormated"] = ltrim($arComment["DateFormated"], '0');
             $arComment["DATE_CREATE_DATE"] = ltrim($arComment["DATE_CREATE_DATE"], '0');
             $curYear = date('Y');
             $arComment["DateFormated"] = str_replace(array('-' . $curYear, '/' . $curYear, ' ' . $curYear, '.' . $curYear), '', $arComment["DateFormated"]);
             $arComment["DATE_CREATE_DATE"] = str_replace(array('-' . $curYear, '/' . $curYear, ' ' . $curYear, '.' . $curYear), '', $arComment["DATE_CREATE_DATE"]);
         }
         if ($arParams["MOBILE"] == "Y") {
             $timestamp = MakeTimeStamp($arComment["DATE_CREATE"]);
             $arComment["DATE_CREATE_TIME"] = FormatDate(GetMessage("SONET_SBPC_MOBILE_FORMAT_TIME"), $timestamp);
         } else {
             $arComment["DATE_CREATE_TIME"] = FormatDateFromDB($arComment["DATE_CREATE"], strpos($arParams["DATE_TIME_FORMAT_S"], 'a') !== false || ($arParams["DATE_TIME_FORMAT_S"] == 'FULL' && IsAmPmMode()) !== false ? strpos(FORMAT_DATETIME, 'TT') !== false ? 'G:MI TT' : 'G:MI T' : 'GG:MI');
         }
         $arResult["CommentsResult"][] = $arComment;
         $arResult["IDS"][] = $arComment["ID"];
         $arFieldsHave = array();
         if ($arComment["HAS_PROPS"] == "") {
             $arFieldsHave["HAS_PROPS"] = $bHasProps ? "Y" : "N";
         }
         if (!empty($arFieldsHave)) {
             CBlogComment::Update($arComment["ID"], $arFieldsHave, false);
         }
         $i++;
     } while ($i < count($arCommentsAll) && ($arComment = $arCommentsAll[$i]));
 }
 unset($arResult["MESSAGE"]);
 unset($arResult["ERROR_MESSAGE"]);
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例7: Show


//.........这里部分代码省略.........
					if (!window.bxClockLoaders)
					{
						window.bxClockLoaders = [];
						window.onload = function() {
							for (var i=0; i<window.bxClockLoaders.length; i++)
								setTimeout(window.bxClockLoaders[i], 20*i + 20);
							window.bxClockLoaders = null;
						}
					}

					window.bxClockLoaders.push("bxShowClock_<?php 
                echo $arParams['inputId'];
                ?>
('<?php 
                echo $arParams['inputId'];
                ?>
_clock');");
				</script>
				<?php 
                break;
            default:
                //input
                ?>
<input id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
" type="text" value="<?php 
                echo $arParams['initTime'];
                ?>
" size="<?php 
                echo IsAmPmMode() ? 6 : 4;
                ?>
" title="<?php 
                echo $arParams['inputTitle'];
                ?>
" /><?php 
                break;
        }
        // Show icon
        if ($arParams['showIcon'] !== false) {
            ?>
<a href="javascript:void(0);" onclick="bxShowClock_<?php 
            echo $arParams['inputId'];
            ?>
()" title="<?php 
            echo GetMessage('BX_CLOCK_TITLE');
            ?>
" onmouseover="this.className='bxc-icon-hover';" onmouseout="this.className='';"><img id="<?php 
            echo $arParams['inputId'];
            ?>
_icon" src="/bitrix/images/1.gif" class="bx-clock-icon bxc-iconkit-c"></a><?php 
        }
        //Init JS and append CSS
        ?>
<script>
		function bxLoadClock_<?php 
        echo $arParams['inputId'];
        ?>
(callback)
		{
			<?php 
        if ($arParams['view'] != 'inline') {
            ?>
开发者ID:rasuldev,项目名称:torino,代码行数:67,代码来源:clock.php

示例8: DialogEditEvent

    public static function DialogEditEvent($Params)
    {
        require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/tools/clock.php";
        global $APPLICATION, $USER_FIELD_MANAGER;
        $id = $Params['id'];
        $event = $Params['event'];
        $event['~DT_FROM_TS'] = $event['DT_FROM_TS'];
        $event['~DT_TO_TS'] = $event['DT_TO_TS'];
        $event['DT_FROM_TS'] = $Params['fromTs'];
        $event['DT_TO_TS'] = $Params['fromTs'] + $event['DT_LENGTH'];
        $UF = $USER_FIELD_MANAGER->GetUserFields("CALENDAR_EVENT", $event['ID'], LANGUAGE_ID);
        $event['UF_CRM_CAL_EVENT'] = $UF['UF_CRM_CAL_EVENT'];
        if (empty($event['UF_CRM_CAL_EVENT']['VALUE'])) {
            $event['UF_CRM_CAL_EVENT'] = false;
        }
        $event['UF_WEBDAV_CAL_EVENT'] = $UF['UF_WEBDAV_CAL_EVENT'];
        if (empty($event['UF_WEBDAV_CAL_EVENT']['VALUE'])) {
            $event['UF_WEBDAV_CAL_EVENT'] = false;
        }
        $userId = CCalendar::GetCurUserId();
        $arHost = CCalendar::GetUser($userId, true);
        $arHost['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($arHost);
        $arHost['URL'] = CCalendar::GetUserUrl($event['MEETING_HOST'], $Params["PATH_TO_USER"]);
        $arHost['DISPLAY_NAME'] = CCalendar::GetUserName($arHost);
        $Params['host'] = $arHost;
        if ($event['IS_MEETING']) {
            $attendees = array('y' => array('users' => array(), 'count' => 4, 'countMax' => 8, 'title' => GetMessage('EC_ATT_Y'), 'id' => "bxview-att-cont-y-" . $event['ID']), 'n' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_N'), 'id' => "bxview-att-cont-n-" . $event['ID']), 'q' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_Q'), 'id' => "bxview-att-cont-q-" . $event['ID']));
            $userIds = array();
            if (is_array($event['~ATTENDEES']) && count($event['~ATTENDEES']) > 0) {
                foreach ($event['~ATTENDEES'] as $i => $att) {
                    $userIds[] = $att["USER_ID"];
                    if ($userId == $att["USER_ID"]) {
                        $curUserStatus = $att['STATUS'];
                    }
                    $att['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($att);
                    $att['URL'] = CCalendar::GetUserUrl($att["USER_ID"], $Params["PATH_TO_USER"]);
                    $attendees[strtolower($att['STATUS'])]['users'][] = $att;
                }
                $acc = CCalendar::CheckUsersAccessibility(array('users' => $userIds, 'from' => $event['DT_FROM'], 'to' => $event['DT_TO'], 'eventId' => $event['ID']));
                foreach ($event['~ATTENDEES'] as $i => $att) {
                    $event['~ATTENDEES'][$i]['ACC'] = $acc[$att['USER_ID']];
                }
            }
        }
        if ($event['IS_MEETING'] && empty($event['ATTENDEES_CODES'])) {
            $event['ATTENDEES_CODES'] = CCalendarEvent::CheckEndUpdateAttendeesCodes($event);
        }
        $Params['event'] = $event;
        $Params['UF'] = $UF;
        $arTabs = array(array('name' => GetMessage('EC_EDEV_EVENT'), 'title' => GetMessage('EC_EDEV_EVENT_TITLE'), 'id' => $id . "ed-tab-0", 'active' => true), array('name' => GetMessage('EC_T_DESC'), 'title' => GetMessage('EC_T_DESC_TITLE'), 'id' => $id . "ed-tab-1"), array('name' => GetMessage('EC_EDEV_GUESTS'), 'title' => GetMessage('EC_EDEV_GUESTS_TITLE'), 'id' => $id . "ed-tab-2", "show" => !!$Params['bSocNet']), array('name' => GetMessage('EC_EDEV_ADD_TAB'), 'title' => GetMessage('EC_EDEV_ADD_TAB_TITLE'), 'id' => $id . "ed-tab-3"));
        $addWidthStyle = IsAmPmMode() ? ' ampm-width' : '';
        ?>

<script>
	window.__ATTENDEES_ACC = null;
		<?php 
        if ($event['IS_MEETING'] && is_array($event['~ATTENDEES'])) {
            ?>
	window.__ATTENDEES_ACC = <?php 
            echo CUtil::PhpToJSObject($event['~ATTENDEES']);
            ?>
;
	<?php 
        }
        ?>
</script>
<form enctype="multipart/form-data" method="POST" name="event_edit_form" id="<?php 
        echo $id;
        ?>
_form">
<input type="hidden" value="Y" name="skip_unescape"/>
<input id="event-id<?php 
        echo $id;
        ?>
" type="hidden" value="0" name="id"/>
<input id="event-month<?php 
        echo $id;
        ?>
" type="hidden" value="0" name="month"/>
<input id="event-year<?php 
        echo $id;
        ?>
" type="hidden" value="0" name="year"/>
<div id="bxec_edit_ed_<?php 
        echo $id;
        ?>
" class="bxec-popup">
	<div style="width: 610px; height: 1px;"></div>
	<div class="bxec-d-tabs" id="<?php 
        echo $id;
        ?>
_edit_tabs">
		<?php 
        foreach ($arTabs as $tab) {
            ?>
			<div class="bxec-d-tab <?php 
            if ($tab['active']) {
                echo 'bxec-d-tab-act';
            }
            ?>
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:calendar_sceleton.php

示例9: GetMessage

 $regularityV = $_REQUEST["regularity"];
 $regularityCountV = $_REQUEST["regularity_count"];
 $regularityEndV = $_REQUEST["regularity_end"];
 $regularityAdditionalV = $_REQUEST["regularity_additional"];
 if (StrLen($startDateV) <= 0) {
     $errorMessage .= GetMessage("INTASK_C29_EMPTY_DATE") . ". ";
 } else {
     $startDateVTmp = Date($GLOBALS["DB"]->DateFormatToPHP(FORMAT_DATE), MakeTimeStamp($startDateV, FORMAT_DATE));
     if ($startDateVTmp != $startDateV) {
         $errorMessage .= Str_Replace("#FORMAT#", $GLOBALS["DB"]->DateFormatToPHP(FORMAT_DATE), GetMessage("INTASK_C29_WRONG_DATE")) . ". ";
     }
 }
 if (StrLen($startTimeV) <= 0) {
     $errorMessage .= GetMessage("INTASK_C29_EMPTY_TIME") . ". ";
 } else {
     if (IsAmPmMode()) {
         $startTimeV = str_replace(':', ' ', $startTimeV);
         $arStartTimeVTmp = Explode(" ", $startTimeV);
         if ($arStartTimeVTmp[0] < 12 && $arStartTimeVTmp[2] == 'pm') {
             $arStartTimeVTmp[0] += 12;
         } elseif ($arStartTimeVTmp[0] == 12 && $arStartTimeVTmp[2] == 'am') {
             $arStartTimeVTmp[0] = 0;
         }
         unset($arStartTimeVTmp[2]);
     } else {
         $arStartTimeVTmp = Explode(":", $startTimeV);
     }
     if (Count($arStartTimeVTmp) != 2 || IntVal($arStartTimeVTmp[0]) > 23 || IntVal($arStartTimeVTmp[0]) < 0 || $arStartTimeVTmp[1] != "00" && $arStartTimeVTmp[1] != "30") {
         $errorMessage .= Str_Replace("#FORMAT#", GetMessage("INTASK_C29_HM"), GetMessage("INTASK_C29_WRONG_TIME")) . ". ";
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例10: htmlspecialcharsbx

"><?php 
    echo htmlspecialcharsbx($crmUF["EDIT_FORM_LABEL"]);
    ?>
</label>
					</td>
					<td class="feed-cal-addit-right-c">
						<?php 
    $APPLICATION->IncludeComponent("bitrix:system.field.edit", $crmUF["USER_TYPE"]["USER_TYPE_ID"], array("bVarsFromForm" => false, "arUserField" => $crmUF, "form_name" => $arParams["FORM_ID"]), null, array("HIDE_ICONS" => "Y"));
    ?>
					</td>
				</tr>
				<?php 
}
?>
			</table>
		</div>
		<span id="feed-cal-additional-hide" class="feed-event-more-link-open"><span class="feed-event-more-link-text"><?php 
echo GetMessage('ECLF_HIDE_ADD_SECT');
?>
</span><span class="feed-event-more-link-icon"></span></span>
	</div>
</div>

<script>
window.oEditEventManager = new window.EditEventManager(<?php 
echo CUtil::PhpToJSObject(array('id' => $id, 'editorId' => $arParams["JS_OBJECT_NAME"], 'arEvent' => $arParams['EVENT'], 'bAMPM' => IsAmPmMode(), 'message' => array('NoLimits' => GetMessageJS('EC_T_DIALOG_NEVER'))));
?>
);
</script>

</div>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例11: Show


//.........这里部分代码省略.........
if (!window.bxClockLoaders)
{
	window.bxClockLoaders = [];
	window.onload = function() {
		for (var i=0; i<window.bxClockLoaders.length; i++)
			setTimeout(window.bxClockLoaders[i], 20*i + 20);
		window.bxClockLoaders = null;
	}
}

window.bxClockLoaders.push("bxShowClock_<?php 
                echo $arParams['inputId'];
                ?>
('<?php 
                echo $arParams['inputId'];
                ?>
_clock');");
</script>
<?php 
                break;
            default:
                //input
                ?>
<input id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
" type="text" value="<?php 
                echo $arParams['initTime'];
                ?>
" size="<?php 
                echo IsAmPmMode() ? 6 : 4;
                ?>
" title="<?php 
                echo $arParams['inputTitle'];
                ?>
" /><?php 
                break;
        }
        // Show icon
        if ($arParams['showIcon'] !== false) {
            ?>
<a href="javascript:void(0);" onclick="bxShowClock_<?php 
            echo $arParams['inputId'];
            ?>
()" title="<?php 
            echo GetMessage('BX_CLOCK_TITLE');
            ?>
" onmouseover="this.className='bxc-icon-hover';" onmouseout="this.className='';"><img id="<?php 
            echo $arParams['inputId'];
            ?>
_icon" src="/bitrix/images/1.gif" class="bx-clock-icon bxc-iconkit-c"></a><?php 
        }
        //Init JS and append CSS
        ?>
<script>
		function bxc_load_css()
		{
			if (!window.BXClockStyles)
				window.BXClockStyles = jsUtils.loadCSSFile(['<?php 
        echo CUtil::GetAdditionalFileURL("/bitrix/themes/.default/clock.css");
        ?>
']);
		}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:67,代码来源:clock.php

示例12: 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

示例13: array

         $APPLICATION->DelGroupRight($module_id, array($zr["ID"]));
     }
     CGroup::SetTasksForModule($module_id, array());
     COption::SetOptionString($module_id, "GROUP_DEFAULT_TASK", CTask::GetIdByLetter('N', $module_id));
     COption::SetOptionString($module_id, "GROUP_DEFAULT_RIGHT", "N");
 } else {
     foreach ($arAllModuleOptions as $tab => $arAllOptions) {
         foreach ($arAllOptions as $opt => $arOptDef) {
             // if (true isset($_REQUEST[$opt]))
             // {
             $value = trim($_REQUEST[$opt]);
             switch ($arOptDef[1]) {
                 case 'time':
                     if (strlen($value) > 0) {
                         list($hour, $min) = explode(':', $value, 2);
                         if (IsAmPmMode() && preg_match('/(am|pm)/i', $min, $match)) {
                             $ampm = strtolower($match[0]);
                             if ($ampm == 'pm' && $hour < 12) {
                                 $hour += 12;
                             } elseif ($ampm == 'am' && $hour == 12) {
                                 $hour = 0;
                             }
                         }
                         $value = abs($hour * 3600 + $min * 60);
                         if ($value >= 86400) {
                             $value = 86399;
                         }
                     } else {
                         $value = 0;
                     }
                 case 'int':
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:options.php

示例14: __SLEGetLogCommentRecord

 function __SLEGetLogCommentRecord($arComments, $arParams, $arCurrentUserSubscribe, $bTooltip = true)
 {
     // for the same post log_update - time only, if not - date and time
     $dateFormated = FormatDate($GLOBALS["DB"]->DateFormatToPHP(FORMAT_DATE), MakeTimeStamp(array_key_exists("LOG_DATE_FORMAT", $arComments) ? $arComments["LOG_DATE_FORMAT"] : $arComments["LOG_DATE"]));
     $timeFormated = FormatDateFromDB(array_key_exists("LOG_DATE_FORMAT", $arComments) ? $arComments["LOG_DATE_FORMAT"] : $arComments["LOG_DATE"], stripos($arParams["DATE_TIME_FORMAT"], 'a') || ($arParams["DATE_TIME_FORMAT"] == 'FULL' && IsAmPmMode()) !== false ? 'H:MI T' : 'HH:MI');
     $dateTimeFormated = FormatDate(!empty($arParams['DATE_TIME_FORMAT']) ? $arParams['DATE_TIME_FORMAT'] == 'FULL' ? $GLOBALS['DB']->DateFormatToPHP(str_replace(':SS', '', FORMAT_DATETIME)) : $arParams['DATE_TIME_FORMAT'] : $GLOBALS['DB']->DateFormatToPHP(FORMAT_DATETIME), MakeTimeStamp(array_key_exists("LOG_DATE_FORMAT", $arComments) ? $arComments["LOG_DATE_FORMAT"] : $arComments["LOG_DATE"]));
     if (strcasecmp(LANGUAGE_ID, 'EN') !== 0 && strcasecmp(LANGUAGE_ID, 'DE') !== 0) {
         $dateFormated = ToLower($dateFormated);
         $dateTimeFormated = ToLower($dateTimeFormated);
     }
     // strip current year
     if (!empty($arParams['DATE_TIME_FORMAT']) && ($arParams['DATE_TIME_FORMAT'] == 'j F Y G:i' || $arParams['DATE_TIME_FORMAT'] == 'j F Y g:i a')) {
         $dateTimeFormated = ltrim($dateTimeFormated, '0');
         $curYear = date('Y');
         $dateTimeFormated = str_replace(array('-' . $curYear, '/' . $curYear, ' ' . $curYear, '.' . $curYear), '', $dateTimeFormated);
     }
     if ($arComments["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
         $path2Entity = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $arComments["ENTITY_ID"]));
     } else {
         $path2Entity = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComments["ENTITY_ID"]));
     }
     if (intval($arComments["USER_ID"]) > 0) {
         $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arComments["USER_ID"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
         $arTmpUser = array("NAME" => $arComments["~CREATED_BY_NAME"], "LAST_NAME" => $arComments["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arComments["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arComments["~CREATED_BY_LOGIN"]);
         $bUseLogin = $arParams["SHOW_LOGIN"] != "N" ? true : false;
         $arCreatedBy = array("FORMATTED" => CUser::FormatName($arParams["NAME_TEMPLATE"], $arTmpUser, $bUseLogin) . $suffix, "URL" => CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComments["USER_ID"], "id" => $arComments["USER_ID"])));
         if ($bTooltip) {
             $arCreatedBy["TOOLTIP_FIELDS"] = array("ID" => $arComments["USER_ID"], "NAME" => $arComments["~CREATED_BY_NAME"], "LAST_NAME" => $arComments["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arComments["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arComments["~CREATED_BY_LOGIN"], "USE_THUMBNAIL_LIST" => "N", "PATH_TO_SONET_MESSAGES_CHAT" => $arParams["PATH_TO_MESSAGES_CHAT"], "PATH_TO_SONET_USER_PROFILE" => $arParams["PATH_TO_USER"], "PATH_TO_VIDEO_CALL" => $arParams["PATH_TO_VIDEO_CALL"], "DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"], "SHOW_YEAR" => $arParams["SHOW_YEAR"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"] . $suffix, "SHOW_LOGIN" => $arParams["SHOW_LOGIN"], "PATH_TO_CONPANY_DEPARTMENT" => $arParams["PATH_TO_CONPANY_DEPARTMENT"], "INLINE" => "Y");
         }
     } else {
         $arCreatedBy = array("FORMATTED" => GetMessage("SONET_C73_CREATED_BY_ANONYMOUS"));
     }
     $arTmpUser = array("NAME" => $arComments["~USER_NAME"], "LAST_NAME" => $arComments["~USER_LAST_NAME"], "SECOND_NAME" => $arComments["~USER_SECOND_NAME"], "LOGIN" => $arComments["~USER_LOGIN"]);
     $arParamsTmp = $arParams;
     $arParamsTmp["AVATAR_SIZE"] = $arParams["AVATAR_SIZE_COMMENT"];
     $arTmpCommentEvent = array("EVENT" => $arComments, "LOG_DATE" => $arComments["LOG_DATE"], "LOG_DATE_TS" => MakeTimeStamp($arComments["LOG_DATE"]), "LOG_DATE_DAY" => ConvertTimeStamp(MakeTimeStamp($arComments["LOG_DATE"]), "SHORT"), "LOG_TIME_FORMAT" => $timeFormated, "TITLE_TEMPLATE" => "", "TITLE" => "", "TITLE_FORMAT" => "", "ENTITY_NAME" => $arComments["ENTITY_TYPE"] == SONET_ENTITY_GROUP ? $arComments["GROUP_NAME"] : CUser::FormatName($arParams['NAME_TEMPLATE'], $arTmpUser, $bUseLogin), "ENTITY_PATH" => $path2Entity, "CREATED_BY" => $arCreatedBy, "AVATAR_SRC" => CSocNetLogTools::FormatEvent_CreateAvatar($arComments, $arParamsTmp));
     //		if (is_array($arCurrentUserSubscribe) && $arParams["USER_COMMENTS"] != "Y")
     //			$arTmpCommentEvent["TRANSPORT"] = __SLEGetTransport($arComments, $arCurrentUserSubscribe);
     $arEvent = CSocNetLogTools::FindLogCommentEventByID($arComments["EVENT_ID"]);
     if ($arEvent && array_key_exists("CLASS_FORMAT", $arEvent) && array_key_exists("METHOD_FORMAT", $arEvent)) {
         if ($arParams["USER_COMMENTS"] == "Y") {
             $arLog = array();
         } else {
             $arLog = array("TITLE" => $arComments["~LOG_TITLE"], "URL" => $arComments["~LOG_URL"], "PARAMS" => $arComments["~LOG_PARAMS"]);
         }
         $arFIELDS_FORMATTED = call_user_func(array($arEvent["CLASS_FORMAT"], $arEvent["METHOD_FORMAT"]), $arComments, $arParams, false, $arLog);
         if ($arParams["USE_COMMENTS"] != "Y") {
             if (array_key_exists("CREATED_BY", $arFIELDS_FORMATTED) && is_array($arFIELDS_FORMATTED["CREATED_BY"]) && array_key_exists("TOOLTIP_FIELDS", $arFIELDS_FORMATTED["CREATED_BY"])) {
                 $arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"] = $arFIELDS_FORMATTED["CREATED_BY"]["TOOLTIP_FIELDS"];
             }
             //				$arTmpCommentEvent["ENTITY"] = $arFIELDS_FORMATTED["ENTITY"];
         }
     }
     $message = $arFIELDS_FORMATTED && array_key_exists("EVENT_FORMATTED", $arFIELDS_FORMATTED) && array_key_exists("MESSAGE", $arFIELDS_FORMATTED["EVENT_FORMATTED"]) ? $arFIELDS_FORMATTED["EVENT_FORMATTED"]["MESSAGE"] : $arTmpCommentEvent["EVENT"]["MESSAGE"];
     if (strlen($message) > 0) {
         $arFIELDS_FORMATTED["EVENT_FORMATTED"]["FULL_MESSAGE_CUT"] = CSocNetTextParser::closetags(htmlspecialcharsback($message));
     }
     if (is_array($arTmpCommentEvent)) {
         if ($arTmpCommentEvent["LOG_DATE_DAY"] == ConvertTimeStamp()) {
             $arFIELDS_FORMATTED["EVENT_FORMATTED"]["DATETIME"] = $timeFormated;
         } else {
             $arFIELDS_FORMATTED["EVENT_FORMATTED"]["DATETIME"] = $dateTimeFormated;
         }
         $arTmpCommentEvent["EVENT_FORMATTED"] = $arFIELDS_FORMATTED["EVENT_FORMATTED"];
         if (isset($arTmpCommentEvent["EVENT_FORMATTED"]) && is_array($arTmpCommentEvent["EVENT_FORMATTED"])) {
             $arFields2Cache = array("DATETIME", "MESSAGE", "FULL_MESSAGE_CUT", "ERROR_MSG");
             foreach ($arTmpCommentEvent["EVENT_FORMATTED"] as $field => $value) {
                 if (!in_array($field, $arFields2Cache)) {
                     unset($arTmpCommentEvent["EVENT_FORMATTED"][$field]);
                 }
             }
         }
         if (isset($arTmpCommentEvent["EVENT"]) && is_array($arTmpCommentEvent["EVENT"])) {
             $arFields2Cache = array("ID", "USER_ID", "LOG_DATE", "RATING_TYPE_ID", "RATING_ENTITY_ID");
             foreach ($arTmpCommentEvent["EVENT"] as $field => $value) {
                 if (!in_array($field, $arFields2Cache)) {
                     unset($arTmpCommentEvent["EVENT"][$field]);
                 }
             }
         }
         if (isset($arTmpCommentEvent["CREATED_BY"]) && is_array($arTmpCommentEvent["CREATED_BY"])) {
             $arFields2Cache = array("TOOLTIP_FIELDS", "FORMATTED", "URL");
             foreach ($arTmpCommentEvent["CREATED_BY"] as $field => $value) {
                 if (!in_array($field, $arFields2Cache)) {
                     unset($arTmpCommentEvent["CREATED_BY"][$field]);
                 }
             }
             if (isset($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"]) && is_array($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"])) {
                 $arFields2Cache = array("ID", "PATH_TO_SONET_USER_PROFILE", "NAME", "LAST_NAME", "SECOND_NAME", "LOGIN", "EMAIL");
                 foreach ($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"] as $field => $value) {
                     if (!in_array($field, $arFields2Cache)) {
                         unset($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"][$field]);
                     }
                 }
             }
         }
     }
     foreach ($arTmpCommentEvent["EVENT"] as $key => $value) {
         if (strpos($key, "~") === 0) {
             unset($arTmpCommentEvent["EVENT"][$key]);
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:include.php

示例15: htmlspecialcharsbx

"><?php 
    echo htmlspecialcharsbx($crmUF["EDIT_FORM_LABEL"]);
    ?>
</label>
					</td>
					<td class="feed-cal-addit-right-c">
						<?php 
    $APPLICATION->IncludeComponent("bitrix:system.field.edit", $crmUF["USER_TYPE"]["USER_TYPE_ID"], array("bVarsFromForm" => false, "arUserField" => $crmUF, "form_name" => $arParams["FORM_ID"]), null, array("HIDE_ICONS" => "Y"));
    ?>
					</td>
				</tr>
				<?php 
}
?>
			</table>
		</div>
		<span id="feed-cal-additional-hide" class="feed-event-more-link-open"><span class="feed-event-more-link-text"><?php 
echo GetMessage('ECLF_HIDE_ADD_SECT');
?>
</span><span class="feed-event-more-link-icon"></span></span>
	</div>
</div>

<script>
window.oEditEventManager = new window.EditEventManager(<?php 
echo CUtil::PhpToJSObject(array('id' => $id, 'editorId' => $arParams["JS_OBJECT_NAME"], 'arEvent' => $arParams['EVENT'], 'bAMPM' => IsAmPmMode(), 'userTimezoneName' => $arParams["USER_TIMEZONE_NAME"], 'userTimezoneDefault' => $arParams["USER_TIMEZONE_DEFAULT"], 'meetingRooms' => $arParams["MEETING_ROOMS"], 'message' => array('NoLimits' => GetMessageJS('EC_T_DIALOG_NEVER'), 'eventTzHint' => GetMessageJS('EC_EVENT_TZ_HINT'), 'eventTzDefHint' => GetMessageJS('EC_EVENT_TZ_DEF_HINT'), 'SelectMR' => GetMessageJS('EC_PL_SEL_MEET_ROOM'), 'OpenMRPage' => GetMessageJS('EC_PL_OPEN_MR_PAGE'), 'MRNotReservedErr' => GetMessageJS('EC_MR_RESERVE_ERR_BUSY'), 'MRReserveErr' => GetMessageJS('EC_MR_RESERVE_ERR'))));
?>
);
</script>

</div>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php


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