} $f_DATE_LAST_SHOW = explode(" ", $f_DATE_LAST_SHOW); $row->AddViewField("SHOW_COUNT_LAST_SHOW", $f_DATE_LAST_SHOW[0] . "<br>" . $f_DATE_LAST_SHOW[1]); $row->AddViewField("CLICK_COUNT", $f_CLICK_COUNT); if ($canAddbanner) { $row->AddInputField("MAX_CLICK_COUNT"); } else { $row->AddViewField("MAX_CLICK_COUNT", $f_MAX_CLICK_COUNT); } $f_DATE_LAST_CLICK = explode(" ", $f_DATE_LAST_CLICK); $row->AddViewField("CLICK_COUNT_LAST_CLICK", $f_DATE_LAST_CLICK[0] . "<br>" . $f_DATE_LAST_CLICK[1]); $row->AddViewField("CTR", $f_CTR); // Calculate UNIFORM FIELD $f_UNIFORM_COEF = $arRes["FLYUNIFORM"] == "N" ? GetMessage("AD_NO") : GetMessage("AD_YES"); if (isset($arRes["FLYUNIFORM"]) and $arRes["FLYUNIFORM"] == "Y") { $rot = CAdvBanner_all::CalculateRotationProgress($arRes); $tim = CAdvBanner_all::CalculateTimeProgress($arRes); if ($rot and $tim) { $arProgress = $rot / $tim; $f_UNIFORM_COEF = round($rot * 100) . "% / " . round($tim * 100) . "% = " . round($arProgress, 3); } } $row->AddViewField("UNIFORM_COEF", $f_UNIFORM_COEF); /// // FIRST_SHOW $f_FIRST_SHOW = GetMessage("AD_NOFIRST_SHOW_DATE"); if (isset($arRes["DATE_SHOW_FIRST"])) { $f_FIRST_SHOW = $arRes["DATE_SHOW_FIRST"]; } $row->AddViewField("FIRST_SHOW", $f_FIRST_SHOW); ///
function GetUniformityCoef($arBanner) { $arProgress = 0; $rot = CAdvBanner_all::CalculateRotationProgress($arBanner); $tim = CAdvBanner_all::CalculateTimeProgress($arBanner); if ($rot and $tim) { $arProgress = $rot / $tim; } return $arProgress; }