本文整理汇总了PHP中CApi::ClientI18N方法的典型用法代码示例。如果您正苦于以下问题:PHP CApi::ClientI18N方法的具体用法?PHP CApi::ClientI18N怎么用?PHP CApi::ClientI18N使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CApi
的用法示例。
在下文中一共展示了CApi::ClientI18N方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckPrincipals
public static function CheckPrincipals($sUserName)
{
$oPdo = \CApi::GetPDO();
$dbPrefix = \CApi::GetSettingsConf('Common/DBPrefix');
$sPrincipal = \afterlogic\DAV\Constants::PRINCIPALS_PREFIX . '/' . $sUserName;
$oStmt = $oPdo->prepare('SELECT id FROM ' . $dbPrefix . Constants::T_PRINCIPALS . ' WHERE uri = ? LIMIT 1');
$oStmt->execute(array($sPrincipal));
if (count($oStmt->fetchAll()) === 0) {
$oStmt = $oPdo->prepare('INSERT INTO ' . $dbPrefix . Constants::T_PRINCIPALS . '
(uri,email,displayname) VALUES (?, ?, ?)');
try {
$oStmt->execute(array($sPrincipal, $sUserName, ''));
} catch (Exception $e) {
}
}
$oStmt = $oPdo->prepare('SELECT principaluri FROM ' . $dbPrefix . Constants::T_CALENDARS . '
WHERE principaluri = ?');
$oStmt->execute(array($sPrincipal));
if (count($oStmt->fetchAll()) === 0) {
$oStmt = $oPdo->prepare('INSERT INTO ' . $dbPrefix . Constants::T_CALENDARS . '
(principaluri, displayname, uri, description, components, ctag, calendarcolor)
VALUES (?, ?, ?, ?, ?, 1, ?)');
$oAccount = self::GetAccountByLogin($sUserName);
$oStmt->execute(array($sPrincipal, \CApi::ClientI18N('CALENDAR/CALENDAR_DEFAULT_NAME', $oAccount), \Sabre\DAV\UUIDUtil::getUUID(), '', 'VEVENT,VTODO', Constants::CALENDAR_DEFAULT_COLOR));
}
$oStmt = $oPdo->prepare('SELECT principaluri FROM ' . $dbPrefix . Constants::T_CALENDARS . '
WHERE principaluri = ? and uri = ? LIMIT 1');
$oStmt->execute(array($sPrincipal, Constants::CALENDAR_DEFAULT_NAME));
if (count($oStmt->fetchAll()) !== 0) {
$oStmt = $oPdo->prepare('UPDATE ' . $dbPrefix . Constants::T_CALENDARS . '
SET uri = ? WHERE principaluri = ? and uri = ?');
$oStmt->execute(array(\Sabre\DAV\UUIDUtil::getUUID(), $sPrincipal, Constants::CALENDAR_DEFAULT_NAME));
}
$oStmt = $oPdo->prepare('SELECT principaluri FROM ' . $dbPrefix . Constants::T_ADDRESSBOOKS . '
WHERE principaluri = ? and uri = ? LIMIT 1');
$oStmt->execute(array($sPrincipal, Constants::ADDRESSBOOK_DEFAULT_NAME));
$bHasDefaultAddressbooks = count($oStmt->fetchAll()) != 0;
$oStmt->execute(array($sPrincipal, Constants::ADDRESSBOOK_DEFAULT_NAME_OLD));
$bHasOldDefaultAddressbooks = count($oStmt->fetchAll()) != 0;
$oStmt->execute(array($sPrincipal, Constants::ADDRESSBOOK_COLLECTED_NAME));
$bHasCollectedAddressbooks = count($oStmt->fetchAll()) != 0;
$stmt1 = $oPdo->prepare('INSERT INTO ' . $dbPrefix . Constants::T_ADDRESSBOOKS . '
(principaluri, displayname, uri, description, ctag)
VALUES (?, ?, ?, ?, 1)');
if (!$bHasDefaultAddressbooks) {
if ($bHasOldDefaultAddressbooks) {
$oStmt = $oPdo->prepare('UPDATE ' . $dbPrefix . Constants::T_ADDRESSBOOKS . '
SET uri = ? WHERE principaluri = ? and uri = ?');
$oStmt->execute(array(Constants::ADDRESSBOOK_DEFAULT_NAME, $sPrincipal, Constants::ADDRESSBOOK_DEFAULT_NAME_OLD));
} else {
$stmt1->execute(array($sPrincipal, Constants::ADDRESSBOOK_DEFAULT_DISPLAY_NAME, Constants::ADDRESSBOOK_DEFAULT_NAME, Constants::ADDRESSBOOK_DEFAULT_DISPLAY_NAME));
}
}
if (!$bHasCollectedAddressbooks) {
$stmt1->execute(array($sPrincipal, Constants::ADDRESSBOOK_COLLECTED_DISPLAY_NAME, Constants::ADDRESSBOOK_COLLECTED_NAME, Constants::ADDRESSBOOK_COLLECTED_DISPLAY_NAME));
}
}
示例2: _addHtmlBodyAndSubjectForPostMessage
/**
* @param string $sPath
* @param \MailSo\Mime\Message $oMessage Message object
* @param CHelpdeskUser $oHelpdeskThreadOwnerUser Helpdesk user object
* @param CHelpdeskUser $oHelpdeskPostOwnerUser Helpdesk user object
* @param CHelpdeskThread $oThread Helpdesk thread object
* @param CHelpdeskPost $oPost Helpdesk post object
* @param string $sSiteName
*/
private function _addHtmlBodyAndSubjectForPostMessage($sPath, &$oMessage, $oHelpdeskThreadOwnerUser, $oHelpdeskPostOwnerUser, $oThread, $oPost, $sSiteName)
{
$sSubject = '';
$oApiUsers = $this->_getApiUsers();
$sData = $this->_getMessageTemplate($sPath, $sSubject, function ($sData) use($oHelpdeskThreadOwnerUser, $oHelpdeskPostOwnerUser, $oThread, $oPost, $sSiteName, $oApiUsers) {
$oAccount = $oApiUsers->getAccountByEmail($oHelpdeskPostOwnerUser->resultEmail());
$sPostOwner = \MailSo\Mime\Email::NewInstance($oHelpdeskPostOwnerUser->resultEmail(), $oHelpdeskPostOwnerUser->Name)->ToString();
$sSubjectPrefix = '';
if ($oThread && 0 < $oThread->PostCount - 1) {
$sSubjectPrefix = 'Re' . (2 < $oThread->PostCount ? '[' . ($oThread->PostCount - 1) . ']' : '') . ': ';
}
$sAttachments = '';
if ($oPost && is_array($oPost->Attachments) && 0 < count($oPost->Attachments)) {
$sAttachmentsNames = array();
foreach ($oPost->Attachments as $oAttachment) {
if ($oAttachment) {
$sAttachmentsNames[] = $oAttachment->FileName;
}
}
$sAttachments = '<br /><br />Attachments: ' . implode(', ', $sAttachmentsNames) . '<br />';
}
$sHelpdeskSiteName = strlen($sSiteName) === 0 ? 'Helpdesk' : $sSiteName;
$sThreadOwner = $oHelpdeskThreadOwnerUser && \strlen($oHelpdeskThreadOwnerUser->Name) > 0 ? ' ' . $oHelpdeskThreadOwnerUser->Name : '';
return strtr($sData, array('{{HELPDESK/POST_AGENT_SUBJECT}}' => ':SUBJECT: ' . \CApi::ClientI18N('HELPDESK/MAIL_POST_AGENT_SUBJECT', null, array("OWNER" => $sPostOwner)), '{{HELPDESK/POST_AGENT_HTML}}' => $oPost ? \MailSo\Base\HtmlUtils::ConvertPlainToHtml($oPost->Text) : '', '{{HELPDESK/POST_AGENT_ATTACHMENTS}}' => $sAttachments, '{{HELPDESK/POST_AGENT_THREAD_LINK}}' => $oThread->threadLink(), '{{HELPDESK/POST_USER_SUBJECT}}' => $sSubjectPrefix . $oThread->Subject, '{{HELPDESK/POST_USER_GREET}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_USER_GREET', null, array("OWNER" => $sPostOwner)), '{{HELPDESK/POST_USER_REMIND}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_USER_REMIND', null, array("SITE" => $sHelpdeskSiteName)), '{{HELPDESK/POST_USER_THREAD_SUBJECT_LABEL}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_USER_THREAD_SUBJECT_LABEL'), '{{HELPDESK/POST_USER_THREAD_SUBJECT}}' => $oThread->Subject, '{{HELPDESK/POST_USER_HTML}}' => $oPost ? \MailSo\Base\HtmlUtils::ConvertPlainToHtml($oPost->Text) : '', '{{HELPDESK/POST_USER_NOT_REPLY}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_USER_NOT_REPLY'), '{{HELPDESK/POST_USER_CLICK_LINK}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_USER_CLICK_LINK'), '{{HELPDESK/POST_USER_THREAD_LINK}}' => $oThread->threadLink(), '{{HELPDESK/POST_NEW_SUBJECT}}' => ':SUBJECT: ' . \CApi::ClientI18N('HELPDESK/MAIL_POST_NEW_SUBJECT'), '{{HELPDESK/POST_NEW_GREET}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NEW_GREET', null, array("OWNER" => $sThreadOwner)), '{{HELPDESK/POST_NEW_REMIND}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NEW_REMIND', null, array("SITE" => $sHelpdeskSiteName)), '{{HELPDESK/POST_NEW_HTML}}' => $oPost ? \MailSo\Base\HtmlUtils::ConvertPlainToHtml($oPost->Text) : '', '{{HELPDESK/POST_NEW_NOT_REPLY}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NEW_NOT_REPLY'), '{{HELPDESK/POST_NEW_CLICK_LINK}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NEW_CLICK_LINK'), '{{HELPDESK/POST_NEW_THREAD_LINK}}' => $oThread->threadLink(), '{{HELPDESK/POST_NOTIFICATION_SUBJECT}}' => ':SUBJECT: ' . \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_SUBJECT'), '{{HELPDESK/POST_NOTIFICATION_GREET}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_GREET', null, array("OWNER" => $sThreadOwner)), '{{HELPDESK/POST_NOTIFICATION_REMIND}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_REMIND', null, array("SITE" => $sHelpdeskSiteName)), '{{HELPDESK/POST_NOTIFICATION_QUESTIONS}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_QUESTIONS'), '{{HELPDESK/POST_NOTIFICATION_CLOSE}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_CLOSE'), '{{HELPDESK/POST_NOTIFICATION_NOT_REPLY}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_NOT_REPLY'), '{{HELPDESK/POST_NOTIFICATION_CLICK_LINK}}' => \CApi::ClientI18N('HELPDESK/MAIL_POST_NOTIFICATION_CLICK_LINK'), '{{HELPDESK/POST_NOTIFICATION_THREAD_LINK}}' => $oThread->threadLink()));
});
if (0 < strlen($sSubject)) {
$oMessage->SetSubject($sSubject . ' [#' . $oThread->StrHelpdeskThreadHash . '#]');
}
if (is_string($sData) && 0 < strlen($sData)) {
$oMessage->AddText(\MailSo\Base\HtmlUtils::ConvertHtmlToPlain($sData), false);
$oMessage->AddHtml($sData, true);
}
}
示例3: getCalendarsForUser
/**
* Returns a list of calendars for a principal.
*
* Every project is an array with the following keys:
* * id, a unique id that will be used by other functions to modify the
* calendar. This can be the same as the uri or a database key.
* * uri, which the basename of the uri with which the calendar is
* accessed.
* * principaluri. The owner of the calendar. Almost always the same as
* principalUri passed to this method.
*
* Furthermore it can contain webdav properties in clark notation. A very
* common one is '{DAV:}displayname'.
*
* MODIFIED: THIS METHOD NOW NEEDS TO BE ABLE TO RETRIEVE SHARED CALENDARS
*
* @param string $principalUri
* @return array
*/
public function getCalendarsForUser($principalUri)
{
$aCalendars = $this->getOwnCalendarsForUser($principalUri);
if (count($aCalendars) === 0) {
$this->createCalendar($principalUri, \Sabre\DAV\UUIDUtil::getUUID(), ['{DAV:}displayname' => \CApi::ClientI18N('CALENDAR/CALENDAR_DEFAULT_NAME', basename($principalUri)), '{' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '}getctag' => 1, '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-description' => '', '{http://apple.com/ns/ical/}calendar-color' => \Afterlogic\DAV\Constants::CALENDAR_DEFAULT_COLOR, '{http://apple.com/ns/ical/}calendar-order' => 0]);
$aCalendars = $this->getOwnCalendarsForUser($principalUri);
}
/*
$aSharedCalendars = $this->getSharedCalendarsForUser($principalUri);
$aSharedToAllCalendars = $this->getSharedCalendarsForUser(
\Afterlogic\DAV\Utils::getTenantPrincipalUri($principalUri)
);
foreach ($aSharedToAllCalendars as $iKey => $aSharedToAllCalendar) {
if (isset($aCalendars[$iKey])) {
$aSharedToAllCalendar['{http://sabredav.org/ns}read-only'] = false;
}
$aCalendars[$iKey] = $aSharedToAllCalendar;
}
foreach ($aSharedCalendars as $iKey => $aSharedCalendar) {
if (isset($aCalendars[$iKey])) {
$aSharedCalendar['{http://sabredav.org/ns}read-only'] = false;
}
$aCalendars[$iKey] = $aSharedCalendar;
}
*/
$aSharedCalendars = array();
return array_merge($aCalendars, $aSharedCalendars);
}
示例4: AjaxAccountResetPassword
/**
* @return array
*/
public function AjaxAccountResetPassword()
{
$mResult = false;
$oAccount = $this->getDefaultAccountFromParam();
$sUrlHash = $this->getParamValue('UrlHash', '');
$oTenant = null;
if ($oAccount->Domain->IdTenant > 0) {
$oTenant = $this->oApiTenants->getTenantById($oAccount->Domain->IdTenant);
} else {
$oTenant = $this->oApiTenants->getDefaultGlobalTenant();
}
if ($oTenant) {
$oNotificationAccount = $this->oApiUsers->GetAccountByEmail($oTenant->InviteNotificationEmailAccount);
if ($oNotificationAccount) {
$sPasswordResetUrl = rtrim(\api_Utils::GetAppUrl(), '/');
$sPasswordResetHash = \md5(\time() . \rand(1000, 9999) . \CApi::$sSalt);
$oAccount->User->PasswordResetHash = $sPasswordResetHash;
$this->oApiUsers->updateAccount($oAccount);
$sSubject = \CApi::ClientI18N('ACCOUNT_PASSWORD_RESET/SUBJECT', $oAccount, array('SITE_NAME' => $oAccount->Domain->SiteName));
$sBody = \CApi::ClientI18N('ACCOUNT_PASSWORD_RESET/BODY', $oAccount, array('SITE_NAME' => $oAccount->Domain->SiteName, 'PASSWORD_RESET_URL' => $sPasswordResetUrl . '/?reset-pass=' . $sPasswordResetHash . '#' . $sUrlHash, 'EMAIL' => $oAccount->Email));
$oMessage = \MailSo\Mime\Message::NewInstance();
$oMessage->RegenerateMessageId();
$oMessage->DoesNotCreateEmptyTextPart();
$sXMailer = \CApi::GetConf('webmail.xmailer-value', '');
if (0 < strlen($sXMailer)) {
$oMessage->SetXMailer($sXMailer);
}
$oMessage->SetFrom(\MailSo\Mime\Email::NewInstance($oTenant->InviteNotificationEmailAccount))->SetSubject($sSubject)->AddText($sBody, true);
$oToEmails = \MailSo\Mime\EmailCollection::NewInstance($oAccount->Email);
if ($oToEmails && $oToEmails->Count()) {
$oMessage->SetTo($oToEmails);
}
if ($oMessage) {
try {
$mResult = $this->oApiMail->sendMessage($oNotificationAccount, $oMessage);
} catch (\CApiManagerException $oException) {
throw $oException;
}
}
}
}
return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult);
}
示例5: Handle
//.........这里部分代码省略.........
}
}
if (empty($sResult)) {
$usec = $sec = 0;
list($usec, $sec) = \explode(' ', microtime());
$sResult = \implode("\n", array('<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">', empty($aMatches[1]) ? ' <Response>' : ' <Response xmlns="' . $aMatches[1] . '">', ' <Error Time="' . \gmdate('H:i:s', $sec) . \substr($usec, 0, \strlen($usec) - 2) . '" Id="2477272013">', ' <ErrorCode>600</ErrorCode>', ' <Message>Invalid Request</Message>', ' <DebugData />', ' </Error>', ' </Response>', '</Autodiscover>'));
}
header('Content-Type: text/xml');
$sResult = '<' . '?xml version="1.0" encoding="utf-8"?' . '>' . "\n" . $sResult;
\CApi::Log('');
\CApi::Log($sResult);
} else {
if ('profile' === $sFirstPart) {
/* @var $oApiIosManager \CApiIosManager */
$oApiIosManager = \CApi::Manager('ios');
$oAccount = $oApiIntegrator->getLogginedDefaultAccount();
$mResultProfile = $oApiIosManager && $oAccount ? $oApiIosManager->generateXMLProfile($oAccount) : false;
if ($mResultProfile !== false) {
header('Content-type: application/x-apple-aspen-config; chatset=utf-8');
header('Content-Disposition: attachment; filename="afterlogic.mobileconfig"');
echo $mResultProfile;
} else {
\CApi::Location('./?IOS/Error');
}
} else {
if ('ios' === $sFirstPart) {
$sResult = file_get_contents(PSEVEN_APP_ROOT_PATH . 'templates/Ios.html');
$iUserId = $oApiIntegrator->getLogginedUserId();
if (0 < $iUserId) {
$oAccount = $oApiIntegrator->getLogginedDefaultAccount();
$bError = isset($aPaths[1]) && 'error' === strtolower($aPaths[1]);
// TODO
@setcookie('skip_ios', '1', time() + 3600 * 3600, '/', null, null, true);
$sResult = strtr($sResult, array('{{IOS/HELLO}}' => \CApi::ClientI18N('IOS/HELLO', $oAccount), '{{IOS/DESC_P1}}' => \CApi::ClientI18N('IOS/DESC_P1', $oAccount), '{{IOS/DESC_P2}}' => \CApi::ClientI18N('IOS/DESC_P2', $oAccount), '{{IOS/DESC_P3}}' => \CApi::ClientI18N('IOS/DESC_P3', $oAccount), '{{IOS/DESC_P4}}' => \CApi::ClientI18N('IOS/DESC_P4', $oAccount), '{{IOS/DESC_P5}}' => \CApi::ClientI18N('IOS/DESC_P5', $oAccount), '{{IOS/DESC_P6}}' => \CApi::ClientI18N('IOS/DESC_P6', $oAccount), '{{IOS/DESC_P7}}' => \CApi::ClientI18N('IOS/DESC_P7', $oAccount), '{{IOS/DESC_BUTTON_YES}}' => \CApi::ClientI18N('IOS/DESC_BUTTON_YES', $oAccount), '{{IOS/DESC_BUTTON_SKIP}}' => \CApi::ClientI18N('IOS/DESC_BUTTON_SKIP', $oAccount), '{{IOS/DESC_BUTTON_OPEN}}' => \CApi::ClientI18N('IOS/DESC_BUTTON_OPEN', $oAccount), '{{AppVersion}}' => PSEVEN_APP_VERSION, '{{IntegratorLinks}}' => $oApiIntegrator->buildHeadersLink()));
} else {
\CApi::Location('./');
}
} else {
if ('raw' === $sFirstPart) {
$sAction = empty($aPaths[1]) ? '' : $aPaths[1];
try {
if (!empty($sAction)) {
$sMethodName = 'Raw' . $sAction;
if (method_exists($this->oActions, $sMethodName)) {
$this->oActions->SetActionParams(array('AccountID' => empty($aPaths[2]) || '0' === (string) $aPaths[2] ? '' : $aPaths[2], 'RawKey' => empty($aPaths[3]) ? '' : $aPaths[3], 'IsExt' => empty($aPaths[4]) ? '0' : ('1' === (string) $aPaths[4] ? '1' : 0), 'TenantHash' => empty($aPaths[5]) ? '' : $aPaths[5], 'AuthToken' => empty($aPaths[6]) ? '' : $aPaths[6]));
if (!call_user_func(array($this->oActions, $sMethodName))) {
\CApi::Log('False result.', \ELogLevel::Error);
}
} else {
\CApi::Log('Invalid action.', \ELogLevel::Error);
}
} else {
\CApi::Log('Empty action.', \ELogLevel::Error);
}
} catch (\Exception $oException) {
\CApi::LogException($oException, \ELogLevel::Error);
$this->oHttp->StatusHeader(404);
}
} else {
if ('post' === $sFirstPart) {
$sAction = $this->oHttp->GetPost('Action');
try {
if (!empty($sAction)) {
$sMethodName = 'Post' . $sAction;
if (method_exists($this->oActions, $sMethodName) && is_callable(array($this->oActions, $sMethodName))) {
$this->oActions->SetActionParams($this->oHttp->GetPostAsArray());
示例6: getTabList
/**
* @param CDomain $oDomain
*
* @return array
*/
public function getTabList($oDomain)
{
$aList = array();
if ($oDomain->AllowWebMail) {
$aList['mailbox'] = CApi::ClientI18N('TITLE/MAILBOX_TAB');
}
if ($oDomain->AllowContacts) {
$aList['contacts'] = CApi::ClientI18N('TITLE/CONTACTS');
}
if ($oDomain->AllowCalendar) {
$aList['calendar'] = CApi::ClientI18N('TITLE/CALENDAR');
}
if ($oDomain->AllowFiles) {
$aList['files'] = CApi::ClientI18N('TITLE/FILESTORAGE');
}
if ($oDomain->AllowHelpdesk) {
$aList['helpdesk'] = CApi::ClientI18N('TITLE/HELPDESK');
}
return $aList;
}
示例7: i18n
/**
* @param string $sKey
* @param CAccount $oAccount = null
* @param array $aParams = null
*
* @return string
*/
private function i18n($sKey, $oAccount = null, $aParams = null, $iMinutes = null)
{
return CApi::ClientI18N($sKey, $oAccount, $aParams, $iMinutes);
}
示例8: Handle
//.........这里部分代码省略.........
$sActionText = 'Declined';
break;
case 'TENTATIVE':
$sActionColor = '#A0A0A0';
$sActionText = 'Tentative';
break;
}
$sDateFormat = 'm/d/Y';
$sTimeFormat = 'h:i A';
switch ($oAccountOrganizer->User->DefaultDateFormat) {
case \EDateFormat::DDMMYYYY:
$sDateFormat = 'd/m/Y';
break;
case \EDateFormat::DD_MONTH_YYYY:
$sDateFormat = 'd/m/Y';
break;
default:
$sDateFormat = 'm/d/Y';
break;
}
switch ($oAccountOrganizer->User->DefaultTimeFormat) {
case \ETimeFormat::F24:
$sTimeFormat = 'H:i';
break;
case \EDateFormat::DD_MONTH_YYYY:
\ETimeFormat::F12;
$sTimeFormat = 'h:i A';
break;
default:
$sTimeFormat = 'h:i A';
break;
}
$sDateTime = $dt->format($sDateFormat . ' ' . $sTimeFormat);
$mResult = array('{{COLOR}}' => $oCalendar->Color, '{{EVENT_NAME}}' => $oEvent[0]['subject'], '{{EVENT_BEGIN}}' => ucfirst(\CApi::ClientI18N('REMINDERS/EVENT_BEGIN', $oAccountOrganizer)), '{{EVENT_DATE}}' => $sDateTime, '{{CALENDAR}}' => ucfirst(\CApi::ClientI18N('REMINDERS/CALENDAR', $oAccountOrganizer)), '{{CALENDAR_NAME}}' => $oCalendar->DisplayName, '{{EVENT_DESCRIPTION}}' => $oEvent[0]['description'], '{{EVENT_ACTION}}' => $sActionText, '{{ACTION_COLOR}}' => $sActionColor);
$sResult = strtr($sResult, $mResult);
} else {
\CApi::Log('Empty template.', \ELogLevel::Error);
}
} else {
\CApi::Log('Event not found.', \ELogLevel::Error);
}
} else {
\CApi::Log('Calendar not found.', \ELogLevel::Error);
}
$sAttendee = $aInviteValues['attendee'];
if (!empty($sAttendee)) {
$oApiCalendarManager->UpdateAppointment($oAccountOrganizer, $aInviteValues['calendarId'], $aInviteValues['eventId'], $sAttendee, $aInviteValues['action']);
}
}
}
} else {
if ($this->oHttp->HasQuery('calendar-pub') && 0 < strlen($this->oHttp->GetQuery('calendar-pub'))) {
$sResult = $this->indexHTML(false, '', $this->oHttp->GetQuery('calendar-pub'));
} else {
if ($this->oHttp->HasQuery('files-pub') && 0 < strlen($this->oHttp->GetQuery('files-pub'))) {
$sResult = $this->indexHTML(false, '', '', $this->oHttp->GetQuery('files-pub'));
} else {
if ('min' === $sFirstPart || 'window' === $sFirstPart) {
$sAction = empty($aPaths[1]) ? '' : $aPaths[1];
try {
if (!empty($sAction)) {
$sMethodName = $aPaths[0] . $sAction;
if (method_exists($this->oActions, $sMethodName)) {
if ('Min' === $aPaths[0]) {
$oMinManager = \CApi::Manager('min');
$mHashResult = $oMinManager->GetMinByHash(empty($aPaths[2]) ? '' : $aPaths[2]);