function GetVoteList($GROUP_SID = "", $params = array(), $site_id = SITE_ID) { $strSqlOrder = (is_string($params) ? $params : "ORDER BY C.C_SORT, C.ID, V.C_SORT, V.DATE_START desc"); $params = (is_array($params) ? $params : array()); if (array_key_exists("order", $params)) $strSqlOrder = $params["order"]; $arFilter["SITE"] = (array_key_exists("SITE_ID", $params) ? $params["SITE_ID"] : $site_id); if (is_array($GROUP_SID) && !empty($GROUP_SID)) { $arr = array(); foreach ($GROUP_SID as $v) { if (!empty($v)) $arr[] = $v; } if (!empty($arr)) $arFilter["CHANNEL"] = $arr; } elseif (!empty($GROUP_SID)) { $arFilter["CHANNEL"] = $GROUP_SID; } $z = CVote::GetPublicList($arFilter, $strSqlOrder, $params); return $z; }
function GetVoteList($GROUP_SID = "", $strSqlOrder = "ORDER BY C.C_SORT, C.ID, V.C_SORT, V.DATE_START desc", $site_id = SITE_ID) { $arFilter["SITE"] = $site_id; if (is_array($GROUP_SID) && !empty($GROUP_SID)) { $arr = array(); foreach ($GROUP_SID as $v) { $v = trim($v); if (strlen($v) > 0) { $arr[] = $v; } } if (!empty($arr)) { $arFilter["CHANNEL"] = $arr; } } elseif (strlen($GROUP_SID) > 0) { $arFilter["CHANNEL"] = $GROUP_SID; } $z = CVote::GetPublicList($arFilter, $strSqlOrder); return $z; }