$rsMessage = CTicket::GetMessageList($by, $order, $arFilter, $is_filtered, $check_rights = "Y", $get_user_name = "N"); $rsMessage->NavStart($arParams["MESSAGES_PER_PAGE"]); $arResult["NAV_STRING"] = $rsMessage->GetPageNavString(GetMessage("SUP_PAGES")); $arResult["NAV_RESULT"] = $rsMessage; while ($arMessage = $rsMessage->GetNext()) { if (array_key_exists($arMessage["ID"], $arMessagesFiles)) { $arFiles["FILES"] = $arMessagesFiles[$arMessage["ID"]]; } else { $arFiles["FILES"] = array(); } $arMessage["MESSAGE"] = TxtToHTML($arMessage["~MESSAGE"], $bMakeUrls = true, $iMaxStringLen = $arParams["MESSAGE_MAX_LENGTH"], $QUOTE_ENABLED = "Y", $NOT_CONVERT_AMPERSAND = "N", $CODE_ENABLED = "Y", $BIU_ENABLED = "Y", $quote_table_class = "support-quote-table", $quote_head_class = "support-quote-head", $quote_body_class = "support-quote-body", $code_table_class = "support-code-table", $code_head_class = "support-code-head", $code_body_class = "support-code-body", $code_textarea_class = "support-code-textarea", $link_class = ""); $arResult["MESSAGES"][] = $arMessage + $arFiles + _GetUserInfo($arMessage["OWNER_USER_ID"], "OWNER") + _GetUserInfo($arMessage["CREATED_USER_ID"], "CREATED") + _GetUserInfo($arMessage["MODIFIED_USER_ID"], "MODIFIED_BY"); } //Online CTicket::UpdateOnline($arParams["ID"], $USER->GetID()); $rsOnline = CTicket::GetOnline($arParams["ID"]); while ($arOnline = $rsOnline->GetNext()) { $arResult["ONLINE"][] = $arOnline; } $ticketSite = $arTicket["SITE_ID"]; $ticketSla = $arTicket["SLA_ID"]; } else { $ticketSite = SITE_ID; $ticketSla = CTicketSLA::GetForUser(); $arResult["DICTIONARY"]["CRITICALITY_DEFAULT"] = CTicketDictionary::GetDefault("K", $ticketSite); $arResult["DICTIONARY"]["CATEGORY_DEFAULT"] = CTicketDictionary::GetDefault("C", $ticketSite); } //Mark, Category, Criticality dictionary list $ticketDictionary = CTicketDictionary::GetDropDownArray($ticketSite, $ticketSla); $arResult["DICTIONARY"]["MARK"] = _GetDropDownDictionary("M", $ticketDictionary); $arResult["DICTIONARY"]["CRITICALITY"] = _GetDropDownDictionary("K", $ticketDictionary);
define("STOP_STATISTICS", "Y"); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/support/include.php"; ClearVars(); $TICKET_ID = intval($TICKET_ID); $url = $APPLICATION->GetCurPage() . "?TICKET_ID=" . $TICKET_ID . "&OWNER_USER_ID=" . intval($OWNER_USER_ID) . "&lang=" . LANGUAGE_ID . "&ONLINE_AUTO_REFRESH=" . intval($ONLINE_AUTO_REFRESH); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_popup_admin.php"; $lamp = CTicket::GetStatus($TICKET_ID); $ticket = CTicket::GetByID($TICKET_ID); $arTicket = $ticket->ExtractFields(); ?> <table cellspacing=0 cellpadding=0 class="support-online"> <?php $mode = strlen($mode) > 0 ? $mode : false; CTicket::UpdateOnline($TICKET_ID, false, $mode); $rs = CTicket::GetOnline($TICKET_ID); while ($ar = $rs->GetNext()) { $is_support = ""; if (intval($OWNER_USER_ID) == $ar["USER_ID"]) { $is_support = "N"; } elseif (CTicket::IsSupportTeam($ar["USER_ID"]) || CTicket::IsAdmin($ar["USER_ID"]) || CTicket::IsDemo($ar["USER_ID"])) { $is_support = "Y"; } ?> <tr> <td valign="top" width="16%"><?php if ($is_support == "Y") { if ($ar["CURRENT_MODE"] == "edit") { ?> <img src="/bitrix/images/support/sup_write.gif" width="15" height="13" border="0" alt="<?php echo GetMessage("SUP_EDIT_MODE_ALT");