本文整理汇总了PHP中CFileInput类的典型用法代码示例。如果您正苦于以下问题:PHP CFileInput类的具体用法?PHP CFileInput怎么用?PHP CFileInput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFileInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMultipleEditHtml
/**
* {@inheritdoc}
*/
protected function getMultipleEditHtml()
{
$inputHidden = array();
$inputName = array();
if (!empty($this->data['ID'])) {
$entityName = $this->entityName;
$rsEntityData = $entityName::getList(array('select' => array('REFERENCE_' => $this->getCode() . '.*'), 'filter' => array('=ID' => $this->data['ID'])));
while ($referenceData = $rsEntityData->fetch()) {
$inputName[$this->code . '[' . $referenceData['REFERENCE_ID'] . ']'] = $referenceData['REFERENCE_VALUE'];
$inputHidden[$referenceData['REFERENCE_ID']] = $referenceData['REFERENCE_VALUE'];
}
}
if (class_exists('\\Bitrix\\Main\\UI\\FileInput', true) && $this->getSettings('IMAGE') === true) {
$html = \Bitrix\Main\UI\FileInput::createInstance(array('name' => $this->code . '[n#IND#]', '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')))->show($inputName);
} else {
$html = \CFileInput::ShowMultiple($inputName, $this->code . '[n#IND#]', array('IMAGE' => $this->getSettings('IMAGE') === true ? 'Y' : 'N', 'PATH' => 'Y', 'FILE_SIZE' => 'Y', 'DIMENSIONS' => 'Y', 'IMAGE_POPUP' => 'Y'), false, 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')));
}
foreach ($inputHidden as $key => $input) {
if (!empty($input)) {
$html .= '<input type="hidden" name="' . $this->code . '[' . $key . '][ID]" value=' . $key . '>
<input type="hidden" name="' . $this->code . '[' . $key . '][VALUE]" value=' . $input . '>';
}
}
return $html;
}
示例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;
}
}
示例3: empty
<tr class="hidden-when-show-template-list" <?php
echo empty($str_MESSAGE) ? 'style="display: none;"' : '';
?>
>
<td class="adm-detail-valign-top"><?php
echo GetMessage("sender_chain_edit_field_attachment");
?>
:</td>
<td>
<?php
$arInputControlValues = array();
foreach ($arMailngChainAttachment as $arFile) {
$arInputControlValues["FILES[" . $arFile["ID"] . "]"] = $arFile["ID"];
}
\Bitrix\Main\Loader::includeModule("fileman");
echo CFileInput::ShowMultiple($arInputControlValues, "NEW_FILE[n#IND#]", array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y"), false, array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => false));
?>
</td>
</tr>
</table>
<?php
} elseif ($step == 'chain_send_type') {
?>
<table class="adm-detail-content-table edit-table">
<tr>
<td colspan="2">
<p class="adm-white-container-p"><?php
echo GetMessage("sender_chain_edit_field_send_type_desc");
?>
</p>
</td>
示例4: 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", "");
示例5: GetMessage
"> <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 {
示例6: define
define('STOP_STATISTICS', true);
define('NO_AGENT_CHECK', true);
define('DisableEventsCheck', true);
define('BX_SECURITY_SHOW_MESSAGE', true);
define("PUBLIC_AJAX_MODE", true);
define("NOT_CHECK_PERMISSIONS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/iblock/admin_tools.php";
IncludeModuleLangFile(__FILE__);
header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
if (!CModule::includeModule("iblock") || !CModule::includeModule('fileman')) {
die;
}
CUtil::jSPostUnescape();
if (check_bitrix_sessid()) {
if ($_POST['GET_INPUT'] == 'Y') {
$APPLICATION->RestartBuffer();
if ($_POST['PROPERTY_ID'] == "DETAIL" || $_POST['PROPERTY_ID'] == "ANNOUNCE") {
echo CFileInput::show('PROP[' . $_POST['PROPERTY_ID'] . '][' . $_POST['ROW_ID'] . ']', array(), 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"));
}
$properties = CIBlockProperty::getList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "ID" => $_POST["PROPERTY_ID"], "CHECK_PERMISSIONS" => "N"));
if ($prop_fields = $properties->Fetch()) {
$prop_fields["VALUE"] = array();
$prop_fields["~VALUE"] = array();
_ShowPropertyField('PROP[' . $prop_fields["ID"] . '][' . $_POST['ROW_ID'] . ']', $prop_fields, $prop_fields["VALUE"], false, false, 50000, 'iblock_generator_form');
}
exit;
}
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
示例7: getImageField
function getImageField($property_value_id, $property_value)
{
global $viewFileParams;
$res = CFileInput::Show('NO_FIELDS[' . $property_value_id . ']', $property_value, $viewFileParams, array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false));
$res = preg_replace('!<script[^>]*>.*</script>!isU', '', $res);
return $res;
}
示例8: 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;
}
示例9: _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"));
}
}
}
示例10: GetMessage
"> <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 {
示例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"));
}
}
}
}
示例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 (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",
//.........这里部分代码省略.........
示例13: 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));
}
示例14: 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>
示例15: 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;
}