• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/classes/general/listfile.php
  • Класс: CListFile
  • Вызов: CListFile::GetInfoHTML
function GetInfoHTML($params = array())
{
	$html = '';

	if(is_array($this->_file))
	{
		$intWidth = $this->_width;
		$intHeight = $this->_height;
		$img_src = '';
		$divId = '';
		if (isset($params['url_template']))
		{
			$img_src = $this->GetImgSrc(array('url_template' => $params['url_template']));
			if ($img_src)
			{
				self::$_counter++;
				$divId = 'lists-image-info-'.self::$_counter;
			}
		}

		$attributes = ItemAttributes::buildByFileData($this->_file, $img_src);
		$attributes->setTitle($this->_file['FILE_NAME']);

		if ($divId)
		{
			$html .= '
'; } else { $html .= '
'; } if (isset($params['view']) && $params['view'] == 'short') { $info = $this->_file["ORIGINAL_NAME"].' ('; if($intWidth > 0 && $intHeight > 0) { $info .= $intWidth.'x'.$intHeight.', '; } $info .= CFile::FormatSize($this->_file['FILE_SIZE']).')'; $html .= GetMessage('FILE_TEXT').': '.htmlspecialcharsex($info).''; } else { $html .= GetMessage('FILE_TEXT').': '.htmlspecialcharsex($this->_file["ORIGINAL_NAME"]).''; if($intWidth > 0 && $intHeight > 0) { $html .= '
'.GetMessage('FILE_WIDTH').': '.$intWidth; $html .= '
'.GetMessage('FILE_HEIGHT').': '.$intHeight; } $html .= '
'.GetMessage('FILE_SIZE').': '.CFile::FormatSize($this->_file['FILE_SIZE']); } $html .= '
'; } return $html; }