Esempio n. 1
0
function handleState($state, $map, $red, $green, $blue, $figure, $rank)
{
    $color = rgb2html($red, $green, $blue);
    $map = textReplace($map, $state, $figure, $rank);
    $map = boxReplace($map, $state, $color);
    $map = colorReplace($map, $state, $color);
    return $map;
}
Esempio n. 2
0
 function GetColor($iblockId, $sectionId, $ownerType = false)
 {
     if ($ownerType != 'USER' && $ownerType != 'GROUP') {
         $ownerType = '';
     }
     $key = "UF_" . $ownerType . "_CAL_COL";
     $ent_id = "IBLOCK_" . $iblockId . "_SECTION";
     $arUF = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields($ent_id, $sectionId);
     if (isset($arUF[$key]) && strlen($arUF[$key]['VALUE']) > 0) {
         return colorReplace($arUF[$key]['VALUE']);
     }
     return '#CEE669';
 }