• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CCalendar类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Execute

 public function Execute()
 {
     if (!CModule::IncludeModule("calendar")) {
         return CBPActivityExecutionStatus::Closed;
     }
     $rootActivity = $this->GetRootActivity();
     $documentId = $rootActivity->GetDocumentId();
     $documentService = $this->workflow->GetService("DocumentService");
     $fromTs = CCalendar::Timestamp($this->CalendarFrom);
     $toTs = $this->CalendarTo == '' ? $fromTs : CCalendar::Timestamp($this->CalendarTo);
     $arFields = array("CAL_TYPE" => !$this->CalendarType ? 'user' : $this->CalendarType, "NAME" => trim($this->CalendarName) == '' ? GetMessage('EC_DEFAULT_EVENT_NAME') : $this->CalendarName, "DESCRIPTION" => $this->CalendarDesrc, "SKIP_TIME" => date('H:i', $fromTs) == '00:00' && date('H:i', $toTs) == '00:00', "IS_MEETING" => false, "RRULE" => false);
     if ($fromTs == $toTs && !$arFields["SKIP_TIME"]) {
         $toTs += 3600;
     }
     $arFields['DATE_FROM'] = CCalendar::Date($fromTs);
     $arFields['DATE_TO'] = CCalendar::Date($toTs);
     if ($this->CalendarSection && intVal($this->CalendarSection) > 0) {
         $arFields['SECTIONS'] = array(intVal($this->CalendarSection));
     }
     if ($this->CalendarOwnerId || $arFields["CAL_TYPE"] != "user" && $arFields["CAL_TYPE"] != "group") {
         $arFields["OWNER_ID"] = $this->CalendarOwnerId;
         $eventId = CCalendar::SaveEvent(array('arFields' => $arFields, 'autoDetectSection' => true));
     } else {
         $arCalendarUser = CBPHelper::ExtractUsers($this->CalendarUser, $documentId);
         foreach ($arCalendarUser as $calendarUser) {
             $arFields["CAL_TYPE"] = "user";
             $arFields["OWNER_ID"] = $calendarUser;
             $eventId = CCalendar::SaveEvent(array('arFields' => $arFields, 'autoDetectSection' => true));
         }
     }
     return CBPActivityExecutionStatus::Closed;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:32,代码来源:calendar2activity.php


示例2:

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$arResult['TIMEZONE_LIST'] = CCalendar::GetTimezoneList();
$this->IncludeComponentTemplate();
开发者ID:webgksupport,项目名称:alpina,代码行数:7,代码来源:component.php


示例3: InstallEvents

	function InstallEvents()
	{
		global $DB;

		$arCurPhpVer = Explode(".", PhpVersion());
		if (IntVal($arCurPhpVer[0]) < 5)
			return true;

		$sIn = "'CALENDAR_INVITATION'";
		$rs = $DB->Query("SELECT count(*) C FROM b_event_type WHERE EVENT_NAME IN (".$sIn.") ", false, "File: ".__FILE__."<br>Line: ".__LINE__);
		$ar = $rs->Fetch();

		if($ar["C"] <= 0)
			include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/calendar/install/events.php");

		if (!IsModuleInstalled('intranet'))
		{
			COption::SetOptionString("intranet", "calendar_2", "Y");
			CModule::IncludeModule('calendar');
			CCalendar::ClearCache();
			CCalendar::CacheTime(0);

			$arTypes = CCalendarType::GetList();
			if (!$arTypes || !count($arTypes))
			{
				CCalendarType::Edit(array(
					'NEW' => true,
					'arFields' => array(
						'XML_ID' => 'events',
						'NAME' => GetMessage('CAL_DEFAULT_TYPE'),
						'ACCESS' => array(
							'G2' => CCalendar::GetAccessTasksByName('calendar_type', 'calendar_type_view')
						)
					)
				));
			}
		}

		return true;
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:40,代码来源:index.php


示例4:

            ?>
</span><?php 
            ?>
</a><?php 
        }
    }
    ?>

						<?php 
    if (!$bShowAll) {
        ?>
							<span id="feed-event-more-att-link-n-<?php 
        echo $id;
        ?>
" class="bxcal-more-attendees"><?php 
        echo CCalendar::GetMoreAttendeesMessage(count($event['DECLINED_ATTENDEES']) - $arParams['ATTENDEES_SHOWN_COUNT']);
        ?>
</span>
							<div id="feed-event-more-attendees-n-<?php 
        echo $id;
        ?>
" class="bxcal-more-attendees-popup" style="display: none;">
								<?php 
        echo $popupContent;
        ?>
							</div>
						<?php 
    }
    ?>
					<?php 
}
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php


示例5: UpdateListItems

	public function UpdateListItems($listName, $updates)
	{
		global $USER;

		$arStatusValues = array_flip($this->arStatusValues);
		$arPriorityValues = array_flip($this->arPriorityValues);

		if (!$listName_original = CIntranetUtils::checkGUID($listName))
			return new CSoapFault('Data error', 'Wrong GUID - '.$listName);

		$obResponse = new CXMLCreator('Results');

		$listName = ToUpper(CIntranetUtils::makeGUID($listName_original));
		$arSections = CCalendarSect::GetList(array('arFilter' => array('XML_ID' => $listName_original)));
		if (!$arSections || !is_array($arSections[0]))
			return new CSoapFault(
				'List not found',
				'List with '.$listName.' GUID not found'
			);
		$arSection = $arSections[0];

		$bGroup = $arSection['CAL_TYPE'] == 'group';
		$calType = $arSection['CAL_TYPE'];
		$ownerId = $arSection['OWNER_ID'];

		if ($bGroup)
		{
			CModule::IncludeModule('socialnetwork');
			$arGroupTmp = CSocNetGroup::GetByID($arSection['SOCNET_GROUP_ID']);
			if ($arGroupTmp["CLOSED"] == "Y")
				if (COption::GetOptionString("socialnetwork", "work_with_closed_groups", "N") != "Y")
					return new CSoapFault('Cannot modify archive group calendar', 'Cannot modify archive group calendar');
		}

		$obBatch = $updates->children[0];
		$atrONERROR = $obBatch->getAttribute('OnError');
		$atrDATEINUTC = $obBatch->getAttribute('DateInUtc');
		$atrPROPERTIES = $obBatch->getAttribute('Properties');

		$arChanges = $obBatch->children;

		$arResultIDs = array();
		$dateStart = ConvertTimeStamp(strtotime('-1 hour'), 'FULL');
		$arResponseRows = array();
		$arReplicationIDs = array();
		$userId = (is_object($USER) && $USER->GetID()) ? $USER->GetID() : 1;

		foreach ($arChanges as $obMethod)
		{
			$arData = array('_command' => $obMethod->getAttribute('Cmd'));

			foreach ($obMethod->children as $obField)
			{
				$name = $obField->getAttribute('Name');
				if ($name == 'MetaInfo')
					$name .= '_'.$obField->getAttribute('Property');

				$arData[$name] = $obField->content;
			}

			if ($arData['_command'] == 'Delete')
			{
				$obRes = new CXMLCreator('Result');
				$obRes->setAttribute('ID', $obMethod->getAttribute('ID').','.$arData['_command']);
				$obRes->setAttribute('List', $listName);
				$obRes->addChild($obNode = new CXMLCreator('ErrorCode'));

				$res = CCalendar::DeleteEvent($arData['ID']);
				if ($res === true)
					$obNode->setData('0x00000000');
				else
					$obNode->setData('0x81020014');

				/*
					0x00000000 - ok
					0x81020015 - data conflict
					0x81020014 - generic error such as invalid value for Field
					0x81020016 - item does not exist
				*/

				$obResponse->addChild($obRes);
			}
			elseif ($arData['_command'] == 'New' || $arData['_command'] == 'Update')
			{
				$q = ToLower($arData['Description']);
				if (($pos = strrpos($q, '</body>')) !== false) $arData['Description'] = substr($arData['Description'], 0, $pos);
				if (($pos = strpos($q, '<body>')) !== false) $arData['Description'] = substr($arData['Description'], $pos + 6);

				$arData['Description'] = str_replace('</DIV>', "\r\n</DIV>", $arData['Description']);
				$arData['Description'] = str_replace(array("&#10;", "&#13;"), "", $arData['Description']);
				$arData['Description'] = preg_replace("/<![^>]*>/", '', $arData['Description']);
				//$arData['Description'] = strip_tags($arData['Description']);
				$arData['Description'] = trim($arData['Description']);

				$arData['Location'] = trim($arData['Location']);

				if (isset($arData['EventDate']))
				{
					$arData['EventDate'] = $this->__makeTS($arData['EventDate']);
					$arData['EndDate'] = $this->__makeTS($arData['EndDate']) + ($arData['fAllDayEvent'] ? -86340 : 0);
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:webservice.php


示例6: BuildDialog


//.........这里部分代码省略.........
					<td class="bxec-scale-cont"><label for="<?php 
        echo $id;
        ?>
_plan_scale_sel"><?php 
        echo GetMessage('EC_SCALE');
        ?>
:</label>
						<select id="<?php 
        echo $id;
        ?>
_plan_scale_sel">
							<option value="0">30 <?php 
        echo GetMessage('EC_EDEV_REM_MIN');
        ?>
</option>
							<option value="1">1 <?php 
        echo GetMessage('EC_PL_DUR_HOUR1');
        ?>
</option>
							<option value="2">2 <?php 
        echo GetMessage('EC_PL_DUR_HOUR2');
        ?>
</option>
							<option value="3">1 <?php 
        echo GetMessage('EC_JS_DAY_P');
        ?>
</option>
						</select>
					</td>
					<td class="bxec-separator-gr" rowSpan="2"></td>
					<td rowSpan="2"><div class="bxec-grid-cont-title"></div></td>
				</tr>
				<tr class="bxec-header">
					<td class="bxec-user">
						<div><?php 
        echo GetMessage('EC_EDEV_GUESTS');
        ?>
							<span id="<?php 
        echo $id;
        ?>
pl-count"></span>
							<i class="bxplan-del bxplan-del-all" id="<?php 
        echo $id;
        ?>
_planner_del_all" title="<?php 
        echo GetMessage('EC_DEL_ALL_GUESTS_TITLE');
        ?>
"></i>
						</div>
					</td>
				</tr>
				<tr>
					<td><div class="bxec-user-list-div"><div class="bxec-empty-list"> <?php 
        echo GetMessage('EC_NO_ATTENDEES');
        ?>
</div></div></td>
					<td class="bxec-separator"></td>
					<td><div class="bxec-grid-cont"><div class="bxec-gacc-cont"></div>
						<div class="bxecp-selection" id="<?php 
        echo $id;
        ?>
_plan_selection"  title="<?php 
        echo GetMessage('EC_PL_EVENT');
        ?>
"><img src="/bitrix/images/1.gif" class="bxecp-sel-left" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE_LEFT');
        ?>
" /><img src="/bitrix/images/1.gif" class="bxecp-sel-right" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE_RIGHT');
        ?>
" /><img src="/bitrix/images/1.gif" class="bxecp-sel-mover" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE');
        ?>
" /></div>
					</div>
					<div class="bxec-empty-list2"><?php 
        echo GetMessage('EC_NO_GUEST_MESS');
        ?>
</div>
					</td>
				</tr>
			</table>
		</div>
		</div>
		</td>
	</tr>
</table>
<script>
function BXPlannerAttendeeOnchange(arUsers){BX.onCustomEvent(window, 'onPlannerAttendeeOnChange', [arUsers]);}
</script>
<?php 
        $isExtranetGroup = false;
        if ($Params["bSocNet"] && $Params["type"] == "group" && intval($Params["ownerId"]) > 0 && CModule::IncludeModule("extranet")) {
            $isExtranetGroup = CExtranet::IsExtranetSocNetGroup($Params["ownerId"]);
        }
        $APPLICATION->IncludeComponent("bitrix:intranet.user.selector.new", "", array("MULTIPLE" => "Y", "NAME" => "BXPlannerUserSelect", "VALUE" => array(), "POPUP" => "Y", "ON_CHANGE" => "BXPlannerAttendeeOnchange", "SITE_ID" => SITE_ID, "NAME_TEMPLATE" => CCalendar::GetUserNameTemplate(), "SHOW_EXTRANET_USERS" => $isExtranetGroup ? "FROM_EXACT_GROUP" : "NONE", "EX_GROUP" => $isExtranetGroup ? $Params["ownerId"] : ""), null, array("HIDE_ICONS" => "Y"));
        ?>
</div>
<?php 
    }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:calendar_planer.php


示例7: class_exists

    die;
}
if (!CModule::IncludeModule("calendar")) {
    return;
}
$adv_mode = $arCurrentValues["ADVANCED_MODE_SETTINGS"] == 'Y';
$eventListMode = $arCurrentValues["EVENT_LIST_MODE"] == 'Y';
$bSocNet = CModule::IncludeModule("socialnetwork");
if ($bSocNet) {
    $bSocNet = class_exists('CSocNetUserToGroup') && CBXFeatures::IsFeatureEnabled("Calendar");
}
$arTypes = array();
$types = CCalendarType::GetList();
if (is_array($types)) {
    foreach ($types as $type) {
        $arTypes[$type["XML_ID"]] = "[" . $type["XML_ID"] . "] " . $type["NAME"];
    }
}
// * * * * * * * * * * * *  Groups * * * * * * * * * * * *
$arComponentParameters = array();
// $arComponentParameters["GROUPS"] = array(
// "BASE_SETTINGS" => array("NAME" => GetMessage("EC_GROUP_BASE_SETTINGS"), "SORT" => "100")
// );
//* * * * * * * * * * * Parameters  * * * * * * * * * * *
$arParams = array();
$arParams["CALENDAR_TYPE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes);
if (CCalendar::IsIntranetEnabled()) {
    $arParams["ALLOW_SUPERPOSE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_P_ALLOW_SUPERPOSE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y");
    $arParams["ALLOW_RES_MEETING"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_P_ALLOW_RES_MEETING"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y");
}
$arComponentParameters["PARAMETERS"] = $arParams;
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:.parameters.php


示例8: array

}
$arSelect[] = 'UF_CRM_CAL_EVENT';
if (!in_array('ID', $arSelect)) {
    $arSelect[] = 'ID';
}
$obRes = CCrmActivityCalendar::GetList($arResult['SORT'], $arFilter, $arSelect, $nPageTop);
if ($arResult['GADGET'] != 'Y') {
    $obRes->NavStart($arNav['nPageSize'], false);
    $arResult['DB_LIST'] = $obRes;
}
$obRes->bShowAll = false;
$arResult['ROWS_COUNT'] = $obRes->NavRecordCount;
$arResult['CAL'] = array();
$arCalList = array();
$i = 0;
$arCalendarConf = CCalendar::GetSettings();
$arParams['PATH_TO_CAL_SHOW'] = $arCalendarConf['path_to_user_calendar'];
while ($arCal = $obRes->GetNext()) {
    if (!isset($arCal['~UF_CRM_CAL_EVENT']) || !is_array($arCal['~UF_CRM_CAL_EVENT'])) {
        continue;
    }
    $iAddTask = -1;
    foreach ($arCal['~UF_CRM_CAL_EVENT'] as $sCalRel) {
        if ($nPageTop !== false && $i >= $nPageTop) {
            break 2;
        }
        $arCal['REL_ID'] = $sCalRel;
        $arCalEntityData = CCrmActivityCalendar::GetEntityDataByCalRel($sCalRel);
        if (isset($arResult['CAL'][$arCal['ID'] . '_' . $sCalRel])) {
            continue;
        }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


示例9: IsModuleInstalled

// Webdaw upload file UF
$arParams["UPLOAD_WEBDAV_ELEMENT"] = $arResult['USER_FIELDS']['UF_WEBDAV_CAL_EVENT'];

$arParams['SECTIONS'] = CCalendar::GetSectionList(array(
	'CAL_TYPE' => $arParams['OWNER_TYPE'],
	'OWNER_ID' => $arParams['CUR_USER']
));

if (empty($arParams['SECTIONS']))
{
	$defCalendar = CCalendarSect::CreateDefault(array(
		'type' => $arParams['OWNER_TYPE'],
		'ownerId' => $arParams['CUR_USER']
	));
	$arParams['SECTIONS'][] = $defCalendar;
	CCalendar::SetCurUserMeetingSection($defCalendar['ID']);
}

$arParams['EVENT'] = CCalendarEvent::GetById($arParams['EVENT_ID']);

$arParams["DESTINATION"] = (is_array($arParams["DESTINATION"]) && IsModuleInstalled("socialnetwork") ? $arParams["DESTINATION"] : array());
$arParams["DESTINATION"] = (array_key_exists("VALUE", $arParams["DESTINATION"]) ? $arParams["DESTINATION"]["VALUE"] : $arParams["DESTINATION"]);


$users = array();
foreach ($arParams["DESTINATION"]['USERS'] as $key => $entry)
{
	if ($entry['isExtranet'] == 'N')
		$users[$key] = $entry;
}
$arParams["DESTINATION"]['USERS'] = $users;
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:component.php


示例10: ShowError

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("calendar")) {
    return ShowError("EC_CALENDAR_MODULE_NOT_INSTALLED");
}
CModule::IncludeModule("socialnetwork");
$APPLICATION->ResetException();
$Params = array('type' => $arParams["CALENDAR_TYPE"], 'ownerId' => $arParams["OWNER_ID"], 'pageUrl' => htmlspecialcharsback(POST_FORM_ACTION_URI), 'allowSuperpose' => $arParams["ALLOW_SUPERPOSE"] == 'Y', 'allowResMeeting' => $arParams["ALLOW_RES_MEETING"] != 'N', 'allowVideoMeeting' => $arParams["ALLOW_RES_MEETING"] != 'N', 'SectionControlsDOMId' => 'sidebar', 'user_name_template' => empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]));
if (isset($arParams["SIDEBAR_DOM_ID"])) {
    $Params['SectionControlsDOMId'] = $arParams["SIDEBAR_DOM_ID"];
}
// Create new instance of Event Calendar object
$EC = new CCalendar();
$EC->Init($Params);
// Init with $Params array
if (isset($_REQUEST['action'])) {
    $EC->Request($_REQUEST['action']);
} else {
    $EC->Show();
}
if ($ex = $APPLICATION->GetException()) {
    return ShowError($ex->GetString());
}
// Set title and navigation
$arParams["SET_TITLE"] = $arParams["SET_TITLE"] == "Y" ? "Y" : "N";
$arParams["SET_NAV_CHAIN"] = $arParams["SET_NAV_CHAIN"] == "Y" ? "Y" : "N";
//Turn OFF by default
if ($arParams["STR_TITLE"]) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php


示例11: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("calendar")) {
    return;
}
COption::SetOptionString("intranet", "calendar_2", "Y");
if (WIZARD_FIRST_INSTAL != 'Y') {
    // calendar type
    $arTypes = CCalendarType::GetList(array("arFilter" => array("XML_ID" => 'events_info')));
    if (!$arTypes || count($arTypes) <= 0) {
        CCalendarType::Edit(array('NEW' => true, 'arFields' => array('XML_ID' => 'events_info', 'NAME' => GetMessage('CAL_DEFAULT_TYPE'), 'ACCESS' => array('G2' => CCalendar::GetAccessTasksByName('calendar_type', 'calendar_type_view')))));
    }
    // Sections
    $sectId0 = CCalendar::SaveSection(array('arFields' => array('CAL_TYPE' => 'events_info', 'ID' => 0, 'NAME' => GetMessage("CAL_TYPE_COMPANY_NAME"), 'DESCRIPTION' => "", 'COLOR' => '#855CC5', 'TEXT_COLOR' => '', 'OWNER_ID' => '', 'EXPORT' => array('ALLOW' => true, 'SET' => '3_9'), 'ACCESS' => array(), 'IS_EXCHANGE' => false)));
    // Events for company_calendar
    CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'events_info', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_EVENT_1_NAME"), 'DESCRIPTION' => "", 'DT_FROM' => GetTime(mktime(0, 0, 0, date("m"), date("d") + 4, date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(0, 0, 0, date("m"), date("d") + 4, date("Y")), "FULL"), 'RRULE' => array(), 'SECTIONS' => $sectId0), 'userId' => 1));
    CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'events', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_EVENT_2_NAME"), 'DESCRIPTION' => "", 'COLOR' => '#FFFF80', 'DT_FROM' => GetTime(mktime(0, 0, 0, date("m"), date("d"), date("Y")), "SHORT"), 'DT_TO' => GetTime(mktime(0, 0, 0, date("m"), date("d"), date("Y")), "SHORT"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 3, 'BYDAY' => 'SA'), 'SECTIONS' => $sectId0), 'userId' => 1));
}
开发者ID:spas-viktor,项目名称:books,代码行数:21,代码来源:index.php


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


示例13: FixForumCommentURL

	public static function FixForumCommentURL($arData)
	{
		if(
			in_array($arData["MODULE_ID"], array("forum", "FORUM"))
			&& $arData['ENTITY_TYPE_ID'] === 'FORUM_POST'
			&& intval($arData['PARAM1']) > 0
			&& preg_match('/^EVENT_([0-9]+)/', $arData["TITLE"], $match)
		)
		{
			$arCalendarSettings = CCalendar::GetSettings();
			$forumID = $arCalendarSettings["forum_id"];
			$eventID = intval($match[1]);

			if (
				intval($arData['PARAM1']) == $forumID
				&& $eventID > 0
				&& !empty($arCalendarSettings["pathes"])
				&& ($arCalendarEvent = CCalendarEvent::GetById($eventID))
				&& strlen($arCalendarEvent["CAL_TYPE"]) > 0
				&& in_array($arCalendarEvent["CAL_TYPE"], array("user", "group"))
				&& intval($arCalendarEvent["OWNER_ID"]) > 0
			)
			{
				foreach ($arData['LID'] as $siteId => $value)
				{
					$messageUrl = false;

					if (
						array_key_exists($siteId, $arCalendarSettings["pathes"])
						&& is_array($arCalendarSettings["pathes"][$siteId])
						&& !empty($arCalendarSettings["pathes"][$siteId])
					)
					{
						if ($arCalendarEvent["CAL_TYPE"] == "user")
						{
							if (
								array_key_exists("path_to_user_calendar", $arCalendarSettings["pathes"][$siteId])
								&& !empty($arCalendarSettings["pathes"][$siteId]["path_to_user_calendar"])
							)
							{
								$messageUrl = CComponentEngine::MakePathFromTemplate(
									$arCalendarSettings["pathes"][$siteId]["path_to_user_calendar"],
									array(
										"user_id" => $arCalendarEvent['OWNER_ID'],
									)
								);
							}
						}
						else
						{
							if (
								array_key_exists("path_to_group_calendar", $arCalendarSettings["pathes"][$siteId])
								&& !empty($arCalendarSettings["pathes"][$siteId]["path_to_group_calendar"])
							)
							{
								$messageUrl = CComponentEngine::MakePathFromTemplate(
									$arCalendarSettings["pathes"][$siteId]["path_to_group_calendar"],
									array(
										"group_id" => $arCalendarEvent['OWNER_ID'],
									)
								);
							}
						}
					}

					$arData['LID'][$siteId] = ($messageUrl ? $messageUrl."?EVENT_ID=".$arCalendarEvent["ID"]."&MID=".$arData['ENTITY_ID']."#message".$arData['ENTITY_ID'] : "");
				}

				return $arData;
			}

			return array(
				"TITLE" => "",
				"BODY" => ""
			);
		}
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:77,代码来源:calendar_livefeed.php


示例14: GetMessage

 $today = CCalendar::Date(time(), false);
 $tomorrow = CCalendar::Date(time() + 86400, false);
 $bToday = false;
 $bTomorrow = false;
 $bLater = false;
 $use_sections = "YES";
 $iconEvent = '/bitrix/templates/mobile_app/images/calendar/event.png';
 $iconMeeting = '/bitrix/templates/mobile_app/images/calendar/meeting.png';
 $iconInviting = '/bitrix/templates/mobile_app/images/calendar/meeting-q.png';
 $dateFormat = GetMessage('MB_CAL_EVENT_DATE_FORMAT');
 $timeFormat = IsAmPmMode() ? GetMessage('MB_CAL_EVENT_TIME_FORMAT_AMPM') : GetMessage('MB_CAL_EVENT_TIME_FORMAT');
 $count = count($arEvents);
 for ($i = 0; $i < $count; $i++) {
     $event = $arEvents[$i];
     $event['DT_FROM_TS'] = CCalendar::_fixTimestamp($event['DT_FROM_TS']);
     $event['DT_TO_TS'] = CCalendar::_fixTimestamp($event['DT_TO_TS']);
     $item = array("ID" => $event['ID'], "NAME" => CMobile::PrepareStrToJson($event['NAME']), "URL" => $url . "?event_id=" . $event['ID']);
     if ($event['IS_MEETING'] && $event['USER_MEETING']['STATUS'] == 'N') {
         continue;
     }
     if ($event['IS_MEETING']) {
         $item["IMAGE"] = $event['USER_MEETING']['STATUS'] == 'Q' ? $iconInviting : $iconMeeting;
     } else {
         $item["IMAGE"] = $iconEvent;
     }
     $bOneDay = $event['DT_LENGTH'] == 86400;
     // One full day
     $bDuringOneDay = !$bOneDay && FormatDate('d.m.Y', $event['DT_FROM_TS']) === FormatDate('d.m.Y', $event['DT_TO_TS']);
     $fromToMess = '';
     // It's event for today
     if ($event['DT_FROM_TS'] <= $todayEndTs && $event['DT_TO_TS'] >= $todayStartTs) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


示例15: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("calendar") || WIZARD_IS_RERUN) {
    return;
}
COption::SetOptionString("intranet", "calendar_2", "Y");
// company calendar calendar type
CCalendarType::Edit(array('NEW' => true, 'arFields' => array('XML_ID' => 'company_calendar', 'NAME' => GetMessage('CAL_TYPE_COMPANY_NAME'), 'DESCRIPTION' => '', 'ACCESS' => array('G2' => CCalendar::GetAccessTasksByName('calendar_type', 'calendar_type_view')))));
// Sections
$sectId0 = CCalendar::SaveSection(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'ID' => 0, 'NAME' => GetMessage("CAL_COMPANY_SECT_0"), 'DESCRIPTION' => GetMessage("CAL_COMPANY_SECT_DESC_0"), 'COLOR' => '#855CC5', 'TEXT_COLOR' => '', 'OWNER_ID' => '', 'EXPORT' => array('ALLOW' => true, 'SET' => '3_9'), 'ACCESS' => array(), 'IS_EXCHANGE' => false)));
$sectId1 = CCalendar::SaveSection(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'ID' => 0, 'NAME' => GetMessage("CAL_COMPANY_SECT_1"), 'DESCRIPTION' => GetMessage("CAL_COMPANY_SECT_DESC_1"), 'COLOR' => '#7DDEC2', 'TEXT_COLOR' => '', 'OWNER_ID' => '', 'EXPORT' => array('ALLOW' => true, 'SET' => '3_9'), 'ACCESS' => array(), 'IS_EXCHANGE' => false)));
$sectId2 = CCalendar::SaveSection(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'ID' => 0, 'NAME' => GetMessage("CAL_COMPANY_SECT_2"), 'DESCRIPTION' => GetMessage("CAL_COMPANY_SECT_DESC_2"), 'COLOR' => '#F6EA68', 'TEXT_COLOR' => '', 'OWNER_ID' => '', 'EXPORT' => array('ALLOW' => true, 'SET' => '3_9'), 'ACCESS' => array(), 'IS_EXCHANGE' => false)));
// Events for company_calendar
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_0"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_0"), 'DT_FROM' => GetTime(mktime(9, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(16, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 1, 'UNTIL' => GetTime(mktime(0, 0, 0, date("m"), date("d"), date("Y") + 1), "SHORT"), 'BYDAY' => 'TU'), 'SECTIONS' => $sectId0), 'userId' => 1));
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_1"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_1"), 'DT_FROM' => GetTime(mktime(0, 0, 0, date("m"), date("d") + 2, date("Y")), "SHORT"), 'DT_TO' => GetTime(mktime(0, 0, 0, date("m"), date("d") + 2, date("Y")), "SHORT"), 'RRULE' => array('FREQ' => 'MONTHLY', 'INTERVAL' => 1, 'UNTIL' => GetTime(mktime(0, 0, 0, date("m"), date("d"), date("Y") + 1), "SHORT")), 'SECTIONS' => $sectId0), 'userId' => 1));
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_2"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_2"), 'DT_FROM' => GetTime(mktime(10, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(12, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 1, 'BYDAY' => 'MO'), 'SECTIONS' => $sectId1), 'userId' => 1));
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_3"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_3"), 'DT_FROM' => GetTime(mktime(9, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(18, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 1, 'BYDAY' => 'TU'), 'SECTIONS' => $sectId2), 'userId' => 1));
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 0, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_4"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_4"), 'DT_FROM' => GetTime(mktime(12, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(17, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 1, 'BYDAY' => 'FR'), 'SECTIONS' => $sectId2), 'userId' => 1));
CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'company_calendar', 'OWNER_ID' => 1, 'NAME' => GetMessage("CAL_COMP_EVENT_NAME_5"), 'DESCRIPTION' => GetMessage("CAL_COMP_EVENT_DESC_5"), 'DT_FROM' => GetTime(mktime(16, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(21, 0, 0, date("m"), date("d"), date("Y")), "FULL"), 'RRULE' => array('FREQ' => 'WEEKLY', 'INTERVAL' => 1, 'BYDAY' => 'SA'), 'SECTIONS' => $sectId1), 'userId' => 1));
// User's calendar type
CCalendarType::Edit(array('NEW' => true, 'arFields' => array('XML_ID' => 'user', 'NAME' => GetMessage('CAL_TYPE_USER_NAME'), 'DESCRIPTION' => '', 'ACCESS' => array('G2' => CCalendar::GetAccessTasksByName('calendar_type', 'calendar_type_edit')))));
// Group's calendar type
CCalendarType::Edit(array('NEW' => true, 'arFields' => array('XML_ID' => 'group', 'NAME' => GetMessage('CAL_TYPE_GROUP_NAME'), 'DESCRIPTION' => '', 'ACCESS' => array('G2' => CCalendar::GetAccessTasksByName('calendar_type', 'calendar_type_edit')))));
$id = CCalendar::SaveEvent(array('arFields' => array('CAL_TYPE' => 'user', 'OWNER_ID' => 1, 'NAME' => GetMessage("W_IB_CALENDAR_EMP_ABS"), 'DT_FROM' => GetTime(mktime(12, 0, 0, date("m"), date("d") + 1, date("Y")), "FULL"), 'DT_TO' => GetTime(mktime(14, 0, 0, date("m"), date("d") + 1, date("Y")), "FULL"), 'DESCRIPTION' => ''), 'userId' => 1, 'autoDetectSection' => true, 'autoCreateSection' => true));
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:27,代码来源:index.php


示例16: GetMessage

?>
</div>

<?php 
if ($viewComments) {
    ?>
	<div class="bxec-d-cont-comments-title">
		<?php 
    echo GetMessage('EC_COMMENTS');
    ?>
	</div>
	<div class="bxec-d-cont bxec-d-cont-comments">
		<?php 
    if ($userId == $event['CREATED_BY'] && ($event['PARENT_ID'] == $event['ID'] || !$event['PARENT_ID'])) {
        $permission = "Y";
    } else {
        $permission = 'M';
    }
    $set = CCalendar::GetSettings();
    $eventCommentId = $event['PARENT_ID'] ? $event['PARENT_ID'] : $event['ID'];
    // A < E < I < M < Q < U < Y
    // A - NO ACCESS, E - READ, I - ANSWER
    // M - NEW TOPIC
    // Q - MODERATE, U - EDIT, Y - FULL_ACCESS
    $APPLICATION->IncludeComponent("bitrix:forum.comments", "bitrix24", array("FORUM_ID" => $set['forum_id'], "ENTITY_TYPE" => "EV", "ENTITY_ID" => $eventCommentId, "ENTITY_XML_ID" => "EVENT_" . $eventCommentId, "PERMISSION" => $permission, "URL_TEMPLATES_PROFILE_VIEW" => $set['path_to_user'], "SHOW_RATING" => "Y", "SHOW_LINK_TO_MESSAGE" => "N", "BIND_VIEWER" => "Y"), false, array('HIDE_ICONS' => 'Y'));
    ?>
	</div>
<?php 
}
?>
</div>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php


示例17: CCalendar

<?php

/**
 * This is a Orange pagecontroller.
 *
 */
// Include the essential config-file which also creates the $Orange variable with its defaults.
include __DIR__ . '/config.php';
// Do it and store it all in variables in the Orange container.
$Orange['title'] = "Kalender";
$Orange['stylesheets'][] = 'css/calender.css';
//Create calender and set values
$calender = new CCalendar();
$calender->getValues();
$calender->generateCalenderData();
$Orange['main'] = "<h1>Kalender</h1>\n" . $calender->printCalendar();
// Finally, leave it all to the rendering phase of Orange.
include Orange_THEME_PATH;
开发者ID:Hannesalm,项目名称:oophp,代码行数:18,代码来源:calender.php


示例18: __ShowAttendeesDestinationHtml

    public static function __ShowAttendeesDestinationHtml($Params = array())
    {
        CSocNetTools::InitGlobalExtranetArrays();
        $id = $Params['id'];
        $DESTINATION = CCalendar::GetSocNetDestination(false, $Params['event']['ATTENDEES_CODES']);
        ?>
		<div id="event-grid-att<?php 
        echo $id;
        ?>
" class="event-grid-dest-block">
			<div class="event-grid-dest-wrap-outer">
				<div class="event-grid-dest-label"><?php 
        echo GetMessage("EC_EDEV_GUESTS");
        ?>
:</div>
				<div class="event-grid-dest-wrap" id="event-grid-dest-cont">
					<span id="event-grid-dest-item"></span>
					<span class="feed-add-destination-input-box" id="event-grid-dest-input-box">
						<input type="text" value="" class="feed-add-destination-inp" id="event-grid-dest-input">
					</span>
					<a href="#" class="feed-add-destination-link" id="event-grid-dest-add-link"></a>
					<script>
						<?php 
        if (is_array($GLOBALS["arExtranetGroupID"])) {
            ?>
							if (typeof window['arExtranetGroupID'] == 'undefined')
							{
								window['arExtranetGroupID'] = <?php 
            echo CUtil::PhpToJSObject($GLOBALS["arExtranetGroupID"]);
            ?>
;
							}
							<?php 
        }
        ?>
						BX.message({
							'BX_FPD_LINK_1':'<?php 
        echo GetMessageJS("EC_DESTINATION_1");
        ?>
',
							'BX_FPD_LINK_2':'<?php 
        echo GetMessageJS("EC_DESTINATION_2");
        ?>
'
						});
						window.editEventDestinationFormName = top.editEventDestinationFormName = 'edit_event_<?php 
        echo randString(6);
        ?>
';
						//
						BX.SocNetLogDestination.init({
							name : editEventDestinationFormName,
							searchInput : BX('event-grid-dest-input'),
							extranetUser :  false,
							userSearchArea: 'I',
							bindMainPopup : { 'node' : BX('event-grid-dest-cont'), 'offsetTop' : '5px', 'offsetLeft': '15px'},
							bindSearchPopup : { 'node' : BX('event-grid-dest-cont'), 'offsetTop' : '5px', 'offsetLeft': '15px'},
							callback : {
								select : BxEditEventGridSelectCallback,
								unSelect : BxEditEventGridUnSelectCallback,
								openDialog : BxEditEventGridOpenDialogCallback,
								closeDialog : BxEditEventGridCloseDialogCallback,
								openSearch : BxEditEventGridOpenDialogCallback,
								closeSearch : BxEditEventGridCloseSearchCallback
							},
							items : {
								users : <?php 
        echo empty($DESTINATION['USERS']) ? '{}' : CUtil::PhpToJSObject($DESTINATION['USERS']);
        ?>
,
								groups : <?php 
        echo $DESTINATION["EXTRANET_USER"] == 'Y' || array_key_exists("DENY_TOALL", $DESTINATION) && $DESTINATION["DENY_TOALL"] ? '{}' : "{'UA' : {'id':'UA','name': '" . (!empty($DESTINATION['DEPARTMENT']) ? GetMessageJS("MPF_DESTINATION_3") : GetMessageJS("MPF_DESTINATION_4")) . "'}}";
        ?>
,
								sonetgroups : <?php 
        echo empty($DESTINATION['SONETGROUPS']) ? '{}' : CUtil::PhpToJSObject($DESTINATION['SONETGROUPS']);
        ?>
,
								department : <?php 
        echo empty($DESTINATION['DEPARTMENT']) ? '{}' : CUtil::PhpToJSObject($DESTINATION[' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CCanDo类代码示例发布时间:2022-05-23
下一篇:
PHP CCache类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap