本文整理匯總了PHP中Operator::Load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Operator::Load方法的具體用法?PHP Operator::Load怎麽用?PHP Operator::Load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Operator
的用法示例。
在下文中一共展示了Operator::Load方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CreateOperator
function CreateOperator($_loginId, $_fullName, $_email, $_permissions, $_webspace, $_passwordMD5, $_administrator, $_groups, $_language)
{
$operator = new Operator(getId(USER_ID_LENGTH), $_loginId);
$operator->Load();
$operator->Fullname = $_fullName;
$operator->Email = $_email;
$operator->PermissionSet = $_permissions;
$operator->Webspace = $_webspace;
$operator->Password = $_passwordMD5;
$operator->Level = $_administrator ? 1 : 0;
$operator->Groups = $_groups;
$operator->Language = $_language;
$operator->Save(true);
return $operator;
}
示例2: processActions
function processActions()
{
global $BROWSER, $CONFIG;
$actionData = "";
$BROWSER->GetActions();
if ($BROWSER->Request != null && $BROWSER->Request->Status == REQUEST_STATUS_ACTIVE) {
$requestUser = new Operator($BROWSER->Request->SenderSessId, $BROWSER->Request->SenderUserId);
$requestUser->Load();
if ($requestUser->LastActive < time() - $CONFIG["timeout_clients"] || $requestUser->Status == USER_STATUS_OFFLINE) {
$BROWSER->Request->Destroy();
$actionData .= "lz_tracking_close_request();";
}
if (isset($_GET[GET_TRACK_REQUEST_DECLINED]) || isset($_GET[GET_TRACK_REQUEST_ACCEPTED])) {
if (isset($_GET[GET_TRACK_REQUEST_DECLINED])) {
$BROWSER->Request->Decline();
}
if (isset($_GET[GET_TRACK_REQUEST_ACCEPTED])) {
$BROWSER->Request->Accept();
}
$actionData .= "lz_tracking_close_request();";
}
} else {
if ($BROWSER->Request != null && $BROWSER->Request->Status != REQUEST_STATUS_ACTIVE) {
$actionData .= "lz_tracking_close_request();";
}
}
if ($BROWSER->Request != null && $BROWSER->Request->Status == REQUEST_STATUS_ACTIVE && !isset($_GET[GET_TRACK_REQUEST_ACTIVE])) {
$height = !@file_exists(FILE_INVITATIONLOGO) ? 220 : 302;
$actionData .= $BROWSER->Request->GetCommand(getInvitationTemplate($BROWSER->Request->Id, $BROWSER->Request->SenderUserId, $BROWSER->UserId, $BROWSER->Request->SenderFullname, $BROWSER->Request->SenderGroupId), htmlentities($BROWSER->Request->Text, ENT_QUOTES, "UTF-8"), 302, $height);
} else {
if ($BROWSER->Request != null && $BROWSER->Request->Status == REQUEST_STATUS_ACCEPTED) {
// hold
}
}
if ($BROWSER->Guide != null) {
$actionData .= $BROWSER->Guide->GetCommand();
$BROWSER->Guide->Destroy();
}
if ($BROWSER->Alerts != null) {
foreach ($BROWSER->Alerts as $alert) {
$actionData .= $alert->GetCommand();
$alert->Destroy();
}
$actionData = str_replace("<!--server-->", LIVEZILLA_URL, $actionData);
}
return $actionData;
}
示例3: LoadChat
function LoadChat($_config, $_internal)
{
$declined = true;
$this->Chat = null;
$this->ChatRequestReceiptants = array();
$chatfiles = getDirectory($this->Folder, false);
foreach ($chatfiles as $chatfile) {
if (strpos($chatfile, "." . EX_CHAT_OPEN) !== false) {
if (strpos($chatfile, "." . EX_CHAT_OPEN) !== false && ($_config["gl_alloc_mode"] == ALLOCATION_MODE_ALL || isnull($this->Chat))) {
$partnerid = str_replace("." . EX_CHAT_OPEN, "", $chatfile);
$chat = new Chat($this->Folder . $chatfile);
$activated = $chat->IsActivated($partnerid);
if (!$chat->Declined) {
$declined = false;
if (!$activated) {
$this->ChatRequestReceiptants[] = $partnerid;
}
}
if ($activated || isnull($this->Chat) || CALLER_TYPE != CALLER_TYPE_EXTERNAL && !isnull($this->Chat) && ($partnerid == $_internal->SystemId && !$chat->IsActivated(null))) {
if (CALLER_TYPE != CALLER_TYPE_EXTERNAL && $chat->Declined) {
continue;
}
$this->Chat = $chat;
if (isnull($_internal)) {
$_internal = new Operator($partnerid, null);
$_internal->Load();
$this->DesiredChatPartnerTyping = $_internal->Typing == $this->SystemId;
}
$dataSetTime = getDataSetTime($_internal->SessionFile);
if ($_internal->Status == CHAT_STATUS_ACTIVE || $dataSetTime < time() - $_config["timeout_clients"]) {
$this->Chat->Closed = true;
}
}
} else {
unlinkDataSet($this->Folder . $chatfile);
}
}
}
if (!isnull($this->Chat)) {
$this->Chat->Declined = $declined;
}
}