function GetSupportTeamList() { $err_mess = CTicket::err_mess() . "<br>Function: GetSupportTeamList<br>Line: "; global $DB; $arrGid = CTicket::GetSupportTeamGroups(); $arrAid = CTicket::GetAdminGroups(); if (count($arrGid) > 0) { $gid = implode(",", $arrGid); } else { $gid = 0; } if (count($arrAid) > 0) { $aid = implode(",", $arrAid); } else { $aid = 0; } $strSql = "\n\t\t\tSELECT DISTINCT\n\t\t\t\tU.ID as REFERENCE_ID,\n\t\t\t\tconcat('[',U.ID,'] ',' (',U.LOGIN,') ',ifnull(U.NAME,''),' ',ifnull(U.LAST_NAME,'')) as REFERENCE,\n\t\t\t\tU.ACTIVE\n\t\t\tFROM\n\t\t\t\tb_user U,\n\t\t\t\tb_user_group G\n\t\t\tWHERE\n\t\t\t\tU.ID = G.USER_ID\n\t\t\tand G.GROUP_ID in ({$gid}, {$aid})\n\t\t\tORDER BY\n\t\t\t\tU.ID\n\t\t\t"; $res = $DB->Query($strSql, false, $err_mess . __LINE__); return $res; }
public static function GetSupportTeamList() { $err_mess = (CTicket::err_mess())."<br>Function: GetSupportTeamList<br>Line: "; global $DB; $arrGid = CTicket::GetSupportTeamGroups(); $arrAid = CTicket::GetAdminGroups(); if (count($arrGid)>0) { $gid = implode(",",$arrGid); } else { $gid = 0; } if (count($arrAid)>0) { $aid = implode(",",$arrAid); } else { $aid = 0; } $strSql = " SELECT DISTINCT U.ID as REFERENCE_ID, concat('[',U.ID,'] ',' (',U.LOGIN,') ',ifnull(U.NAME,''),' ',ifnull(U.LAST_NAME,'')) as REFERENCE, U.ACTIVE FROM b_user U, b_user_group G WHERE U.ID = G.USER_ID and G.GROUP_ID in ($gid, $aid) ORDER BY U.ID "; $res = $DB->Query($strSql, false, $err_mess.__LINE__); return $res; }