if defined B_PROLOG_INCLUDED B_PROLOG_INCLUDED true die global DB strS

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<? if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
global $DB;
$strSql = "SELECT * FROM b_uk_reviews ORDER BY DATE_CREATE DESC";
$UU = $DB->Query($strSql, false, $err_mess.__LINE__);
$i=0;
while($arGroup=$UU->GetNext())
{
$strSql = "SELECT NAME, LAST_NAME FROM b_user WHERE ID = ".$arGroup["OWNED_USER_ID"];
$user = $DB->Query($strSql, false, $err_mess.__LINE__);
$user = $user->Fetch();
$arUser["NAME"] = strval($user["NAME"])." ".strval($user["LAST_NAME"]);
$arFilter = Array(
"TICKET_ID" => $arGroup["TICKET_ID"],
"TICKET_ID_EXACT_MATCH" => "Y",
"IS_MESSAGE" => "Y"
);
$by = 's_id';
$order = 'asc';
$is_filtered = false;
CModule::IncludeModule("citrus.tszhtickets");
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
$rsMessage = CTszhTicket::GetMessageList($by, $order, $arFilter, $is_filtered);
$strSql = "SELECT MESSAGE FROM b_tszh_ticket_message WHERE TICKET_ID = ".$arGroup["TICKET_ID"];
$rsMessage = $DB->Query($strSql, false, $err_mess.__LINE__);
$arMessage = $rsMessage->Fetch();
$arSupport["MESSAGE_SUPPORT"] = $arMessage["MESSAGE"];
$arMessageS["MESSAGE"] = $arGroup["MESSAGE"];
$arRating["RATING"] = $arGroup["RATING"];
$arData["DATA"] = $arGroup["DATE_CREATE"];
$arResult["OTZYVY"][] = $arUser + $arMessageS + $arRating + $arData + $arSupport;
}
$this->IncludeComponentTemplate();
?>