本文整理汇总了PHP中CTicket::UpdateOnline方法的典型用法代码示例。如果您正苦于以下问题:PHP CTicket::UpdateOnline方法的具体用法?PHP CTicket::UpdateOnline怎么用?PHP CTicket::UpdateOnline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTicket
的用法示例。
在下文中一共展示了CTicket::UpdateOnline方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$order = $arParams["MESSAGE_SORT_ORDER"];
$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);
示例2: array
$get_user_name = "N";
$get_extra_names = "N";
$ALL_TICKET_FILES = array();
$arStrUsers = array();
$site_id = defined("ADMIN_SECTION") && ADMIN_SECTION == true ? "" : SITE_ID;
$ticket = CTicket::GetByID($ID, $site_id, "Y", $get_user_name, $get_extra_names);
if (!($ticket && $ticket->ExtractFields())) {
$ID = 0;
$str_lang = $TICKET_SITE = defined("ADMIN_SECTION") && ADMIN_SECTION == true ? reset($arrSiteID) : SITE_ID;
$str_RESPONSIBLE_USER_ID = intval(COption::GetOptionString('support', 'DEFAULT_RESPONSIBLE_ID', '0'));
} else {
$str_lang = $TICKET_SITE = $str_SITE_ID;
if (strlen($str_DATE_CLOSE) > 0) {
$str_CLOSE = "Y";
}
CTicket::UpdateOnline($ID);
$rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("TICKET_ID" => $ID));
while ($arFile = $rsFiles->Fetch()) {
$name = strlen($arFile["ORIGINAL_NAME"]) > 0 ? $arFile["ORIGINAL_NAME"] : $arFile["FILE_NAME"];
if (strlen($arFile["EXTENSION_SUFFIX"]) > 0) {
$suffix_length = strlen($arFile["EXTENSION_SUFFIX"]);
$name = substr($name, 0, strlen($name) - $suffix_length);
}
$ALL_TICKET_FILES[$arFile["MESSAGE_ID"]][] = array("HASH" => $arFile["HASH"], "NAME" => $name, "FILE_SIZE" => $arFile["FILE_SIZE"]);
}
if ($get_user_name == "N") {
//Support_GetUserInfo($str_RESPONSIBLE_USER_ID, $str_RESPONSIBLE_LOGIN, $str_RESPONSIBLE_NAME);
//Support_GetUserInfo($str_OWNER_USER_ID, $str_OWNER_LOGIN, $str_OWNER_NAME);
//Support_GetUserInfo($str_CREATED_USER_ID, $str_CREATED_LOGIN, $str_CREATED_NAME);
//Support_GetUserInfo($str_MODIFIED_USER_ID, $str_MODIFIED_BY_LOGIN, $str_MODIFIED_BY_NAME);
}
示例3: strlen
$GLOBALS["APPLICATION"]->ThrowException($e);
return false;
}
return true;
}
/***************************************************************************
ќбработка GET | POST
***************************************************************************/
$TICKET_LIST_URL = strlen($TICKET_LIST_URL) > 0 ? $TICKET_LIST_URL : "ticket_list.php";
$TICKET_EDIT_URL = strlen($TICKET_EDIT_URL) > 0 ? $TICKET_EDIT_URL : "ticket_edit.php";
$TICKET_MESSAGE_EDIT_URL = strlen($TICKET_MESSAGE_EDIT_URL) > 0 ? $TICKET_MESSAGE_EDIT_URL : "ticket_message_edit.php";
$ID = intval($ID);
$TICKET_ID = intval($TICKET_ID);
$rsTicket = CTicket::GetByID($TICKET_ID, LANGUAGE_ID, "Y", "N", "N");
if ($arTicket = $rsTicket->Fetch()) {
CTicket::UpdateOnline($ID, $USER->GetID());
$arFiles = array();
if ($rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("MESSAGE_ID" => $ID))) {
while ($arFile = $rsFiles->Fetch()) {
$name = $arFile["ORIGINAL_NAME"];
if (strlen($arFile["EXTENSION_SUFFIX"]) > 0) {
$suffix_length = strlen($arFile["EXTENSION_SUFFIX"]);
$name = substr($name, 0, strlen($name) - $suffix_length);
}
$arFile["NAME"] = $name;
$arFiles[] = $arFile;
}
}
// если была нажата кнопка "save" на текущей странице
if ((strlen($save) > 0 || strlen($apply) > 0) && $REQUEST_METHOD == "POST" && $bAdmin == "Y" && $ID > 0 && $TICKET_ID > 0 && check_bitrix_sessid()) {
$DB->PrepareFields("b_ticket_message");
示例4: 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