本文整理汇总了PHP中CTicket::GetOnline方法的典型用法代码示例。如果您正苦于以下问题:PHP CTicket::GetOnline方法的具体用法?PHP CTicket::GetOnline怎么用?PHP CTicket::GetOnline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTicket
的用法示例。
在下文中一共展示了CTicket::GetOnline方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$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);
示例2: define
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");