本文整理汇总了PHP中CFileInput类的典型用法代码示例。如果您正苦于以下问题:PHP CFileInput类的具体用法?PHP CFileInput怎么用?PHP CFileInput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFileInput类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:lithium-li,项目名称:digitalwand.admin_helper,代码行数:28,代码来源: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: 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>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:mailing_wizard.php
示例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", "");
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:32,代码来源:iblock_element_edit.php
示例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 {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_edit.php
示例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";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:30,代码来源:iblock_sub_generator.ajax.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;
}
开发者ID:webgksupport,项目名称:alpina,代码行数:7,代码来源:template.php
示例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;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:6,代码来源:template.php
示例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"));
}
}
}
开发者ID:rasuldev,项目名称:torino,代码行数:38,代码来源:admin_tools.php
示例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 {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.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 (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
示例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));
}
开发者ID:Reprezo,项目名称:digitalwand.admin_helper,代码行数:8,代码来源:FileWidget.php
示例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>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_element_edit.php
示例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;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:72,代码来源:admin_tool.php
示例16: 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
示例17: Display
//.........这里部分代码省略.........
if(is_array($val_old))
{
foreach($val_old as $k=>$v)
echo '<input type="hidden" name="FIELDS_OLD['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']['.htmlspecialcharsbx($k).']" value="'.htmlspecialcharsbx($v).'">';
}
else
{
echo '<input type="hidden" name="FIELDS_OLD['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']" value="'.htmlspecialcharsbx($val_old).'">';
}
switch($field["edit"]["type"])
{
case "checkbox":
echo '<input type="hidden" name="FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']" value="N">';
echo '<input type="checkbox" name="FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']" value="Y"'.($val=='Y'?' checked':'').'>';
break;
case "select":
echo '<select name="FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']"'.$this->__AttrGen($field["edit"]["attributes"]).'>';
foreach($field["edit"]["values"] as $k=>$v)
echo '<option value="'.htmlspecialcharsbx($k).'" '.($k==$val?' selected':'').'>'.htmlspecialcharsbx($v).'</option>';
echo '</select>';
break;
case "input":
if(!$field["edit"]["attributes"]["size"])
$field["edit"]["attributes"]["size"] = "10";
echo '<input type="text" '.$this->__AttrGen($field["edit"]["attributes"]).' name="FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']" value="'.htmlspecialcharsbx($val).'">';
break;
case "calendar":
if(!$field["edit"]["attributes"]["size"])
$field["edit"]["attributes"]["size"] = "10";
echo '<span style="white-space:nowrap;"><input type="text" '.$this->__AttrGen($field["edit"]["attributes"]).' name="FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']" value="'.htmlspecialcharsbx($val).'">';
echo CAdminCalendar::Calendar('FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']').'</span>';
break;
case "file":
echo CFileInput::Show(
'FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']',
$val,
$field["edit"]["showInfo"],
$field["edit"]["inputs"]
);
break;
default:
echo $field["edit"]['value'];
}
echo '</td>';
}
else
{
if(!is_array($this->arRes[$id]))
$val = trim($this->arRes[$id]);
else
$val = $this->arRes[$id];
if(isset($field["view"]))
{
switch($field["view"]["type"])
{
case "checkbox":
if($val=='Y')
$val = htmlspecialcharsex(GetMessage("admin_lib_list_yes"));
else
$val = htmlspecialcharsex(GetMessage("admin_lib_list_no"));
break;
case "select":
if($field["edit"]["values"][$val])
$val = htmlspecialcharsex($field["edit"]["values"][$val]);
break;
开发者ID:ASDAFF,项目名称:open_bx,代码行数:67,代码来源:admin_lib.php
示例18: 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
示例19: Display
//.........这里部分代码省略.........
$bVarsFromForm = $this->bEditMode && is_array($this->pList->arUpdateErrorIDs) && in_array($this->id, $this->pList->arUpdateErrorIDs);
foreach ($this->aHeaders as $id => $header_props) {
if (!in_array($id, $this->pList->arVisibleColumns)) {
continue;
}
$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];
echo '<td class="adm-list-table-cell', isset($header_props['align']) && $header_props['align'] ? ' align-' . $header_props['align'] : '', isset($header_props['valign']) && $header_props['valign'] ? ' valign-' . $header_props['valign'] : '', $id === $last_id ? ' adm-list-table-cell-last' : '', '">';
if (is_array($val_old)) {
foreach ($val_old as $k => $v) {
echo '<input type="hidden" name="FIELDS_OLD[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . '][' . htmlspecialcharsbx($k) . ']" value="' . htmlspecialcharsbx($v) . '">';
}
} else {
|
请发表评论