本文整理汇总了PHP中GetElementName函数的典型用法代码示例。如果您正苦于以下问题:PHP GetElementName函数的具体用法?PHP GetElementName怎么用?PHP GetElementName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetElementName函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$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.'&IBLOCK_ID='.$prop["LINK_IBLOCK_ID"].'&n='.urlencode($VALUE_NAME).'\', 600, 500);">'.
' <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.'&IBLOCK_ID='.$prop["LINK_IBLOCK_ID"].'&n='.urlencode($VALUE_NAME).'\', 600, 500);">'.
' <span id="sp_'.$VALUE_NAME.'" ></span>';
}
}
$last_property_id = $prop['ID'];
}
$table_id = md5($f_TYPE.$f_ID.':'.$aProp['ID']);
示例2: GetSectionName
'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 != "")
示例3: foreach
}
}
}
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"]);
}
示例4: array
} 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"]) . "')")));
}