本文整理匯總了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);
}