Exemple #1
0
 public static function GetDateTimeFormatField($name = "", $parent = "")
 {
     $timestamp = mktime(16, 10, 45, 2, 6, 2010);
     return array("PARENT" => $parent, "NAME" => $name, "TYPE" => "LIST", "VALUES" => array("d-m-Y H:i:s" => FormatDate("d-m-Y H:i:s", $timestamp), "m-d-Y H:i:s" => FormatDate("m-d-Y H:i:s", $timestamp), "Y-m-d H:i:s" => FormatDate("Y-m-d H:i:s", $timestamp), "d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp), "m.d.Y H:i:s" => FormatDate("m.d.Y H:i:s", $timestamp), "j M Y H:i:s" => FormatDate("j M Y H:i:s", $timestamp), "M j, Y H:i:s" => FormatDate("M j, Y H:i:s", $timestamp), "j F Y H:i:s" => FormatDate("j F Y H:i:s", $timestamp), "f j, Y H:i:s" => FormatDate("f j, Y H:i:s", $timestamp), "d.m.y g:i:s A" => FormatDate("d.m.y g:i:s A", $timestamp), "d.M.y g:i:s a" => FormatDate("d.M.y g:i:s a", $timestamp), "d.M.Y g:i:s a" => FormatDate("d.M.Y g:i:s a", $timestamp), "d.m.y G:i" => FormatDate("d.m.y G:i", $timestamp), "j F Y G:i" => FormatDate("j F Y G:i", $timestamp), "j F Y g:i a" => FormatDate("j F Y g:i a", $timestamp), "FULL" => GetMessage('COMP_PARAM_DATETIME_FORMAT_SITE')), "DEFAULT" => CComponentUtil::GetDateTimeFormatDefault(), "ADDITIONAL_VALUES" => "Y");
 }
Exemple #2
0
	function GetDateTimeFormatField($name="", $parent="")
	{
		$timestamp = mktime(16,10,45,2,6,2010);
		return array(
			"PARENT" => $parent,
			"NAME" => $name,
			"TYPE" => "LIST",
			"VALUES" => array(
				"d-m-Y H:i:s" => FormatDate("d-m-Y H:i:s", $timestamp),//"22-02-2007 7:30",
				"m-d-Y H:i:s" => FormatDate("m-d-Y H:i:s", $timestamp),//"02-22-2007 7:30",
				"Y-m-d H:i:s" => FormatDate("Y-m-d H:i:s", $timestamp),//"2007-02-22 7:30",
				"d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp),//"22.02.2007 7:30",
				"m.d.Y H:i:s" => FormatDate("m.d.Y H:i:s", $timestamp),//"02.22.2007 7:30",
				"j M Y H:i:s" => FormatDate("j M Y H:i:s", $timestamp),//"22 Feb 2007 7:30",
				"M j, Y H:i:s" => FormatDate("M j, Y H:i:s", $timestamp),//"Feb 22, 2007 7:30",
				"j F Y H:i:s" => FormatDate("j F Y H:i:s", $timestamp),//"22 February 2007 7:30",
				"f j, Y H:i:s" => FormatDate("f j, Y H:i:s", $timestamp),//"February 22, 2007",
				"d.m.y g:i:s A" => FormatDate("d.m.y g:i:s A", $timestamp),//"22.02.07 1:30 PM",
				"d.M.y g:i:s a" => FormatDate("d.M.y g:i:s a", $timestamp),//"22.‘ев.07 1:30 pm",
				"d.M.Y g:i:s a" => FormatDate("d.M.Y g:i:s a", $timestamp),//"22.‘ев.2007 1:30 pm",
				"d.m.y G:i" => FormatDate("d.m.y G:i", $timestamp),//"22.02.07 7:30",
				"d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp),//"22.02.2007 07:30",
				"j F Y G:i" => FormatDate("j F Y G:i", $timestamp),//"ZHL cool RUS",
				"j F Y g:i a" => FormatDate("j F Y g:i a", $timestamp),//"ZHL cool Burzh",
				"FULL" => GetMessage('COMP_PARAM_DATETIME_FORMAT_SITE')
			),
			"DEFAULT" => CComponentUtil::GetDateTimeFormatDefault(),
			"ADDITIONAL_VALUES" => "Y",
		);
	}
Exemple #3
0
$arParams['SHOW_LOGIN'] = $arParams['SHOW_LOGIN'] != "N" ? "Y" : "N";
if (!array_key_exists("PM_URL", $arParams)) {
    $arParams["~PM_URL"] = $arParams["PM_URL"] = "/company/personal/messages/chat/#USER_ID#/";
}
if (!array_key_exists("PATH_TO_CONPANY_DEPARTMENT", $arParams)) {
    $arParams["~PATH_TO_CONPANY_DEPARTMENT"] = $arParams["PATH_TO_CONPANY_DEPARTMENT"] = "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#";
}
if (IsModuleInstalled("video") && !array_key_exists("PATH_TO_VIDEO_CALL", $arParams)) {
    $arParams["~PATH_TO_VIDEO_CALL"] = $arParams["PATH_TO_VIDEO_CALL"] = "/company/personal/video/#USER_ID#/";
}
$arParams['SHOW_YEAR'] = $arParams['SHOW_YEAR'] == 'Y' ? 'Y' : ($arParams['SHOW_YEAR'] == 'M' ? 'M' : 'N');
if (!$arParams['DATE_FORMAT']) {
    $arParams['DATE_FORMAT'] = CComponentUtil::GetDateFormatDefault();
}
if (!$arParams['DATE_TIME_FORMAT']) {
    $arParams['DATE_TIME_FORMAT'] = CComponentUtil::GetDateTimeFormatDefault();
}
$arResult['MODES_LIST'] = array('now', 'today', 'tomorrow');
$arParams['mode'] = $_GET['absence_mode'];
if (!in_array($arParams['mode'], $arResult['MODES_LIST'])) {
    //$arParams['mode'] = 'all';
    $arParams['mode'] = 'now';
}
if (!isset($arParams["CACHE_TIME"])) {
    $arParams["CACHE_TIME"] = 3600;
}
if (!isset($arParams["CACHE_TYPE"])) {
    $arParams["CACHE_TYPE"] = 'A';
}
if ($this->StartResultCache(false, $arParams['mode'] . '|' . ($arParams['DEPARTMENT'] > 0 ? $arParams['DEPARTMENT'] : ''))) {
    global $CACHE_MANAGER;
Exemple #4
0
        $arParams['CALENDAR_IBLOCK_ID'] = COption::GetOptionInt('intranet', 'iblock_calendar');
    }
}
$arResult['ABSENCE_TYPES'] = array();
$dbTypeRes = CIBlockPropertyEnum::GetList(array("SORT" => "ASC", "VALUE" => "ASC"), array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'PROPERTY_ID' => 'ABSENCE_TYPE'));
while ($arTypeValue = $dbTypeRes->GetNext()) {
    $arResult['ABSENCE_TYPES'][$arTypeValue['ID']] = $arTypeValue;
}
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
if (!$arParams['DATE_FORMAT']) {
    $arParams['DATE_FORMAT'] = isset($_SESSION['intranet_absence_calendar_date_format']) ? $_SESSION['intranet_absence_calendar_date_format'] : CComponentUtil::GetDateFormatDefault();
} elseif (!$arParams['AJAX_CALL']) {
    $_SESSION['intranet_absence_calendar_date_format'] = $arParams['DATE_FORMAT'];
}
if (!$arParams['DATETIME_FORMAT']) {
    $arParams['DATETIME_FORMAT'] = isset($_SESSION['intranet_absence_calendar_datetime_format']) ? $_SESSION['intranet_absence_calendar_datetime_format'] : CComponentUtil::GetDateTimeFormatDefault();
} elseif (!$arParams['AJAX_CALL']) {
    $_SESSION['intranet_absence_calendar_datetime_format'] = $arParams['DATETIME_FORMAT'];
}
if ($arParams['AJAX_CALL'] == 'DATA') {
    if (!check_bitrix_sessid()) {
        return;
    }
    if ($arParams['IBLOCK_ID'] <= 0) {
        return;
    }
    $arParams['FILTER_SECTION_CURONLY'] = $arParams['FILTER_SECTION_CURONLY'] == 'Y' ? 'Y' : 'N';
    $arParams['DETAIL_URL'] = COption::GetOptionString('intranet', 'search_user_url', '/company/personal/user/#ID#/', $arParams['SITE_ID']);
    $arParams['CALLBACK'] = trim($arParams['CALLBACK']);
    $arParams['TS_START'] = date('U', $arParams['TS_START']);
    $arParams['TS_FINISH'] = date('U', $arParams['TS_FINISH']);