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


PHP CTicket::AddMessage方法代码示例

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


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

示例1: Set


//.........这里部分代码省略.........
         /*$arFields_log = array(
         			"LOG"							=> "Y",
         			"MESSAGE_CREATED_USER_ID"		=> $MODIFIED_USER_ID,
         			"MESSAGE_CREATED_MODULE_NAME"	=> $MODIFIED_MODULE_NAME,
         			"MESSAGE_CREATED_GUEST_ID"		=> $MODIFIED_GUEST_ID,
         			"MESSAGE_SOURCE_ID"				=> intval($arFields["SOURCE_ID"])
         		);*/
         $v->arFields_log = array("LOG" => "Y", "MESSAGE_CREATED_USER_ID" => $f->MODIFIED_USER_ID, "MESSAGE_CREATED_MODULE_NAME" => $f->MODIFIED_MODULE_NAME, "MESSAGE_CREATED_GUEST_ID" => $f->MODIFIED_GUEST_ID, "MESSAGE_SOURCE_ID" => $f->SOURCE_ID);
         // если необходимо соблюдать права то
         if ($v->CHECK_RIGHTS == "Y") {
             // если update техподдержки не прошел то
             if (intval($v->SupportTeamUpdateRes) <= 0) {
                 // убираем из массива исходных значений то что может менять только техподдержка
                 unset($v->arrOldFields["RESPONSIBLE_USER_ID"]);
                 unset($v->arrOldFields["SLA_ID"]);
                 unset($v->arrOldFields["CATEGORY_ID"]);
                 unset($v->arrOldFields["DIFFICULTY_ID"]);
                 unset($v->arrOldFields["STATUS_ID"]);
             }
             // если update автора не прошел то
             if (intval($v->SupportClientUpdateRes) <= 0) {
                 // убираем из массива исходных значений то что может менять только автор
                 unset($v->arrOldFields["MARK_ID"]);
             }
         }
         // если состоялся один из updat'ов то
         if (intval($v->SupportTeamUpdateRes) > 0 || intval($v->SupportClientUpdateRes) > 0) {
             // добавляем сообщение
             $arFields["MESSAGE_CREATED_MODULE_NAME"] = $arFields["MODIFIED_MODULE_NAME"];
             if (is_set($arFields, "IMAGE")) {
                 $arFields["FILES"][] = $arFields["IMAGE"];
             }
             $arFiles = null;
             $MID = CTicket::AddMessage($f->ID, $arFields, $arFiles, $v->CHECK_RIGHTS);
             $v->arrFILES = $arFiles;
             $MID = intval($MID);
             $dateType = array();
             $dateType["EVENT"] = array(CTicket::UPDATE);
             if ($v->newSLA) {
                 $dateType["EVENT"][] = CTicket::NEW_SLA;
                 $dateType["OLD_SLA_RESPONSE_TIME"] = $v->arrOldFields["RESPONSE_TIME"];
                 $dateType["OLD_SLA_RESPONSE_TIME_UNIT"] = $v->arrOldFields["RESPONSE_TIME_UNIT"];
             }
             if ($f->REOPEN == "Y") {
                 $dateType["EVENT"][] = CTicket::REOPEN;
             }
             //CTicket::UpdateLastParams2($f->ID, $dateType);
             CTicket::UpdateLastParamsN($f->ID, $dateType, true, true);
             /*// если обращение закрывали то
             		if($v->closeDate)
             		{
             			// удалим агентов-напоминальщиков и обновим параметры обращения
             			CTicketReminder::Remove($f->ID);
             		}*/
             if (is_array($v->arrOldFields) && is_array($arFields)) {
                 // определяем что изменилось
                 $v->arChange = array();
                 if ($MID > 0) {
                     if ($arFields["HIDDEN"] != "Y") {
                         $v->arChange["MESSAGE"] = "Y";
                     } else {
                         $v->arChange["HIDDEN_MESSAGE"] = "Y";
                     }
                 }
                 if ($arFields["CLOSE"] == "Y" && strlen($v->arrOldFields["DATE_CLOSE"]) <= 0) {
                     $v->arChange["CLOSE"] = "Y";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:67,代码来源:support.php

示例2: SupportDeadline

 public static function SupportDeadline($arrTicket)
 {
     global $MESS, $DB;
     $err_mess = CAllTicketReminder::err_mess() . "<br>Function: supportDeadline<br>Line: ";
     $rsSite = CSite::GetByID($arrTicket["SITE_ID"]);
     $arSite = $rsSite->Fetch();
     //$oldMess = $MESS;
     IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/support/classes/general/messages.php", $arSite["LANGUAGE_ID"]);
     // update message params
     $arFields = array("EXPIRE_AGENT_ID" => "null", "IS_OVERDUE" => "'Y'", "OVERDUE_MESSAGES" => "OVERDUE_MESSAGES + 1");
     // execute event
     $rs = GetModuleEvents('support', 'OnBeforeTicketExpire');
     while ($arr = $rs->Fetch()) {
         $arFields = ExecuteModuleEventEx($arr, array($arrTicket["ID"], $arFields));
         if (!$arFields) {
             return false;
         }
     }
     $DB->Update("b_ticket", $arFields, "WHERE ID='" . $arrTicket["ID"] . "'", $err_mess . __LINE__);
     // add message log
     $message = str_replace("#ID#", $arrTicket["TM_ID"], GetMessage("SUP_MESSAGE_OVERDUE_LOG"));
     $message = str_replace("#NUMBER#", $arrTicket["TM_C_NUMBER"], $message);
     $message .= "<br><li>" . htmlspecialcharsEx(str_replace("#VALUE#", $arrTicket["SLA_NAME"], GetMessage("SUP_SLA_LOG")));
     if (intval($arrTicket["RESPONSIBLE_USER_ID"]) > 0) {
         $rsUser = CUser::GetByID(intval($arrTicket["RESPONSIBLE_USER_ID"]));
         $arUser = $rsUser->Fetch();
         $responsibleText = "[" . $arUser["ID"] . "] (" . $arUser["LOGIN"] . ") " . $arUser["NAME"] . " " . $arUser["LAST_NAME"];
         $message .= "<li>" . htmlspecialcharsEx(str_replace("#VALUE#", $responsibleText, GetMessage("SUP_RESPONSIBLE_LOG")));
     }
     $arFields = array("IS_LOG" => "Y", "IS_OVERDUE" => "Y", "MESSAGE_CREATED_USER_ID" => "null", "MESSAGE_CREATED_MODULE_NAME" => "auto expiration", "MESSAGE_CREATED_GUEST_ID" => "null", "MESSAGE_SOURCE_ID" => "null", "MESSAGE" => $message);
     $v = null;
     $mid = CTicket::AddMessage($arrTicket['ID'], $arFields, $v, "N");
     //$MESS = $oldMess;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:34,代码来源:reminder.php


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