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


PHP UserData::FromSystemId方法代码示例

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


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

示例1: updateMembers

function updateMembers($_dgroup = "")
{
    global $USER;
    Server::InitDataBlock(array("DBCONFIG"));
    $groupname = addslashes(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->GetDescription($USER->Language));
    foreach (Server::$Groups as $group) {
        if ($group->IsDynamic && isset($group->Members[$USER->Browsers[0]->SystemId])) {
            $_dgroup = $group->Descriptions["EN"];
            foreach ($group->Members as $member => $persistent) {
                if (true || $member != $USER->Browsers[0]->SystemId) {
                    $isOperator = false;
                    $isBusyAway = false;
                    if (!empty(Server::$Operators[$member])) {
                        $isOperator = true;
                        if (Server::$Operators[$member]->Status == USER_STATUS_OFFLINE) {
                            continue;
                        }
                        if (Server::$Operators[$member]->Status != USER_STATUS_ONLINE || Server::$Operators[$member]->IsBot) {
                            $isBusyAway = true;
                        }
                        $name = Server::$Operators[$member]->Fullname;
                    } else {
                        $data = UserData::FromSystemId($member);
                        $name = $data->Fullname;
                        if (empty($name)) {
                            $name = LocalizationManager::$TranslationStrings["client_guest"];
                        }
                        if ($member != $USER->Browsers[0]->SystemId) {
                            $chatobj = VisitorChat::GetBySystemId($member);
                            if (!($chatobj != null && !$chatobj->ExternalClosed && !$chatobj->InternalClosed)) {
                                continue;
                            }
                        }
                    }
                    $USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($member) . "','" . base64_encode($name) . "'," . To::BoolString($isOperator) . "," . To::BoolString($isBusyAway) . ",true);", false);
                }
            }
        }
    }
    foreach ($USER->Browsers[0]->Members as $sysid => $chatm) {
        if ($chatm->Status < 2 && empty($chatm->Declined) && Server::$Operators[$sysid]->Status != USER_STATUS_OFFLINE) {
            $USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($sysid) . "','" . base64_encode(Server::$Operators[$sysid]->Fullname) . "',true," . To::BoolString(Server::$Operators[$sysid]->Status != USER_STATUS_ONLINE) . ",false);", false);
        }
    }
    $fb = !empty(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->ChatFunctions[3]) && !empty(Server::$Configuration->Database["gl_fb"]);
    $USER->AddFunctionCall("lz_chat_set_host(\"" . base64_encode(Server::$Operators[$USER->Browsers[0]->OperatorId]->UserId) . "\",\"" . base64_encode(addslashes(Server::$Operators[$USER->Browsers[0]->OperatorId]->Fullname)) . "\",\"" . base64_encode($groupname) . "\",\"" . strtolower(Server::$Operators[$USER->Browsers[0]->OperatorId]->Language) . "\"," . To::BoolString(Server::$Operators[$USER->Browsers[0]->OperatorId]->Typing == $USER->Browsers[0]->SystemId) . "," . To::BoolString(!empty(Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile) && Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile->Public) . ",\"" . base64_encode($_dgroup) . "\"," . To::BoolString($fb) . ");", false);
}
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:47,代码来源:functions.external.inc.php


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