$name = $FILTER_NAME."_pf[".$arProp["CODE"]."]";
$value = $arrPFV[$arProp["CODE"]];
if ($arProp["MULTIPLE"]=="Y")
$res .= '<select multiple name="'.$name.'[]" size="'.$arParams["LIST_HEIGHT"].'">';
else
$res .= '<select name="'.$name.'">';
$res .= '<option value="">'.GetMessage("CC_BCF_ALL").'</option>';
foreach($arProp["VALUE_LIST"] as $key=>$val)
{
$res .= '<option';
if (($arProp["MULTIPLE"] == "Y") && is_array($value))
{
if(in_array($key, $value))
$res .= ' selected';
}
else
{
if($key == $value)
$res .= ' selected';
}
$res .= ' value="'.htmlspecialchars($key).'">'.htmlspecialchars($val).'</option>';
}
$res .= '</select>'; |