芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/libraries/joomla/html/html/image.php
getTemplate(); // Strip HTML. $alt = html_entity_decode($alt, ENT_COMPAT, 'UTF-8'); if ($altFile) { $src = $altFolder . $altFile; } else if ($altFile == -1) { return ''; } else { $path = JPATH_SITE .'/templates/'. $cur_template .'/images/'. $file; if (!isset($paths[$path])) { if (file_exists(JPATH_SITE .'/templates/'. $cur_template .'/images/'. $file)) { $paths[$path] = 'templates/'. $cur_template .'/images/'. $file; } else { // Outputs only path to image. $paths[$path] = $folder . $file; } } $src = $paths[$path]; } if (substr($src, 0, 1) == "/") { $src = substr_replace($src, '', 0, 1); } // Prepend the base path. $src = JURI::base(true).'/'.$src; // Outputs actual HTML
tag. if ($asTag) { return '
'; } return $src; } /** * Checks to see if an image exists in the current templates image directory * if it does it loads this image. Otherwise the default image is loaded. * Also can be used in conjunction with the menulist param to create the chosen image * load the default or use no image * * @param string $file The file name, eg foobar.png. * @param string $folder The path to the image. * @param integer $altFile Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder. * @param string $altFolder Another path. Only used for the contact us form based on the value of the imagelist param. * @param string $alt Alternative text. * @param array $attribs An associative array of attributes to add. * @param boolean $asTag True (default) to display full tag, false to return just the path. * * @return string The src or the full img tag if $asTag is true. * * @since 11.1 * * @deprecated 12.1 */ public static function administrator($file, $folder = '/images/', $altFile = null, $altFolder = '/images/', $alt = null, $attribs = null, $asTag = true) { $app = JFactory::getApplication(); if (is_array($attribs)) { $attribs = JArrayHelper::toString($attribs); } $cur_template = $app->getTemplate(); // Strip HTML. $alt = html_entity_decode($alt, ENT_COMPAT, 'UTF-8'); if ($altFile) { $image = $altFolder . $altFile; } else if ($altFile == -1) { $image = ''; } else { if (file_exists(JPATH_ADMINISTRATOR .'/templates/'. $cur_template .'/images/'. $file)) { $image = 'templates/'. $cur_template .'/images/'. $file; } else { // Compability with previous versions. if (substr($folder, 0, 14) == "/administrator") { $image = substr($folder, 15) . $file; } else { $image = $folder . $file; } } } if (substr($image, 0, 1) == "/") { $image = substr_replace($image, '', 0, 1); } // Prepend the base path. $image = JURI::base(true).'/'.$image; // Outputs actual HTML
tag. if ($asTag) { $image = '
'; } return $image; } }