本文整理汇总了PHP中CTicket::GetMessageList方法的典型用法代码示例。如果您正苦于以下问题:PHP CTicket::GetMessageList方法的具体用法?PHP CTicket::GetMessageList怎么用?PHP CTicket::GetMessageList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTicket
的用法示例。
在下文中一共展示了CTicket::GetMessageList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("TICKET_ID" => $arParams["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);
}
$arMessagesFiles[$arFile["MESSAGE_ID"]][] = array("HASH" => $arFile["HASH"], "NAME" => htmlspecialcharsbx($name), "FILE_SIZE" => $arFile["FILE_SIZE"]);
}
//+Messages
$arParams["MESSAGES_PER_PAGE"] = intval($arParams["MESSAGES_PER_PAGE"]) <= 0 ? 20 : intval($arParams["MESSAGES_PER_PAGE"]);
$arFilter = array("TICKET_ID" => $arParams["ID"], "TICKET_ID_EXACT_MATCH" => "Y", "IS_MESSAGE" => "Y");
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
//sort config
$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"]);
示例2: GetMessages
function GetMessages($ticketID, $arFilter = array(), $checkRights = "Y")
{
$arFilter["TICKET_ID"] = $ticketID;
$arFilter["TICKET_ID_EXACT_MATCH"] = "Y";
$by = $order = $is_filtered = null;
return CTicket::GetMessageList($by, $order, $arFilter, $is_filtered, $checkRights, "Y");
}
示例3: array
echo $str_COUPON;
?>
</td>
</tr>
<?php
}
?>
<?php
if ($ID > 0) {
if ($bDemo == "Y") {
$CHECK_RIGHTS = "N";
} else {
$CHECK_RIGHTS = "Y";
}
$mess = CTicket::GetMessageList($a, $b, array("TICKET_ID" => $ID, "TICKET_ID_EXACT_MATCH" => "Y"), $c, $CHECK_RIGHTS, $get_user_name);
$mess->NavStart(COption::GetOptionString("support", "MESSAGES_PER_PAGE", 50));
//$mess->NavStart(5);
$messages = $mess->SelectedRowsCount();
if (intval($messages) > 0) {
?>
<?php
if ($ID > 0) {
?>
<tr class="heading"><td colspan="2"><?php
echo GetMessage("SUP_DISCUSSION");
?>
</td></tr>
<?php
}