当前位置: 首页>>代码示例>>PHP>>正文


PHP CFileInput::Show方法代码示例

本文整理汇总了PHP中CFileInput::Show方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileInput::Show方法的具体用法?PHP CFileInput::Show怎么用?PHP CFileInput::Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFileInput的用法示例。


在下文中一共展示了CFileInput::Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getEditHtml

 /**
  * {@inheritdoc}
  */
 protected function getEditHtml()
 {
     if (class_exists('\\Bitrix\\Main\\UI\\FileInput', true) && $this->getSettings('IMAGE') === true) {
         $html = FileInput::createInstance(array('name' => $this->getEditInputName('_FILE'), 'description' => $this->getSettings('DESCRIPTION_FIELD'), 'upload' => $this->getSettings('UPLOAD'), 'allowUpload' => 'I', 'medialib' => $this->getSettings('MEDIALIB'), 'fileDialog' => $this->getSettings('FILE_DIALOG'), 'cloud' => $this->getSettings('CLOUD'), 'delete' => $this->getSettings('DELETE'), 'edit' => $this->getSettings('EDIT'), 'maxCount' => 1))->show($this->getValue());
     } else {
         $html = \CFileInput::Show($this->getEditInputName('_FILE'), $this->getValue() > 0 ? $this->getValue() : 0, array('IMAGE' => $this->getSettings('IMAGE') === true ? 'Y' : 'N', 'PATH' => 'Y', 'FILE_SIZE' => 'Y', 'ALLOW_UPLOAD' => 'I'), array('upload' => $this->getSettings('UPLOAD'), 'medialib' => $this->getSettings('MEDIALIB'), 'file_dialog' => $this->getSettings('FILE_DIALOG'), 'cloud' => $this->getSettings('CLOUD'), 'del' => $this->getSettings('DELETE'), 'description' => $this->getSettings('DESCRIPTION_FIELD')));
     }
     if ($this->getValue()) {
         $html .= '<input type="hidden" name="' . $this->getEditInputName() . '" value=' . $this->getValue() . '>';
     }
     return $html;
 }
开发者ID:lithium-li,项目名称:digitalwand.admin_helper,代码行数:15,代码来源:FileWidget.php

示例2: GetPropertyFieldHtml

 function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName)
 {
     global $APPLICATION;
     if (strLen(trim($strHTMLControlName["FORM_NAME"])) <= 0) {
         $strHTMLControlName["FORM_NAME"] = "form_element";
     }
     $name = preg_replace("/[^a-zA-Z0-9_]/i", "x", htmlspecialcharsbx($strHTMLControlName["VALUE"]));
     if (is_array($value["VALUE"])) {
         $value["VALUE"] = $value["VALUE"]["VALUE"];
         $value["DESCRIPTION"] = $value["DESCRIPTION"]["VALUE"];
     }
     if ($strHTMLControlName["MODE"] == "FORM_FILL" && CModule::IncludeModule('fileman')) {
         return CFileInput::Show($strHTMLControlName["VALUE"], $value["VALUE"], array("PATH" => "Y", "IMAGE" => "N", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))), array('upload' => false, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => $arProperty["WITH_DESCRIPTION"] == "Y" ? array("VALUE" => $value["DESCRIPTION"], "NAME" => $strHTMLControlName["DESCRIPTION"]) : false));
     } else {
         $return = '<input type="text" name="' . htmlspecialcharsbx($strHTMLControlName["VALUE"]) . '" id="' . $name . '" size="' . $arProperty["COL_COUNT"] . '" value="' . htmlspecialcharsEx($value["VALUE"]) . '">';
         if ($arProperty["WITH_DESCRIPTION"] == "Y" && '' != trim($strHTMLControlName["DESCRIPTION"])) {
             $return .= ' <span title="' . GetMessage("IBLOCK_PROP_FILEMAN_DESCRIPTION_TITLE") . '">' . GetMessage("IBLOCK_PROP_FILEMAN_DESCRIPTION_LABEL") . ':<input name="' . htmlspecialcharsEx($strHTMLControlName["DESCRIPTION"]) . '" value="' . htmlspecialcharsEx($value["DESCRIPTION"]) . '" size="18" type="text"></span>';
         }
         return $return;
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:21,代码来源:prop_fileman.php

示例3: InputFile

 public static function InputFile($strInputName, $strImageID = "", $showInfo = false, $fileInput = false, $servInput = false, $pathInput = false, $descInput = false, $delInput = false, $scaleIcon = false, $cloudInput = false)
 {
     return CFileInput::Show($strInputName, $strImageID, $showInfo, array('upload' => $fileInput, 'medialib' => $pathInput, 'file_dialog' => $servInput, 'cloud' => $cloudInput, 'del' => $delInput, 'description' => $descInput));
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:4,代码来源:medialib.php

示例4: array

         if (!array_key_exists($ar["ID"], $arProperties)) {
             $arProperties[$ar["ID"]] = array();
         }
         if ($ar["PROPERTY_TYPE"] === "L") {
             $arProperties[$ar["ID"]][$ar["PROPERTY_VALUE_ID"]] = $ar["VALUE_ENUM"];
         } else {
             $arProperties[$ar["ID"]][$ar["PROPERTY_VALUE_ID"]] = $ar["VALUE"];
         }
     }
 }
 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;
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:cat_store_product_search.php

示例5: GetMessage

">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick2()"></td>
	</tr>
	<tr class="heading">
		<td colspan="2"><?php 
        echo GetMessage("IB_E_DESCRIPTION");
        ?>
</td>
	</tr>
	<tr class="adm-detail-file-row">
		<td class="adm-detail-valign-top"><?php 
        echo GetMessage("IB_E_PICTURE");
        ?>
</td>
		<td>
			<?php 
        echo CFileInput::Show('PICTURE', $str_PICTURE, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))), array('upload' => true, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => true, 'description' => false));
        ?>
		</td>
	</tr>
	<?php 
        if (COption::GetOptionString("iblock", "use_htmledit", "Y") == "Y" && CModule::IncludeModule("fileman")) {
            ?>
		<tr>
			<td colspan="2" align="center">
				<?php 
            CFileMan::AddHTMLEditorFrame("DESCRIPTION", $str_DESCRIPTION, "DESCRIPTION_TYPE", $str_DESCRIPTION_TYPE, array('height' => 450, 'width' => '100%'));
            ?>
			</td>
		</tr>
	<?php 
        } else {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.php

示例6: array

						"W" => COption::GetOptionString("iblock", "detail_image_size"),
						"H" => COption::GetOptionString("iblock", "detail_image_size"),
					),
				));
				?>
			<?else:?>
				<?echo CFileInput::Show("DETAIL_PICTURE", ($ID > 0 && !$bCopy? $str_DETAIL_PICTURE: 0),
					array(
						"IMAGE" => "Y",
						"PATH" => "Y",
						"FILE_SIZE" => "Y",
						"DIMENSIONS" => "Y",
						"IMAGE_POPUP" => "Y",
						"MAX_SIZE" => array(
							"W" => COption::GetOptionString("iblock", "detail_image_size"),
							"H" => COption::GetOptionString("iblock", "detail_image_size"),
						),
					), array(
						'upload' => true,
						'medialib' => true,
						'file_dialog' => true,
						'cloud' => true,
						'del' => true,
						'description' => true,
					)
				);
				?>
			<?endif?>
		</td>
	</tr>
<?
$tabControl->EndCustomField("DETAIL_PICTURE", "");
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:32,代码来源:iblock_element_edit.php

示例7: getImageField

function getImageField($property_value_id, $property_value)
{
    $res = CFileInput::Show('NO_FIELDS[' . $property_value_id . ']', $property_value, array('IMAGE' => 'Y', 'PATH' => false, 'FILE_SIZE' => false, 'DIMENSIONS' => false, 'IMAGE_POPUP' => false, 'MAX_SIZE' => array('W' => 50, 'H' => 50), 'MIN_SIZE' => array('W' => 1, 'H' => 1)), array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false));
    $res = preg_replace('!<script[^>]*>.*</script>!isU', '', $res);
    return $res;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:6,代码来源:template.php

示例8: GetMessage

">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick2()"></td>
	</tr>
	<tr class="heading">
		<td colspan="2"><?php 
        echo GetMessage("IB_E_DESCRIPTION");
        ?>
</td>
	</tr>
	<tr class="adm-detail-file-row">
		<td class="adm-detail-valign-top"><?php 
        echo GetMessage("IB_E_PICTURE");
        ?>
</td>
		<td>
			<?php 
        echo CFileInput::Show('PICTURE', $str_PICTURE, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => 200, "H" => 200)), array('upload' => true, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => true, 'description' => false));
        ?>
		</td>
	</tr>
	<?php 
        if (COption::GetOptionString("iblock", "use_htmledit", "Y") == "Y" && CModule::IncludeModule("fileman")) {
            ?>
		<tr>
			<td colspan="2" align="center">
				<?php 
            CFileMan::AddHTMLEditorFrame("DESCRIPTION", $str_DESCRIPTION, "DESCRIPTION_TYPE", $str_DESCRIPTION_TYPE, array('height' => 450, 'width' => '100%'));
            ?>
			</td>
		</tr>
	<?php 
        } else {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_edit.php

示例9: fShowFilePropertyField

function fShowFilePropertyField($name, $property_fields, $values, $max_file_size_show=50000)
{
	global $crmMode;
	$disableFiles = (isset($crmMode) && $crmMode);
	$res = "";
	if (CModule::IncludeModule('fileman'))
	{
		if (!is_array($values) || empty($values))
			$values = array("n0" => 0);

		if ($property_fields["MULTIPLE"] == "N")
		{
			foreach($values as $key => $val)
			{
				if(is_array($val))
					$file_id = $val["VALUE"];
				else
					$file_id = $val;

				$res = CFileInput::Show(
					$name."[".$key."]",
					$file_id,
					array(
						"IMAGE" => "Y",
						"PATH" => "Y",
						"FILE_SIZE" => "Y",
						"DIMENSIONS" => "Y",
						"IMAGE_POPUP" => "Y",
						"MAX_SIZE" => array("W" => 200, "H" => 170),
					),
					array(
						'upload' => !$disableFiles,
						'del' => !$disableFiles,
						'medialib' => false,
						'file_dialog' => false,
						'cloud' => false,
						'description' => false
					)
				);
			}
		}
		else
		{
			$inputName = array();
			foreach($values as $key=>$val)
			{
				if(is_array($val))
					$inputName[$name."[".$key."]"] = $val["VALUE"];
				else
					$inputName[$name."[".$key."]"] = $val;
			}

			$res = CFileInput::ShowMultiple($inputName, $name."[n#IND#]", array(
				"IMAGE" => "Y",
				"PATH" => "Y",
				"FILE_SIZE" => "Y",
				"DIMENSIONS" => "Y",
				"IMAGE_POPUP" => "Y",
				"MAX_SIZE" => array("W" => 200, "H" => 170),
			), false, array(
					'upload' => !$disableFiles,
					'del' => !$disableFiles,
					'medialib' => false,
					'file_dialog' => false,
					'cloud' => false,
					'description' => false
			));
		}
	}

	return $res;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:72,代码来源:admin_tool.php

示例10: Display

	function Display()
	{
		$sDefAction = $sDefTitle = "";
		if(!$this->bEditMode)
		{
			if(!empty($this->link))
			{
				$sDefAction = "BX.adminPanel.Redirect([], '".CUtil::JSEscape($this->link)."', event);";
				$sDefTitle = $this->title;
			}
			else
			{
				$this->aActions = array_values($this->aActions);
				foreach($this->aActions as $action)
				{
					if($action["DEFAULT"] == true)
					{
						$sDefAction = $action["ACTION"]
							? htmlspecialcharsbx($action["ACTION"])
							: "BX.adminPanel.Redirect([], '".CUtil::JSEscape($action["LINK"])."', event)"
						;
						$sDefTitle = (!empty($action["TITLE"])? $action["TITLE"]:$action["TEXT"]);
						break;
					}
				}
			}
		}

		$sMenuItems = "";
		if(!empty($this->aActions))
			$sMenuItems = htmlspecialcharsbx(CAdminPopup::PhpToJavaScript($this->aActions));
?>
<tr class="adm-list-table-row<?php 
echo isset($this->aFeatures["footer"]) && $this->aFeatures["footer"] == true ? ' footer' : '';
echo $this->bEditMode ? ' adm-table-row-active' : '';
?>
"<?php 
echo $sMenuItems != "" ? ' oncontextmenu="return ' . $sMenuItems . ';"' : '';
echo $sDefAction != "" ? ' ondblclick="' . $sDefAction . '"' . (!empty($sDefTitle) ? ' title="' . GetMessage("admin_lib_list_double_click") . ' ' . $sDefTitle . '"' : '') : '';
?>
>
<?

		if(count($this->pList->arActions)>0 || $this->pList->bCanBeEdited):
			$check_id = RandString(5);
?>
	<td class="adm-list-table-cell adm-list-table-checkbox adm-list-table-checkbox-hover<?php 
echo $this->bReadOnly ? ' adm-list-table-checkbox-disabled' : '';
?>
"><input type="checkbox" class="adm-checkbox adm-designed-checkbox" name="ID[]" id="<?php 
echo $this->table_id . "_" . $this->id . "_" . $check_id;
?>
" value="<?php 
echo $this->id;
?>
" autocomplete="off" title="<?php 
echo GetMessage("admin_lib_list_check");
?>
"<?php 
echo $this->bReadOnly ? ' disabled="disabled"' : '';
echo $this->bEditMode ? ' checked="checked" disabled="disabled"' : '';
?>
 /><label class="adm-designed-checkbox-label adm-checkbox" for="<?php 
echo $this->table_id . "_" . $this->id . "_" . $check_id;
?>
"></label></td>
<?
		endif;

		if($this->pList->bShowActions):
			if(!empty($this->aActions)):
?>
	<td class="adm-list-table-cell adm-list-table-popup-block" onclick="BX.adminList.ShowMenu(this.firstChild, this.parentNode.oncontextmenu(), this.parentNode);"><div class="adm-list-table-popup" title="<?php 
echo GetMessage("admin_lib_list_actions_title");
?>
"></div></td>
<?
			else:
?>
	<td class="adm-list-table-cell"></td>
<?
			endif;
		endif;

		end($this->pList->aVisibleHeaders);
		$last_id = key($this->pList->aVisibleHeaders);
		reset($this->pList->aVisibleHeaders);

		$bVarsFromForm = ($this->bEditMode && is_array($this->pList->arUpdateErrorIDs) && in_array($this->id, $this->pList->arUpdateErrorIDs));
		foreach($this->pList->aVisibleHeaders as $id=>$header_props)
		{
			$field = $this->aFields[$id];
			if($this->bEditMode && isset($field["edit"]))
			{
				if($bVarsFromForm && $_REQUEST["FIELDS"])
					$val = $_REQUEST["FIELDS"][$this->id][$id];
				else
					$val = $this->arRes[$id];

				$val_old = $this->arRes[$id];
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:open_bx,代码行数:101,代码来源:admin_lib.php

示例11: _ShowFilePropertyField

function _ShowFilePropertyField($name, $property_fields, $values, $max_file_size_show = 50000, $bVarsFromForm = false)
{
    global $bCopy, $historyId;
    static $maxSize = array();
    if (empty($maxSize)) {
        $detailImageSize = (int) Main\Config\Option::get('iblock', 'detail_image_size');
        $maxSize = array('W' => $detailImageSize, 'H' => $detailImageSize);
        unset($detailImageSize);
    }
    CModule::IncludeModule('fileman');
    $bVarsFromForm = false;
    if (empty($values) || $bCopy || !is_array($values)) {
        $values = array("n0" => 0);
    }
    if ($property_fields["MULTIPLE"] == "N") {
        foreach ($values as $key => $val) {
            if (is_array($val)) {
                $file_id = $val["VALUE"];
            } else {
                $file_id = $val;
            }
            if ($historyId > 0) {
                echo CFileInput::Show($name . "[" . $key . "]", $file_id, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxSize));
            } else {
                echo CFileInput::Show($name . "[" . $key . "]", $file_id, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxSize), array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => $property_fields["WITH_DESCRIPTION"] == "Y"));
            }
            break;
        }
    } else {
        $inputName = array();
        foreach ($values as $key => $val) {
            if (is_array($val)) {
                $inputName[$name . "[" . $key . "]"] = $val["VALUE"];
            } else {
                $inputName[$name . "[" . $key . "]"] = $val;
            }
        }
        if (class_exists('\\Bitrix\\Main\\UI\\FileInput', true)) {
            echo \Bitrix\Main\UI\FileInput::createInstance(array("name" => $name . "[n#IND#]", "id" => $name . "[n#IND#]_" . mt_rand(1, 1000000), "description" => $property_fields["WITH_DESCRIPTION"] == "Y", "allowUpload" => "F", "allowUploadExt" => $property_fields["FILE_TYPE"]) + ($historyId > 0 ? array("delete" => false, "edit" => false) : array("upload" => true, "medialib" => true, "fileDialog" => true, "cloud" => true)))->show($inputName);
        } else {
            if ($historyId > 0) {
                echo CFileInput::ShowMultiple($inputName, $name . "[n#IND#]", array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxSize), false);
            } else {
                echo CFileInput::ShowMultiple($inputName, $name . "[n#IND#]", array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxSize), false, array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => $property_fields["WITH_DESCRIPTION"] == "Y"));
            }
        }
    }
}
开发者ID:Satariall,项目名称:izurit,代码行数:48,代码来源:admin_tools.php

示例12: _ShowFilePropertyField

function _ShowFilePropertyField($name, $property_fields, $values, $max_file_size_show = 50000, $bVarsFromForm = false)
{
    global $bCopy, $historyId;
    CModule::IncludeModule('fileman');
    $bVarsFromForm = false;
    if (!is_array($values) || $bCopy || empty($values)) {
        $values = array("n0" => 0);
    }
    if ($property_fields["MULTIPLE"] == "N") {
        foreach ($values as $key => $val) {
            if (is_array($val)) {
                $file_id = $val["VALUE"];
            } else {
                $file_id = $val;
            }
            if ($historyId > 0) {
                echo CFileInput::Show($name . "[" . $key . "]", $file_id, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))));
            } else {
                echo CFileInput::Show($name . "[" . $key . "]", $file_id, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))), array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => $property_fields["WITH_DESCRIPTION"] == "Y"));
            }
            break;
        }
    } else {
        $inputName = array();
        foreach ($values as $key => $val) {
            if (is_array($val)) {
                $inputName[$name . "[" . $key . "]"] = $val["VALUE"];
            } else {
                $inputName[$name . "[" . $key . "]"] = $val;
            }
        }
        if ($historyId > 0) {
            echo CFileInput::ShowMultiple($inputName, $name . "[n#IND#]", array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))), false);
        } else {
            echo CFileInput::ShowMultiple($inputName, $name . "[n#IND#]", array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"))), false, array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => $property_fields["WITH_DESCRIPTION"] == "Y"));
        }
    }
}
开发者ID:rasuldev,项目名称:torino,代码行数:38,代码来源:admin_tools.php

示例13: _ShowFilePropertyField

function _ShowFilePropertyField($name, $property_fields, $values, $max_file_size_show=50000, $bVarsFromForm = false)
{
	global $bCopy, $historyId;

	CModule::IncludeModule('fileman');
	$bVarsFromForm = false;

	if(!is_array($values) || $bCopy || empty($values))
	{
		$values = array(
			"n0" => 0,
		);
	}

	if($property_fields["MULTIPLE"] == "N")
	{
		foreach($values as $key => $val)
		{
			if(is_array($val))
				$file_id = $val["VALUE"];
			else
				$file_id = $val;

			if($historyId > 0)
				echo CFileInput::Show($name."[".$key."]", $file_id, array(
					"IMAGE" => "Y",
					"PATH" => "Y",
					"FILE_SIZE" => "Y",
					"DIMENSIONS" => "Y",
					"IMAGE_POPUP" => "Y",
					"MAX_SIZE" => array(
						"W" => COption::GetOptionString("iblock", "detail_image_size"),
						"H" => COption::GetOptionString("iblock", "detail_image_size"),
					),
				));
			else
				echo CFileInput::Show($name."[".$key."]", $file_id, array(
					"IMAGE" => "Y",
					"PATH" => "Y",
					"FILE_SIZE" => "Y",
					"DIMENSIONS" => "Y",
					"IMAGE_POPUP" => "Y",
					"MAX_SIZE" => array(
						"W" => COption::GetOptionString("iblock", "detail_image_size"),
						"H" => COption::GetOptionString("iblock", "detail_image_size"),
					),
				), array(
					'upload' => true,
					'medialib' => true,
					'file_dialog' => true,
					'cloud' => true,
					'del' => true,
					'description' => $property_fields["WITH_DESCRIPTION"]=="Y",
				));
			break;
		}
	}
	else
	{
		$inputName = array();
		foreach($values as $key=>$val)
		{
			if(is_array($val))
				$inputName[$name."[".$key."]"] = $val["VALUE"];
			else
				$inputName[$name."[".$key."]"] = $val;
		}

		if (class_exists('\Bitrix\Main\UI\FileInput', true))
		{
			echo \Bitrix\Main\UI\FileInput::createInstance((
				array(
					"name" => $name."[n#IND#]",
					"description" => $property_fields["WITH_DESCRIPTION"]=="Y"
				) + ($historyId > 0 ? array(
					"delete" => false,
					"edit" => false
				) : array(
					"upload" => true,
					"medialib" => true,
					"fileDialog" => true,
					"cloud" => true
				))
			))->show($inputName);
		}
		else if($historyId > 0)
			echo CFileInput::ShowMultiple($inputName, $name."[n#IND#]", array(
				"IMAGE" => "Y",
				"PATH" => "Y",
				"FILE_SIZE" => "Y",
				"DIMENSIONS" => "Y",
				"IMAGE_POPUP" => "Y",
				"MAX_SIZE" => array(
					"W" => COption::GetOptionString("iblock", "detail_image_size"),
					"H" => COption::GetOptionString("iblock", "detail_image_size"),
				),
			), false);
		else
			echo CFileInput::ShowMultiple($inputName, $name."[n#IND#]", array(
				"IMAGE" => "Y",
//.........这里部分代码省略.........
开发者ID:nycmic,项目名称:bittest,代码行数:101,代码来源:admin_tools.php

示例14: genEditHTML

 /**
  * Генерирует HTML для редактирования поля
  * @return mixed
  */
 protected function genEditHTML()
 {
     return \CFileInput::Show($this->getEditInputName('_FILE'), $this->getValue() > 0 ? $this->getValue() : 0, array("IMAGE" => "N", "PATH" => "Y", "FILE_SIZE" => "Y", "ALLOW_UPLOAD" => "I"), array('upload' => true, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => true, 'description' => false));
 }
开发者ID:Reprezo,项目名称:digitalwand.admin_helper,代码行数:8,代码来源:FileWidget.php

示例15: array

		<td width="40%" class="adm-detail-valign-top"><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
		<td width="60%">
			<?php 
        if ($historyId > 0) {
            ?>
				<?php 
            echo CFileInput::Show("DETAIL_PICTURE", $str_DETAIL_PICTURE, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => 200, "H" => 200)));
            ?>
			<?php 
        } else {
            ?>
				<?php 
            echo CFileInput::Show("DETAIL_PICTURE", $ID > 0 && !$bCopy ? $str_DETAIL_PICTURE : 0, array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array("W" => 200, "H" => 200)), array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => true));
            ?>
			<?php 
        }
        ?>
		</td>
	</tr>
<?php 
        $tabControl->EndCustomField("DETAIL_PICTURE", "");
        $tabControl->BeginCustomField("DETAIL_TEXT", GetMessage("IBLOCK_FIELD_DETAIL_TEXT"), $arIBlock["FIELDS"]["DETAIL_TEXT"]["IS_REQUIRED"] === "Y");
        ?>
	<tr class="heading" id="tr_DETAIL_TEXT_LABEL">
		<td colspan="2"><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
</td>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_element_edit.php


注:本文中的CFileInput::Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。