<?
function makGetBookPopularityStars($stars,$popularity)
{
$s = '';
for ($i = 1; $i <= $stars; $i++)
$s .= '<img src="/bitrix/templates/uchmag/imgs/voted.png"></img>';
return 'Популярность: ' . $s;
}
if(CModule::IncludeModule("iblock"))
$makFilter = array ("ID" => $arElement["ID"]);
$res = CIBlockElement::GetList(array(), $makFilter, array("SHOW_COUNTER","SHOW_COUNTER_START"));
while($arRaitingResult = $res->Getnext())
{
$days = (mktime() - MakeTimeStamp($arRaitingResult["SHOW_COUNTER_START"], "YYYY.MM.DD HH:MI:SS")) / (24 * 60 * 60); // days
$popularity = ($arRaitingResult["SHOW_COUNTER"]);
//echo $popularity;
}
?> |