Пример #1
0
					$html = '<select name="'.$VALUE_NAME.'" size="'.$prop["MULTIPLE_CNT"].'" '.($prop["MULTIPLE"]=="Y"?"multiple":"").'>';
					$html .= '<option value=""'.(count($arValues) < 1? ' selected': '').'>'.GetMessage("IBLIST_A_PROP_NOT_SET").'</option>';
					foreach($arSelect[$prop['ID']] as $value => $display)
					{
						$html .= '<option value="'.$value.'"';
						if(array_key_exists($value, $arValues))
							$html .= ' selected';
						$html .= '>'.$display.'</option>'."\n";
					}
					$html .= "</select>\n";
					$arEditHTML[] = $html;
				}
				elseif($prop['PROPERTY_TYPE']=='E')
				{
					$VALUE_NAME = 'FIELDS['.$f_TYPE.$f_ID.'][PROPERTY_'.$prop['ID'].']['.$prop['PROPERTY_VALUE_ID'].']';
					if($t = GetElementName($prop["VALUE"]))
					{
						$arEditHTML[] = '<input type="text" name="'.$VALUE_NAME.'" id="'.$VALUE_NAME.'" value="'.$prop["VALUE"].'" size="5">'.
						'<input type="button" value="..." onClick="jsUtils.OpenWindow(\'iblock_element_search.php?lang='.LANGUAGE_ID.'&amp;IBLOCK_ID='.$prop["LINK_IBLOCK_ID"].'&amp;n='.urlencode($VALUE_NAME).'\', 600, 500);">'.
						'&nbsp;<span id="sp_'.$VALUE_NAME.'" >'.$t['NAME'].'</span>';
					}
					else
					{
						$arEditHTML[] = '<input type="text" name="'.$VALUE_NAME.'" id="'.$VALUE_NAME.'" value="" size="5">'.
						'<input type="button" value="..." onClick="jsUtils.OpenWindow(\'iblock_element_search.php?lang='.LANGUAGE_ID.'&amp;IBLOCK_ID='.$prop["LINK_IBLOCK_ID"].'&amp;n='.urlencode($VALUE_NAME).'\', 600, 500);">'.
						'&nbsp;<span id="sp_'.$VALUE_NAME.'" ></span>';
					}
				}
				$last_property_id = $prop['ID'];
			}
			$table_id = md5($f_TYPE.$f_ID.':'.$aProp['ID']);
Пример #2
0
						'medialib' => false,
						'file_dialog' => false,
						'cloud' => false,
						'del' => false,
						'description' => false,
					)
				);
			elseif($aProp['PROPERTY_TYPE']=='G')
			{
				$t = GetSectionName($property_value["VALUE"]);
				if($t)
					$res = $t['NAME'].' [<a href="'.htmlspecialcharsbx(CIBlock::GetAdminSectionEditLink($t['IBLOCK_ID'], $t['ID'])).'" title="'.GetMessage("IBLOCK_ELSEARCH_SECTION_EDIT").'">'.$t['ID'].'</a>]';
			}
			elseif($aProp['PROPERTY_TYPE']=='E')
			{
				$t = GetElementName($property_value["VALUE"]);
				if($t)
				{
					$res = $t['NAME'].' [<a href="'.htmlspecialcharsbx(CIBlock::GetAdminElementEditLink($t['IBLOCK_ID'], $t['ID'])).'" title="'.GetMessage("IBLOCK_ELSEARCH_ELEMENT_EDIT").'">'.$t['ID'].'</a>]';
				}
			}
			elseif($property_value['PROPERTY_TYPE']=='L')
			{
				$res = $property_value["VALUE_ENUM"];
			}
			else
			{
				$res = $property_value["VALUE"];
			}

			if ($res != "")
         }
     }
 }
 foreach ($arSelectedProps as $aProp) {
     $v = '';
     foreach ($arProperties[$aProp['ID']] as $property_value_id => $property_value) {
         $res = '';
         if ($aProp['PROPERTY_TYPE'] == 'F') {
             $res = CFileInput::Show('NO_FIELDS[' . $property_value_id . ']', $property_value, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxImageSize, "MIN_SIZE" => $minImageSize), array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false));
         } elseif ($aProp['PROPERTY_TYPE'] == 'G') {
             $t = GetSectionName($property_value);
             if ($t) {
                 $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminSectionEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("SPS_ELSEARCH_SECTION_EDIT") . '">' . $t['ID'] . '</a>]';
             }
         } elseif ($aProp['PROPERTY_TYPE'] == 'E') {
             $t = GetElementName($property_value);
             if ($t) {
                 $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminElementEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("SPS_ELSEARCH_ELEMENT_EDIT") . '">' . $t['ID'] . '</a>]';
             }
         } else {
             $res = htmlspecialcharsex($property_value);
         }
         if ($res != "") {
             $v .= ($v != '' ? ' / ' : '') . $res;
         }
     }
     if ($v != "") {
         $row->AddViewField("PROPERTY_" . $aProp['ID'], $v);
     }
     unset($arSelectedProps[$aProp['ID']]["CACHE"]);
 }
        } else {
            $v = '';
            $arPropMultVal = array();
            $arPropMultValID = array();
            $dbPVals = CIBlockElement::GetProperty($IBLOCK_ID, $arRes["ID"], $xxord, $xxby, array("ID" => $aProp['ID']));
            while ($arPVals = $dbPVals->Fetch()) {
                $res = '';
                if ($aProp['PROPERTY_TYPE'] == 'F') {
                    $res = CFile::ShowFile($arPVals['VALUE'], 100000, 50, 50, true);
                } elseif ($aProp['PROPERTY_TYPE'] == 'G') {
                    $t = CIBlockSection::GetByID($arPVals['VALUE']);
                    if ($t = $t->GetNext()) {
                        $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminSectionEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("IBLOCK_ELSEARCH_SECTION_EDIT") . '">' . $t['ID'] . '</a>]';
                    }
                } elseif ($aProp['PROPERTY_TYPE'] == 'E') {
                    if ($t = GetElementName($arPVals['VALUE'])) {
                        $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminElementEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("IBLOCK_ELSEARCH_ELEMENT_EDIT") . '">' . $t['ID'] . '</a>]';
                    }
                } else {
                    $res = htmlspecialcharsex($arPVals['VALUE_ENUM'] ? $arPVals['VALUE_ENUM'] : $arPVals['VALUE']);
                }
                $v .= ($v != '' ? ' / ' : '') . $res;
                $arPropMultVal[] = $arPVals['VALUE_ENUM'] ? $arPVals['VALUE_ENUM'] : $arPVals['VALUE'];
                $arPropMultValID[$arPVals['PROPERTY_VALUE_ID']] = $arPVals['VALUE'];
            }
            $row->AddViewField("PROPERTY_" . $aProp['ID'], $v);
        }
        unset($arSelectedProps[$aProp['ID']]["CACHE"]);
    }
    $row->AddActions(array(array("DEFAULT" => "Y", "TEXT" => GetMessage("IBLOCK_ELSEARCH_SELECT"), "ACTION" => "javascript:SelEl('" . CUtil::JSEscape($get_xml_id ? $arRes["XML_ID"] : $arRes["ID"]) . "', '" . CUtil::JSEscape($arRes["NAME"]) . "')")));
}