• Модуль: support
  • Путь к файлу: ~/bitrix/modules/support/classes/mysql/support.php
  • Класс: CTicket
  • Вызов: CTicket::GetStatus
static function GetStatus($ticketID)
{
	$err_mess = (CTicket::err_mess())."
Function: GetStatus
Line: "; global $DB, $USER; $ticketID = intval($ticketID); if ($ticketID<=0) return false; $bAdmin = (CTicket::IsAdmin()) ? "Y" : "N"; $bSupportTeam = (CTicket::IsSupportTeam()) ? "Y" : "N"; $bSupportClient = (CTicket::IsSupportClient()) ? "Y" : "N"; $bDemo = (CTicket::IsDemo()) ? "Y" : "N"; $uid = intval($USER->GetID()); if ($bSupportTeam=="Y" || $bAdmin=="Y" || $bDemo=="Y") { $lamp = " if(ifnull(T.DATE_CLOSE,'x')<>'x', 'grey', if(ifnull(T.LAST_MESSAGE_USER_ID,0)='$uid', 'green', if(ifnull(T.OWNER_USER_ID,0)='$uid', 'red', if(T.LAST_MESSAGE_BY_SUPPORT_TEAM='Y','green_s', if(ifnull(T.RESPONSIBLE_USER_ID,0)='$uid', 'red', 'yellow'))))) "; } else { $lamp = " if(ifnull(T.DATE_CLOSE,'x')<>'x', 'grey', if(ifnull(T.LAST_MESSAGE_USER_ID,0)='$uid', 'green', 'red')) "; } $strSql = " SELECT $lamp LAMP FROM b_ticket T WHERE ID = $ticketID "; $rs = $DB->Query($strSql, false, $err_mess.__LINE__); if ($ar = $rs->Fetch()) return $ar["LAMP"]; return false; }