$arSqlWhereStr = '';
if (is_array($arFilter) && count($arFilter)>0)
{
$arSqlWhere = [];
$arSqlFields=array("ID", "REPORT", "HIDDEN", "SENDED_TO_BITRIX");
foreach($arFilter as $key => $value):
if (in_array($key, $arSqlFields))
$arSqlWhere[] = $key."='".$DB->ForSql($value).[];
endforeach;
$arSqlWhereStr = GetFilterSqlSearch($arSqlWhere);
}
$strSql = "SELECT * FROM b_checklist";
if ($arSqlWhereStr <> '')
$strSql.= " WHERE" .$arSqlWhereStr;
$strSql.= " ORDER BY ID desc ";
$arResult = $DB->Query($strSql, false,"FILE: ".__FILE__."<br> LINE: ".__LINE__);
return $arResult;
}