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


PHP CIntranetUtils::IsExternalMailAvailable方法代码示例

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


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

示例1: execute

 public static function execute()
 {
     global $USER;
     $result = array();
     $error = false;
     if (!CModule::IncludeModule('mail')) {
         $error = GetMessage('MAIL_MODULE_NOT_INSTALLED');
     }
     if ($error === false) {
         if (!is_object($USER) || !$USER->IsAuthorized()) {
             $error = GetMessage('INTR_MAIL_AUTH');
         }
     }
     if ($error === false) {
         if (!CIntranetUtils::IsExternalMailAvailable()) {
             $error = GetMessage('INTR_MAIL_UNAVAILABLE');
         }
     }
     if ($error === false) {
         $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null;
         $act = isset($_REQUEST['act']) ? $_REQUEST['act'] : null;
         switch ($page) {
             case 'domain':
                 $result = (array) self::handleDomainAction($act, $error);
                 break;
             case 'manage':
                 $result = (array) self::handleManageAction($act, $error);
                 break;
             default:
                 $result = (array) self::handleDefaultAction($act, $error);
         }
     }
     self::returnJson(array_merge(array('result' => $error === false ? 'ok' : 'error', 'error' => CharsetConverter::ConvertCharset($error, SITE_CHARSET, 'UTF-8')), $result));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:34,代码来源:ajax.php

示例2: executeComponent

 public function executeComponent()
 {
     global $USER, $APPLICATION;
     if (!CModule::IncludeModule('mail')) {
         ShowError(GetMessage('MAIL_MODULE_NOT_INSTALLED'));
         return;
     }
     if (!is_object($USER) || !$USER->IsAuthorized()) {
         $APPLICATION->AuthForm('');
         return;
     }
     if (!CIntranetUtils::IsExternalMailAvailable()) {
         ShowError(GetMessage('INTR_MAIL_UNAVAILABLE'));
         return;
     }
     $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null;
     switch ($page) {
         case 'domain':
             return $this->executeDomainPage();
             break;
         case 'manage':
             return $this->executeManagePage();
             break;
         case 'success':
             return $this->executeSuccessPage();
             break;
         default:
             return $this->executeHomePage($page);
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:30,代码来源:class.php

示例3: executeComponent

 public function executeComponent()
 {
     global $APPLICATION;
     $this->arParams['LAST_MAIL_CHECK'] = null;
     $this->arParams['IS_TIME_TO_MAIL_CHECK'] = null;
     $settedUp = null;
     if (defined('SKIP_MAIL_CHECK') && SKIP_MAIL_CHECK == true) {
         $settedUp = false;
     }
     if (defined('ADMIN_SECTION') && ADMIN_SECTION == true) {
         $settedUp = false;
     }
     if ($settedUp !== false) {
         $isMobileInstalled = COption::GetOptionString('main', 'wizard_mobile_installed', 'N', SITE_ID) == 'Y';
         $isMobileVersion = strpos($APPLICATION->GetCurPage(), SITE_DIR . 'm/') === 0;
         if ($isMobileInstalled && $isMobileVersion) {
             $settedUp = false;
         }
     }
     if ($settedUp !== false) {
         if (!is_callable(array('CIntranetUtils', 'IsExternalMailAvailable')) || !CIntranetUtils::IsExternalMailAvailable()) {
             $settedUp = false;
         }
     }
     if ($settedUp !== false) {
         $lastMailCheck = CUserOptions::GetOption('global', 'last_mail_check_' . SITE_ID, null);
         if (isset($lastMailCheck) && intval($lastMailCheck) < 0) {
             $settedUp = false;
         }
     }
     if ($settedUp !== false) {
         $isTimeToMailCheck = true;
         if (isset($lastMailCheck)) {
             $settedUp = true;
             $isTimeToMailCheck = false;
             if (intval($lastMailCheck) >= 0) {
                 $checkInterval = COption::GetOptionString('intranet', 'mail_check_period', 10) * 60;
                 $isTimeToMailCheck = time() - intval($lastMailCheck) >= $checkInterval;
             }
         }
     }
     if ($settedUp !== false) {
         $this->arParams['LAST_MAIL_CHECK'] = $lastMailCheck;
         $this->arParams['IS_TIME_TO_MAIL_CHECK'] = $isTimeToMailCheck;
     }
     $this->arParams['SETTED_UP'] = $settedUp;
     $this->includeComponentTemplate();
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:48,代码来源:class.php

示例4: array

if ($GLOBALS["USER"]->IsAuthorized()) {
    $arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
    if (array_key_exists("tasks", $arSocNetFeaturesSettings) && array_key_exists("allowed", $arSocNetFeaturesSettings["tasks"]) && in_array(SONET_ENTITY_USER, $arSocNetFeaturesSettings["tasks"]["allowed"]) && in_array("tasks", $arUserActiveFeatures)) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_TASKS"), "/company/personal/user/" . $USER_ID . "/tasks/?F_CANCEL=Y&F_STATE=sR400", array(), array("name" => "tasks", "counter_id" => "tasks_total"), "CBXFeatures::IsFeatureEnabled('Tasks')");
    }
    if (array_key_exists("calendar", $arSocNetFeaturesSettings) && array_key_exists("allowed", $arSocNetFeaturesSettings["calendar"]) && in_array(SONET_ENTITY_USER, $arSocNetFeaturesSettings["calendar"]["allowed"]) && in_array("calendar", $arUserActiveFeatures)) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_CALENDAR"), "/company/personal/user/" . $USER_ID . "/calendar/", array(), array(), "CBXFeatures::IsFeatureEnabled('Calendar')");
    }
    if (CModule::IncludeModule("disk") && $GLOBALS["USER"]->IsAuthorized() && array_key_exists("files", $arSocNetFeaturesSettings) && array_key_exists("allowed", $arSocNetFeaturesSettings["files"]) && in_array(SONET_ENTITY_USER, $arSocNetFeaturesSettings["files"]["allowed"]) && in_array("files", $arUserActiveFeatures)) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_DISC"), "/company/personal/user/" . $USER_ID . "/disk/path/", array(), array(), "CBXFeatures::IsFeatureEnabled('PersonalFiles')");
    }
    if (CModule::IncludeModule("photogallery") && array_key_exists("photo", $arSocNetFeaturesSettings) && array_key_exists("allowed", $arSocNetFeaturesSettings["photo"]) && in_array(SONET_ENTITY_USER, $arSocNetFeaturesSettings["photo"]["allowed"]) && in_array("photo", $arUserActiveFeatures)) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_PHOTO"), "/company/personal/user/" . $USER_ID . "/photo/", array(), array(), "CBXFeatures::IsFeatureEnabled('PersonalPhoto')");
    }
    if (CModule::IncludeModule("blog") && array_key_exists("blog", $arSocNetFeaturesSettings) && array_key_exists("allowed", $arSocNetFeaturesSettings["blog"]) && in_array(SONET_ENTITY_USER, $arSocNetFeaturesSettings["blog"]["allowed"]) && in_array("blog", $arUserActiveFeatures)) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_BLOG"), "/company/personal/user/" . $USER_ID . "/blog/", array(), array("counter_id" => "blog_post"), "");
    }
    if (CModule::IncludeModule("intranet") && CIntranetUtils::IsExternalMailAvailable()) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_MAIL"), "/company/personal/mail/", array(), array("counter_id" => "mail_unseen", "warning_link" => SITE_DIR . 'company/personal/mail/?page=home', "warning_title" => GetMessage("LEFT_MENU_MAIL_SETTING"), "menu_item_id" => "menu_external_mail"), "");
    }
    if (CModule::IncludeModule("bizproc")) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_BP"), "/company/personal/bizproc/", array(), array("counter_id" => "bp_tasks"), "CBXFeatures::IsFeatureEnabled('BizProc')");
    }
    if (IsModuleInstalled("lists") && COption::GetOptionString("lists", "turnProcessesOn") == "Y") {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_MY_PROCESS"), "/company/personal/processes/", array(), array("menu_item_id" => "menu_my_processes"), "");
    }
    if (CModule::IncludeModule("crm") && CCrmPerms::IsAccessEnabled()) {
        $aMenuB24[] = array(GetMessage("LEFT_MENU_CRM"), "/crm/stream/", array(), array("counter_id" => "crm_cur_act", "menu_item_id" => "menu_crm_favorite"), "");
    }
}
$aMenuLinks = array_merge($aMenuLinks, $aMenuB24);
开发者ID:Levan1209,项目名称:coursework,代码行数:31,代码来源:.left.menu_ext.php

示例5: array

    die;
}
$arFields = array('PERSONAL' => array('NAME', 'LAST_NAME', 'SECOND_NAME', 'PERSONAL_PHOTO', 'PERSONAL_GENDER', 'PERSONAL_BIRTHDAY', 'PERSONAL_BIRTHDATE', 'PERSONAL_PROFESSION', 'PERSONAL_NOTES', 'AUTO_TIME_ZONE', 'TIME_ZONE'));
if (!empty($arResult["arSocServ"])) {
    $arFields['SOCSERV'] = array('SOCSERVICES');
}
$arFields['CONTACT'] = array('EMAIL', 'EXTMAIL', 'PERSONAL_PHONE', 'PERSONAL_MOBILE', 'PERSONAL_WWW', 'PERSONAL_ICQ', 'PERSONAL_FAX', 'PERSONAL_PAGER', 'PERSONAL_COUNTRY', 'PERSONAL_STREET', 'PERSONAL_MAILBOX', 'PERSONAL_CITY', 'PERSONAL_STATE', 'PERSONAL_ZIP');
$arFields['WORK'] = array('WORK_COUNTRY', 'WORK_CITY', 'WORK_COMPANY', 'WORK_DEPARTMENT', 'WORK_PROFILE', 'WORK_WWW', 'WORK_PHONE', 'WORK_FAX', 'WORK_PAGER', 'WORK_LOGO', 'WORK_POSITION', 'WORK_STATE');
$arFields['AUTH'] = array('LOGIN', 'PASSWORD', 'CONFIRM_PASSWORD');
if ($arParams['IS_FORUM'] == 'Y') {
    $arFields['FORUM'] = array('FORUM_SHOW_NAME', 'FORUM_HIDE_FROM_ONLINE', 'FORUM_SUBSC_GET_MY_MESSAGE', 'FORUM_DESCRIPTION', 'FORUM_INTERESTS', 'FORUM_SIGNATURE', 'FORUM_AVATAR');
}
if ($arParams['IS_BLOG'] == 'Y') {
    $arFields['BLOG'] = array('BLOG_ALIAS', 'BLOG_DESCRIPTION', 'BLOG_INTERESTS', 'BLOG_AVATAR');
}
$extmailAvailable = CModule::IncludeModule('intranet') && CIntranetUtils::IsExternalMailAvailable();
if (!empty($arResult['User']['MAILBOX']) || $extmailAvailable && ($arParams['ID'] == $USER->getID() || $USER->isAdmin())) {
    $arParams['EDITABLE_FIELDS'][] = 'EXTMAIL';
}
foreach ($arParams['EDITABLE_FIELDS'] as $FIELD) {
    $bFound = false;
    if ($arResult['USER_PROP'][$FIELD]) {
        foreach ($arFields as $FIELD_TYPE => $arTypeFields) {
            if (is_array($arParams['USER_PROPERTY_' . $FIELD_TYPE]) && in_array($FIELD, $arParams['USER_PROPERTY_' . $FIELD_TYPE])) {
                $arFields[$FIELD_TYPE][] = $FIELD;
                $bFound = true;
                break;
            }
        }
        if (!$bFound) {
            $arFields['PERSONAL'][] = $FIELD;
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


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