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


PHP CacheManager::GetObjectId方法代码示例

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


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

示例1: DownloadEmails

 static function DownloadEmails($cronJob = false, $exists = false, $reload = false)
 {
     if (is_array(Server::$Groups)) {
         foreach (Server::$Groups as $group) {
             $gmbout = Mailbox::GetById($group->TicketEmailOut);
             if (is_array($group->TicketEmailIn)) {
                 foreach ($group->TicketEmailIn as $mid) {
                     if (!empty(Server::$Configuration->Database["gl_email"][$mid]) && Server::$Configuration->Database["gl_email"][$mid]->LastConnect < time() - Server::$Configuration->Database["gl_email"][$mid]->ConnectFrequency * 60) {
                         CacheManager::FlushKey(DATA_CACHE_KEY_DBCONFIG);
                         Server::$Configuration->Database["gl_email"][$mid]->SetLastConnect(time());
                         $newmails = Server::$Configuration->Database["gl_email"][$mid]->Download($reload, Server::$Configuration->Database["gl_email"][$mid]->Delete);
                         if ($reload) {
                             Server::$Configuration->Database["gl_email"][$mid]->SetLastConnect(0);
                         }
                         if (!empty($newmails) && is_array($newmails)) {
                             foreach ($newmails as $temail) {
                                 if (TicketEmail::Exists($temail->Id)) {
                                     continue;
                                 }
                                 $Ticket = null;
                                 $temail->MailboxId = $mid;
                                 $temail->GroupId = $group->Id;
                                 if (preg_match_all("/\\[[a-zA-Z\\d]{12}\\]/", $temail->Subject . $temail->Body . $temail->BodyHTML, $matches)) {
                                     if (empty(Server::$Configuration->File["gl_avhe"])) {
                                         $temail->BodyHTML = "";
                                     }
                                     foreach ($matches[0] as $match) {
                                         $id = $groupid = $language = "";
                                         if ($exists = Ticket::Exists($match, $id, $groupid, $language)) {
                                             $Ticket = new Ticket($id, true);
                                             $Ticket->ChannelId = $mid;
                                             $Ticket->Group = $groupid;
                                             $Ticket->Language = strtoupper($language);
                                             $Ticket->Messages[0]->Type = $gmbout != null && $temail->Email == $gmbout->Email || $temail->Email == Server::$Configuration->Database["gl_email"][$mid]->Email ? 1 : 3;
                                             $Ticket->Messages[0]->Text = $temail->Body;
                                             $Ticket->Messages[0]->Email = !empty($temail->ReplyTo) ? $temail->ReplyTo : $temail->Email;
                                             $Ticket->Messages[0]->ChannelId = $temail->Id;
                                             $Ticket->Messages[0]->Fullname = $temail->Name;
                                             $Ticket->Messages[0]->Subject = $temail->Subject;
                                             $Ticket->Messages[0]->Hash = strtoupper(str_replace(array("[", "]"), "", $match));
                                             $Ticket->Messages[0]->Created = $temail->Created;
                                             $Ticket->Messages[0]->Save($id, false, null, $Ticket);
                                             $Ticket->Reactivate();
                                             $Ticket->SetLastUpdate(time());
                                             Logging::DebugLog("SAVE EMAIL REPLY: " . $Ticket->Messages[0]->Id . " - " . $temail->Id . " - " . $temail->Subject);
                                             break;
                                         }
                                     }
                                 }
                                 if (!$exists) {
                                     if ($group->TicketHandleUnknownEmails == 1) {
                                         $temail->Save();
                                     } else {
                                         if ($group->TicketHandleUnknownEmails == 0) {
                                             $temail->Save();
                                             $temail->Destroy();
                                             $Ticket = new Ticket(CacheManager::GetObjectId("ticket_id", DATABASE_TICKETS), true);
                                             $Ticket->ChannelId = $mid;
                                             $Ticket->Group = $group->Id;
                                             $Ticket->CreationType = 1;
                                             $Ticket->Language = strtoupper(Server::$Configuration->File["gl_default_language"]);
                                             $Ticket->Messages[0]->Id = $Ticket->Id;
                                             $Ticket->Messages[0]->Type = 3;
                                             $Ticket->Messages[0]->Text = $temail->Body;
                                             $Ticket->Messages[0]->Email = !empty($temail->ReplyTo) ? $temail->ReplyTo : $temail->Email;
                                             $Ticket->Messages[0]->ChannelId = $temail->Id;
                                             $Ticket->Messages[0]->Fullname = $temail->Name;
                                             $Ticket->Messages[0]->Created = $temail->Created;
                                             $Ticket->Messages[0]->Subject = $temail->Subject;
                                             $Ticket->Messages[0]->Attachments = $temail->Attachments;
                                             $Ticket->Messages[0]->SaveAttachments();
                                             $Ticket->Save();
                                             $Ticket->AutoAssignEditor();
                                             $Ticket->SetLastUpdate(time());
                                             LocalizationManager::AutoLoad(strtolower(Server::$Configuration->File["gl_default_language"]), true);
                                             $Ticket->SendAutoresponder(new Visitor(""), new VisitorBrowser("", false));
                                             LocalizationManager::AutoLoad("", true);
                                         }
                                     }
                                 }
                                 foreach ($temail->Attachments as $attid => $attdata) {
                                     file_put_contents(PATH_UPLOADS . $attdata[0], $attdata[2]);
                                     KnowledgeBase::Process("SYSTEM", $attid, $attdata[0], 3, $attdata[1], 0, 100, 1);
                                     if (!$exists && $group->TicketHandleUnknownEmails == 1) {
                                         $temail->SaveAttachment($attid);
                                     }
                                     if (!empty($Ticket)) {
                                         $Ticket->Messages[0]->ApplyAttachment($attid);
                                     }
                                 }
                             }
                         }
                         if (!$cronJob) {
                             return;
                         }
                     }
                 }
             }
         }
     }
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:101,代码来源:objects.global.inc.php

示例2: TicketCreate

 function TicketCreate()
 {
     $ticket = new Ticket();
     $params = ApiV2::GetObjectFields("Ticket");
     if ($ticket = $this->CreateFromJSON($params, json_decode($_POST["p_data"]), $ticket, "Ticket")) {
         $ticket->Id = CacheManager::GetObjectId("ticket_id", DATABASE_TICKETS);
         $ticket->Language = strtoupper($ticket->Language);
         $ticket->Save();
         $this->JSONOutput = APIV2::Encode(array("Ticket" => ApiV2::ClearObject($params, $ticket)), $this->JSONParams);
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:11,代码来源:objects.apiv2.inc.php

示例3: processTicketActions


//.........这里部分代码省略.........
                                if ($type == "LinkTicket") {
                                    $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                                    $TicketSub = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], "");
                                    $counts[$Ticket->Id] = Ticket::GetMessageCount($Ticket->Id);
                                    $counts[$TicketSub->Id] = Ticket::GetMessageCount($TicketSub->Id);
                                    if ($counts[$Ticket->Id] > $counts[$TicketSub->Id]) {
                                        $Ticket->LinkTicket($TicketSub->Id, getId(32));
                                    } else {
                                        $TicketSub->LinkTicket($Ticket->Id, getId(32));
                                    }
                                    $Ticket->SetLastUpdate(time());
                                    $updateRequiredTickets = true;
                                } else {
                                    if ($type == "EditMessage") {
                                        $ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], "");
                                        $ticket->LoadStatus();
                                        $message = new TicketMessage($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                                        $message->Load();
                                        $message->ChangeValue($ticket, 10, CALLER_SYSTEM_ID, $message->Fullname, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
                                        $message->ChangeValue($ticket, 11, CALLER_SYSTEM_ID, $message->Email, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]);
                                        $message->ChangeValue($ticket, 12, CALLER_SYSTEM_ID, $message->Company, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]);
                                        $message->ChangeValue($ticket, 13, CALLER_SYSTEM_ID, $message->Phone, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_5"]);
                                        $message->ChangeValue($ticket, 14, CALLER_SYSTEM_ID, $message->Subject, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_6"]);
                                        $message->ChangeValue($ticket, 15, CALLER_SYSTEM_ID, $message->Text, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_7"]);
                                        $message->ApplyCustomFromPost($count, true, $ticket, CALLER_SYSTEM_ID);
                                        $message->Save($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], true);
                                        $ticket->SetLastUpdate(time(), false);
                                        $updateRequiredTickets = true;
                                        if ($ticket->Editor != null) {
                                            $ticket->Editor->Save();
                                        }
                                    } else {
                                        if ($type == "CreateTicket") {
                                            $Ticket = new Ticket(CacheManager::GetObjectId("ticket_id", DATABASE_TICKETS), "");
                                            $temporaryIds[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_11"]] = $Ticket->Id;
                                            $Ticket->Messages[0]->Id = $Ticket->Id;
                                            $Ticket->Messages[0]->ChannelId = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"];
                                            $Ticket->CreationType = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"];
                                            $Ticket->Group = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_6"];
                                            $Ticket->Language = strtoupper(trim($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_10"]));
                                            $Ticket->Messages[0]->Fullname = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"];
                                            $Ticket->Messages[0]->Email = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"];
                                            $Ticket->Messages[0]->Text = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"];
                                            $Ticket->Messages[0]->Company = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_7"];
                                            $Ticket->Messages[0]->Phone = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_8"];
                                            $Ticket->Messages[0]->Type = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_9"];
                                            $Ticket->Messages[0]->Subject = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_15"];
                                            $Ticket->Messages[0]->ApplyCustomFromPost($count);
                                            $cid = 0;
                                            while (isset($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $cid])) {
                                                $value = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $cid++];
                                                if (strpos($value, "[att]") === 0) {
                                                    $Ticket->Messages[0]->ApplyAttachment(base64_decode(str_replace("[att]", "", $value)));
                                                } else {
                                                    if (strpos($value, "[com]") === 0) {
                                                        $Ticket->Messages[0]->AddComment(CALLER_SYSTEM_ID, $Ticket->Id, base64_decode(str_replace("[com]", "", $value)));
                                                    }
                                                }
                                            }
                                            $Ticket->Messages[0]->LoadAttachments();
                                            if (!empty($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"])) {
                                                $email = new TicketEmail($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"], false, "");
                                                $email->Load();
                                                $email->LoadAttachments();
                                                foreach ($email->Attachments as $rid => $res) {
                                                    if (empty($Ticket->Messages[0]->Attachments[$rid])) {
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:67,代码来源:functions.internal.process.inc.php

示例4: SaveTicket

 function SaveTicket($_group, $_country, $_cmb = false, $_custom = true, $_url = "", $changed = false)
 {
     $isSpam = !empty(Server::$Configuration->File["gl_sft"]) && Visitor::CreateSPAMFilter($this->UserId);
     $ticket = new Ticket(CacheManager::GetObjectId("ticket_id", DATABASE_TICKETS), strtoupper(!empty($this->Language) ? $this->Language : Server::$Configuration->File["gl_default_language"]));
     $ticket->Messages[0]->Id = $ticket->Id;
     $ticket->Messages[0]->IP = Communication::GetIP();
     $group = Server::$Groups[$_group];
     if (!isTicketFlood() && !$isSpam) {
         Server::InitDataBlock(array("INPUTS"));
         $ticket->SenderUserId = $ticket->Messages[0]->SenderUserId = $this->UserId;
         $ticket->Group = $_group;
         $ticket->Messages[0]->Fullname = $this->Browsers[0]->Fullname = $group->GetServerInput(Server::$Inputs[111], false, "", $changed);
         $ticket->Messages[0]->Email = $this->Browsers[0]->Email = $group->GetServerInput(Server::$Inputs[112], false, "", $changed);
         $ticket->Messages[0]->Company = $this->Browsers[0]->Company = $group->GetServerInput(Server::$Inputs[113], false, "", $changed);
         $ticket->Messages[0]->Phone = $this->Browsers[0]->Phone = $group->GetServerInput(Server::$Inputs[116], false, "", $changed);
         $ticket->Messages[0]->Text = $group->GetServerInput(Server::$Inputs[114], false, "", $changed);
         $ticket->Messages[0]->CallMeBack = $_cmb;
         $ticket->Messages[0]->Country = $_country;
         $ticket->Messages[0]->EmailId = getId(32);
         $ticket->Messages[0]->ChannelId = getId(32);
         $ticket->Messages[0]->Edited = $ticket->Messages[0]->Created = time();
         if (empty($_url)) {
             $_url = Visitor::GetLastURLFromVisitor($this->UserId);
         }
         $ticket->Messages[0]->Subject = $_url;
         $this->Browsers[0]->DesiredChatGroup = $ticket->Group;
         $this->Browsers[0]->SetCookieGroup();
         if ($_custom) {
             foreach (Server::$Inputs as $index => $input) {
                 if ($input->Active && $input->Custom) {
                     $value = $group->GetServerInput($input, false, "", $changed);
                     if ($input->Type != "File" && !empty($value) && !in_array($index, $group->TicketInputsHidden)) {
                         $ticket->Messages[0]->Customs[$index] = $this->Browsers[0]->Customs[$index] = $value;
                     } else {
                         if ($input->Type == "File" && isset($_FILES["p_cf" . $index]) && !in_array($index, $group->TicketInputsHidden)) {
                             $ticket->Messages[0]->Customs[$index] = $this->Browsers[0]->Customs[$index] = $ticket->Messages[0]->AppendPostFile("p_cf" . $index, $this->UserId);
                         }
                     }
                 }
                 $ud = new UserData($ticket->Messages[0]->Fullname, $ticket->Messages[0]->Email, $ticket->Messages[0]->Company, $ticket->Messages[0]->Phone, $ticket->Messages[0]->Customs);
                 $ud->Save();
                 $ud->SaveToCookie();
             }
         }
         if (Server::$Configuration->File["gl_adct"] == 1 || !(!empty(Server::$Configuration->File["gl_rm_om"]) && Server::$Configuration->File["gl_rm_om_time"] == 0)) {
             $ticket->Save();
             $ticket->AutoAssignEditor();
             $ticket->SetLastUpdate(time());
         }
         $this->AddFunctionCall("lz_chat_mail_callback(true);", false);
         if (!empty($_POST[POST_EXTERN_REQUESTED_INTERNID]) && !empty(Server::$Operators[Operator::GetSystemId(Encoding::Base64UrlDecode($_POST[POST_EXTERN_REQUESTED_INTERNID]))])) {
             $TicketEditor = new TicketEditor($ticket->Id);
             $TicketEditor->Editor = Operator::GetSystemId(Encoding::Base64UrlDecode($_POST[POST_EXTERN_REQUESTED_INTERNID]));
             $TicketEditor->Status = 0;
             $TicketEditor->GroupId = $ticket->Group;
             $TicketEditor->Save();
         }
         if (!empty(Server::$Configuration->File["gl_mpm"])) {
             foreach (Server::$Operators as $operator) {
                 if ($operator->IsInPushMessageState()) {
                     if ($operator->HasAccessToTicket($ticket)) {
                         $operator->AddPushMessage($ticket->Id, $this->SystemId, $ticket->Messages[0]->Fullname, 2, $ticket->Messages[0]->Text);
                     }
                 }
             }
         }
         return $ticket;
     } else {
         $this->AddFunctionCall("lz_chat_mail_callback(false);", false);
     }
     return false;
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:72,代码来源:objects.global.users.inc.php


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