File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/components/bitrix/system.field.view/templates/file/template.php
Back
<? /** * Bitrix Framework * @package bitrix * @subpackage main * @copyright 2001-2013 Bitrix */ /** * Bitrix vars * @param array $arParams * @param array $arResult */ if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); foreach(GetModuleEvents("main", "system.field.view.file", true) as $arEvent) { if(ExecuteModuleEventEx($arEvent, array($arResult, $arParams))) return; } $first = true; foreach ($arResult["VALUE"] as $res): if (!$first): ?><span class="bx-br-separator"><br /></span><? else: $first = false; endif; ?><span class="fields files"><? $arFile = CFile::GetFileArray($res); if($arFile) { if(CFile::IsImage($arFile["SRC"], $arFile["CONTENT_TYPE"])) { echo CFile::ShowImage($arFile, $arParams["FILE_MAX_WIDTH"], $arParams["FILE_MAX_HEIGHT"], "", "", ($arParams["FILE_SHOW_POPUP"]=="Y"), false, 0, 0, $arParams["~URL_TEMPLATE"]); } else { if($arParams["~URL_TEMPLATE"] <> '') { $src = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATE"], array('file_id' => $arFile["ID"])); } else { $src = $arFile["SRC"]; } $src = \Bitrix\Main\Web\Uri::urnEncode($src, "UTF-8"); echo '<a href="'.htmlspecialcharsbx($src).'">'.htmlspecialcharsbx($arFile["FILE_NAME"]).'</a> ('.CFile::FormatSize($arFile["FILE_SIZE"]).')'; } } ?></span><? endforeach; ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings