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


PHP Ticket::Load方法代码示例

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


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

示例1: processTicketActions

function processTicketActions($count = 0)
{
    global $GROUPS, $CONFIG;
    $temporaryIds = array();
    while (isset($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vc"])) {
        $type = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vc"];
        if ($type == "SetTicketStatus") {
            $Ticket = new Ticket();
            $Ticket->Id = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"];
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]) {
                $Ticket->Log(0, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
            }
            if (!empty($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"]) && $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]) {
                $Ticket->Log(2, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]);
            }
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]) {
                $Ticket->Log(3, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]);
            }
            $TicketEditor = new TicketEditor($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"]);
            if (!empty($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"])) {
                $TicketEditor->Editor = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"];
            }
            $TicketEditor->Status = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"];
            $TicketEditor->GroupId = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"];
            $TicketEditor->Save();
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]) {
                $Ticket->SetGroup($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
            }
            $Ticket->Editor = $TicketEditor;
            $Ticket->LoadMessages();
            $Ticket->SetLastUpdate(time());
        } else {
            if ($type == "AddTicketEditorReply") {
                $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]);
                $Ticket->Group = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"];
                $Ticket->Messages[0]->Id = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_6"];
                $Ticket->Messages[0]->ChannelId = getId(32);
                $Ticket->Messages[0]->Hash = $Ticket->GetHash(false);
                $Ticket->Messages[0]->SenderUserId = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"];
                $Ticket->Messages[0]->Type = 1;
                $Ticket->Messages[0]->Email = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"];
                $Ticket->Messages[0]->Text = Mailbox::FinalizeEmail($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"]);
                $Ticket->Messages[0]->Subject = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_5"];
                $Ticket->Messages[0]->Save($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"], time());
                $acount = 7;
                $att = array();
                while (isset($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount])) {
                    $att[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount]] = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount];
                    $Ticket->Messages[0]->ApplyAttachment($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount++]);
                }
                $mailbox = Mailbox::GetById($GROUPS[$Ticket->Group]->TicketEmailOut, true);
                $Ticket->SendEditorReply($mailbox, $Ticket->Messages[0]->Text, getPredefinedMessage($GROUPS[$Ticket->Group]->PredefinedMessages, $Ticket->Language), $att, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_5"]);
                if (!empty($CONFIG["gl_ctor"])) {
                    $Ticket->LoadStatus();
                    $Ticket->Editor->Status = TICKET_STATUS_CLOSED;
                    $Ticket->Editor->Save();
                }
                $Ticket->SetLastUpdate(time());
            } else {
                if ($type == "SetTicketLanguage") {
                    $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                    $Ticket->SetLanguage($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                    $Ticket->Log(1, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
                    $Ticket->SetLastUpdate(time());
                } else {
                    if ($type == "DeleteTicketFromServer") {
                        $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                        $Ticket->Destroy();
                        $Ticket->Log(7, CALLER_SYSTEM_ID, 0, 1);
                        $Ticket->SetLastUpdate(time());
                    } else {
                        if ($type == "AddComment") {
                            $Ticket = new TicketMessage($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], "");
                            $Ticket->AddComment(CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
                            $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"], "");
                            $Ticket->SetLastUpdate(time());
                        } else {
                            if ($type == "LinkChat") {
                                if (!empty($temporaryIds[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"]])) {
                                    $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"] = $temporaryIds[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"]];
                                }
                                $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                                $Ticket->LinkChat($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], getId(32));
                                $Ticket->Log(5, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                                $Ticket->SetLastUpdate(time());
                            } else {
                                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());
                                } else {
                                    if ($type == "EditMessage") {
                                        $ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], "");
//.........这里部分代码省略.........
开发者ID:bgabor,项目名称:RenaniaOpencart,代码行数:101,代码来源:functions.internal.process.inc.php

示例2: AggregateTickets

 function AggregateTickets()
 {
     $values = array();
     $result = DBManager::Execute(true, "SELECT `ti`.`target_group_id`,`tme`.`ticket_id`,`ted`.`editor_id`,`tme`.`created`,`ted`.`status` FROM `" . DB_PREFIX . DATABASE_TICKETS . "` AS `ti` LEFT JOIN `" . DB_PREFIX . DATABASE_TICKET_EDITORS . "` AS `ted` ON `ti`.`id`=`ted`.`ticket_id` INNER JOIN `" . DB_PREFIX . DATABASE_TICKET_MESSAGES . "` AS `tme` ON `ti`.`id`=`tme`.`ticket_id` WHERE `tme`.`id`=`tme`.`ticket_id` AND `tme`.`created`>=" . DBManager::RealEscape($this->Delimiters[0]) . "  AND `tme`.`created`<=" . DBManager::RealEscape($this->Delimiters[1]) . ";");
     while ($row = DBManager::FetchArray($result)) {
         $operators = array();
         if (!empty($row["editor_id"])) {
             $operators[$row["editor_id"]] = $row["editor_id"];
         }
         $operators[$row["target_group_id"]] = $row["target_group_id"];
         foreach ($operators as $request_operator) {
             $this->PrepareTicketHourArray($values, $request_operator, date("G", $row["created"]));
             $values[$request_operator][date("G", $row["created"])]["amount"] += 1;
             $values[$request_operator][date("G", $row["created"])]["open"] += !empty($row["editor_id"]) && $row["status"] == 0 ? 1 : 0;
             $values[$request_operator][date("G", $row["created"])]["in_progress"] += !empty($row["editor_id"]) && $row["status"] == 1 ? 1 : 0;
             $values[$request_operator][date("G", $row["created"])]["closed"] += !empty($row["editor_id"]) && $row["status"] == 2 ? 1 : 0;
             $values[$request_operator][date("G", $row["created"])]["deleted"] += !empty($row["editor_id"]) && $row["status"] == 3 ? 1 : 0;
         }
     }
     $lastTicket = "";
     $results = DBManager::Execute(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_TICKET_MESSAGES . "` WHERE `created`>=" . DBManager::RealEscape($this->Delimiters[0]) . "  AND `created`<=" . DBManager::RealEscape($this->Delimiters[1]) . " ORDER BY `ticket_id` ASC, `created` ASC;");
     while ($rows = DBManager::FetchArray($results)) {
         if ($lastTicket != $rows["ticket_id"]) {
             $Ticket = new Ticket();
             $Ticket->Id = $rows["ticket_id"];
             $Ticket->Load();
             $lastTicket = $Ticket->Id;
             $Ticket->Created = $Ticket->Messages[0]->Created;
             $openSpan = false;
         }
         foreach ($Ticket->Messages as $message) {
             if ($message->Type == 0 || $message->Type == 3) {
                 $openSpan = $message->Created;
                 if (!empty($Ticket->Editor->Editor) && $rows["id"] == $message->Id) {
                     $this->PrepareTicketHourArray($values, $Ticket->Editor->Editor, date("G", $rows["created"]));
                     $values[$Ticket->Editor->Editor][date("G", $rows["created"])]["messages"] += 1;
                 }
                 if (!empty($Ticket->Editor->GroupId) && $rows["id"] == $message->Id) {
                     $this->PrepareTicketHourArray($values, $Ticket->Editor->GroupId, date("G", $rows["created"]));
                     $values[$Ticket->Editor->GroupId][date("G", $rows["created"])]["messages"] += 1;
                 } else {
                     if (!empty($Ticket->Group) && $rows["id"] == $message->Id) {
                         $this->PrepareTicketHourArray($values, $Ticket->Group, date("G", $rows["created"]));
                         $values[$Ticket->Group][date("G", $rows["created"])]["messages"] += 1;
                     }
                 }
             } else {
                 if (!empty($openSpan) && $message->Type == 1 && $rows["id"] == $message->Id) {
                     if (!empty($Ticket->Editor)) {
                         $this->PrepareTicketHourArray($values, $Ticket->Editor->Editor, date("G", $rows["created"]));
                         $this->PrepareTicketHourArray($values, $Ticket->Editor->GroupId, date("G", $rows["created"]));
                         $values[$Ticket->Editor->Editor][date("G", $rows["created"])]["responses"] += 1;
                         $values[$Ticket->Editor->Editor][date("G", $rows["created"])]["response_time"] += $rows["created"] - $openSpan;
                         $values[$Ticket->Editor->GroupId][date("G", $rows["created"])]["responses"] += 1;
                         $values[$Ticket->Editor->GroupId][date("G", $rows["created"])]["response_time"] += $rows["created"] - $openSpan;
                         if ($Ticket->Editor->Status == 2 && $Ticket->GetLastOutgoingMessageId() == $message->Id) {
                             $values[$Ticket->Editor->Editor][date("G", $rows["created"])]["resolves"] += 1;
                             $values[$Ticket->Editor->Editor][date("G", $rows["created"])]["resolve_time"] += $message->Created - $Ticket->Created;
                             $values[$Ticket->Editor->GroupId][date("G", $rows["created"])]["resolves"] += 1;
                             $values[$Ticket->Editor->GroupId][date("G", $rows["created"])]["resolve_time"] += $message->Created - $Ticket->Created;
                         }
                     }
                 }
             }
         }
     }
     DBManager::Execute(true, "DELETE FROM `" . DB_PREFIX . DATABASE_STATS_AGGS_TICKETS . "` WHERE" . $this->GetDateMatch() . ";");
     foreach ($values as $userid => $hours) {
         foreach ($hours as $hour => $amount) {
             DBManager::Execute(true, "INSERT IGNORE INTO `" . DB_PREFIX . DATABASE_STATS_AGGS_TICKETS . "` (`year`,`month`,`day`,`hour`,`user_id`,`amount`,`open`,`in_progress`,`closed`,`deleted`,`messages`,`responses`,`avg_response_time`,`resolves`,`avg_resolve_time`) VALUES (" . $this->GetSQLDateValues() . ",'" . DBManager::RealEscape($hour) . "','" . DBManager::RealEscape($userid) . "','" . DBManager::RealEscape($amount["amount"]) . "','" . DBManager::RealEscape($amount["open"]) . "','" . DBManager::RealEscape($amount["in_progress"]) . "','" . DBManager::RealEscape($amount["closed"]) . "','" . DBManager::RealEscape($amount["deleted"]) . "','" . DBManager::RealEscape($amount["messages"]) . "','" . DBManager::RealEscape($amount["responses"]) . "','" . DBManager::RealEscape($amount["responses"] > 0 ? round($amount["response_time"] / $amount["responses"], 4) : 0) . "','" . DBManager::RealEscape($amount["resolves"]) . "','" . DBManager::RealEscape($amount["resolves"] > 0 ? round($amount["resolve_time"] / $amount["resolves"], 4) : 0) . "');");
         }
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:73,代码来源:objects.stats.inc.php

示例3: TicketEditorAssign

 function TicketEditorAssign()
 {
     $editor = new TicketEditor();
     $params = ApiV2::GetObjectFields("TicketEditor");
     if ($editor = $this->CreateFromJSON($params, json_decode($_POST["p_data"]), $editor, "TicketEditor")) {
         $Ticket = new Ticket();
         $Ticket->Id = $editor->Id;
         if ($Ticket->Load()) {
             $editor->Editor = Operator::GetSystemId($editor->Editor);
             if (isset(Server::$Operators[$editor->Editor])) {
                 if (!empty($editor->GroupId) && in_array($editor->GroupId, Server::$Operators[$editor->Editor]->GetGroupList(true))) {
                     $editor->Save();
                     $Ticket->Editor = $editor;
                     if ($Ticket->Group != $editor->GroupId) {
                         $Ticket->SetGroup($editor->GroupId);
                     }
                     $Ticket->LoadMessages();
                     $Ticket->SetLastUpdate(time());
                     $this->JSONOutput = APIV2::Encode(array("TicketEditor" => ApiV2::ClearObject($params, $editor)), $this->JSONParams);
                     CacheManager::SetDataUpdateTime(DATA_UPDATE_KEY_TICKETS);
                 } else {
                     $this->ErrorField = "GroupId";
                 }
             } else {
                 $this->ErrorField = "Editor";
             }
         } else {
             $this->ErrorField = "Id";
         }
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:31,代码来源:objects.apiv2.inc.php

示例4: processTicketActions

function processTicketActions($count = 0)
{
    $temporaryIds = array();
    $updateRequiredTickets = $updateRequiredEmails = false;
    while (isset($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vc"])) {
        $type = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vc"];
        if ($type == "SetTicketStatus") {
            $Ticket = new Ticket();
            $Ticket->Id = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"];
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]) {
                $Ticket->Log(0, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
            }
            if (!empty($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"]) && $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]) {
                $Ticket->Log(2, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]);
            }
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]) {
                $Ticket->Log(3, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]);
            }
            $TicketEditor = new TicketEditor($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"]);
            if (!empty($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"])) {
                $TicketEditor->Editor = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"];
            }
            $TicketEditor->Status = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"];
            $TicketEditor->GroupId = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"];
            $TicketEditor->Save();
            if ($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"] != $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"]) {
                $Ticket->SetGroup($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
            }
            $Ticket->Editor = $TicketEditor;
            $Ticket->LoadMessages();
            $time = SystemTime::GetUniqueMessageTime(DATABASE_TICKETS, "last_update");
            $Ticket->SetLastUpdate($time);
            $updateRequiredTickets = true;
        } else {
            if ($type == "AddTicketEditorReply") {
                $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_3"]);
                $Ticket->Load(false, false);
                $Ticket->Group = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_4"];
                $Ticket->Messages[0]->Id = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_7"];
                $Ticket->Messages[0]->ChannelId = getId(32);
                $Ticket->Messages[0]->Hash = $Ticket->GetHash(false);
                $Ticket->Messages[0]->SenderUserId = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vb"];
                $Ticket->Messages[0]->Type = 1;
                $Ticket->Messages[0]->Email = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"];
                $Ticket->Messages[0]->Text = $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"];
                if ($Ticket->CreationType >= 6 && !empty($Ticket->ChannelId)) {
                    $twchannel = SocialMediaChannel::GetChannelById($Ticket->ChannelId);
                    if ($Ticket->CreationType == 7 && $twchannel->StreamType == 1) {
                        $Ticket->Messages[0]->Text = $twchannel->AddScreenName($Ticket->Messages[0]->Text, $Ticket->Messages[0]->Email);
                    } else {
                        if ($Ticket->CreationType == 6) {
                            $Ticket->Messages[0]->Email = $twchannel->PageId;
                        }
                    }
                }
                $Ticket->Messages[0]->Subject = cutString($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_5"], 255, false);
                $Ticket->Messages[0]->Save($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_va"], time());
                $acount = 8;
                while (isset($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount])) {
                    $Ticket->Messages[0]->ApplyAttachment($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_" . $acount++]);
                }
                $Ticket->SendEditorReply($Ticket->Messages[0]->Id, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_6"]);
                if (!empty(Server::$Configuration->File["gl_ctor"])) {
                    $Ticket->LoadStatus();
                    $Ticket->Editor->Status = TICKET_STATUS_CLOSED;
                    $Ticket->Editor->Save();
                }
                $Ticket->SetLastUpdate(time());
                $updateRequiredTickets = true;
            } else {
                if ($type == "SetTicketLanguage") {
                    $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                    $Ticket->SetLanguage($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                    $Ticket->Log(1, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
                    $Ticket->SetLastUpdate(time());
                    $updateRequiredTickets = true;
                } else {
                    if ($type == "DeleteTicketFromServer") {
                        $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                        $Ticket->Destroy();
                        $Ticket->Log(7, CALLER_SYSTEM_ID, 0, 1);
                        $Ticket->SetLastUpdate(time());
                        $updateRequiredTickets = true;
                    } else {
                        if ($type == "AddComment") {
                            $Ticket = new TicketMessage($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], "");
                            $Ticket->AddComment(CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"]);
                            $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_2"], "");
                            $Ticket->SetLastUpdate(time());
                            $updateRequiredTickets = true;
                        } else {
                            if ($type == "LinkChat") {
                                if (!empty($temporaryIds[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"]])) {
                                    $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"] = $temporaryIds[$_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"]];
                                }
                                $Ticket = new Ticket($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], "");
                                $Ticket->LinkChat($_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"], getId(32));
                                $Ticket->Log(5, CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_0"], $_POST[POST_INTERN_PROCESS_TICKET_ACTIONS . "_" . $count . "_vd_1"]);
                                $Ticket->SetLastUpdate(time());
                                $updateRequiredTickets = true;
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:101,代码来源:functions.internal.process.inc.php

示例5: ShowError

<?php

$ticket = null;
if (isset($_GET["id"])) {
    $ticket = Ticket::Load($_GET["id"]);
}
if (is_null($ticket) || !$ticket->IsValid()) {
    ShowError("Invalid ticket.");
} else {
    $creator = Staff::Load($ticket->GetCreatorID())->GetUsername();
    $client = Client::Load($ticket->GetClientID());
    $clientid = $client->GetUsername();
    $name = $client->GetName();
    $community = Building::GetCommunity($client->GetBuilding());
    $building = $client->GetBuilding();
    $room = $client->GetLocation();
    ?>

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header"><?php 
    echo Pages::GetCurrentPage() . " #" . $ticket->GetID();
    ?>
</h1>
	</div>
</div>

<?php 
    if (isset($_POST["update"])) {
        $update_description = $_POST["update_description"];
        if (empty($update_description)) {
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:ticket.php


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