/
home
/
techb158
/
exp.abdallabala.com
/
vendor
/
smarty
/
smarty
/
libs
/
plugins
/
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins
mkdir
upload
Name
Size
Mode
Actions
block.textformat.php
3664
0644
edit
dl
rm
function.counter.php
1823
0644
edit
dl
rm
function.cycle.php
3308
0644
edit
dl
rm
function.fetch.php
8068
0644
edit
dl
rm
function.html_checkboxes.php
9592
0644
edit
dl
rm
function.html_image.php
5668
0644
edit
dl
rm
function.html_options.php
8246
0644
edit
dl
rm
function.html_radios.php
8434
0644
edit
dl
rm
function.html_select_date.php
15183
0644
edit
dl
rm
function.html_select_time.php
14375
0644
edit
dl
rm
function.html_table.php
5375
0644
edit
dl
rm
function.mailto.php
5386
0644
edit
dl
rm
function.math.php
3785
0644
edit
dl
rm
modifier.capitalize.php
4211
0644
edit
dl
rm
modifier.date_format.php
2691
0644
edit
dl
rm
modifier.debug_print_var.php
3929
0644
edit
dl
rm
modifier.escape.php
9669
0644
edit
dl
rm
modifier.mb_wordwrap.php
2346
0644
edit
dl
rm
modifier.regex_replace.php
1657
0644
edit
dl
rm
modifier.replace.php
999
0644
edit
dl
rm
modifier.spacify.php
756
0644
edit
dl
rm
modifier.truncate.php
2231
0644
edit
dl
rm
modifiercompiler.cat.php
612
0644
edit
dl
rm
modifiercompiler.count_characters.php
918
0644
edit
dl
rm
modifiercompiler.count_paragraphs.php
659
0644
edit
dl
rm
modifiercompiler.count_sentences.php
745
0644
edit
dl
rm
modifiercompiler.count_words.php
979
0644
edit
dl
rm
modifiercompiler.default.php
770
0644
edit
dl
rm
modifiercompiler.escape.php
5125
0644
edit
dl
rm
modifiercompiler.from_charset.php
752
0644
edit
dl
rm
modifiercompiler.indent.php
712
0644
edit
dl
rm
modifiercompiler.lower.php
724
0644
edit
dl
rm
modifiercompiler.noprint.php
340
0644
edit
dl
rm
modifiercompiler.string_format.php
574
0644
edit
dl
rm
modifiercompiler.strip.php
798
0644
edit
dl
rm
modifiercompiler.strip_tags.php
720
0644
edit
dl
rm
modifiercompiler.to_charset.php
746
0644
edit
dl
rm
modifiercompiler.unescape.php
1190
0644
edit
dl
rm
modifiercompiler.upper.php
678
0644
edit
dl
rm
modifiercompiler.wordwrap.php
1112
0644
edit
dl
rm
outputfilter.trimwhitespace.php
3777
0644
edit
dl
rm
shared.escape_special_chars.php
977
0644
edit
dl
rm
shared.literal_compiler_param.php
1047
0644
edit
dl
rm
shared.make_timestamp.php
1483
0644
edit
dl
rm
shared.mb_str_replace.php
1790
0644
edit
dl
rm
shared.mb_unicode.php
1530
0644
edit
dl
rm
variablefilter.htmlspecialchars.php
451
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins/function.html_image.php
(5668B)
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction */ /** * Smarty {html_image} function plugin * Type: function * Name: html_image * Date: Feb 24, 2003 * Purpose: format HTML tags for the image * Examples: {html_image file="/images/masthead.gif"} * Output: <img src="/images/masthead.gif" width=400 height=23> * Params: * * - file - (required) - file (and path) of image * - height - (optional) - image height (default actual height) * - width - (optional) - image width (default actual width) * - basedir - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT * - path_prefix - prefix for path output (optional, default empty) * * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image} * (Smarty online manual) * @author Monte Ohrt <monte at ohrt dot com> * @author credits to Duda <duda@big.hu> * @version 1.0 * * @param array $params parameters * @param Smarty_Internal_Template $template template object * * @throws SmartyException * @return string * @uses smarty_function_escape_special_chars() */ function smarty_function_html_image($params, Smarty_Internal_Template $template) { $template->_checkPlugins( array( array( 'function' => 'smarty_function_escape_special_chars', 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php' ) ) ); $alt = ''; $file = ''; $height = ''; $width = ''; $extra = ''; $prefix = ''; $suffix = ''; $path_prefix = ''; $basedir = isset($_SERVER[ 'DOCUMENT_ROOT' ]) ? $_SERVER[ 'DOCUMENT_ROOT' ] : ''; foreach ($params as $_key => $_val) { switch ($_key) { case 'file': case 'height': case 'width': case 'dpi': case 'path_prefix': case 'basedir': $$_key = $_val; break; case 'alt': if (!is_array($_val)) { $$_key = smarty_function_escape_special_chars($_val); } else { throw new SmartyException( "html_image: extra attribute '{$_key}' cannot be an array", E_USER_NOTICE ); } break; case 'link': case 'href': $prefix = '<a href="' . $_val . '">'; $suffix = '</a>'; break; default: if (!is_array($_val)) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; } else { throw new SmartyException( "html_image: extra attribute '{$_key}' cannot be an array", E_USER_NOTICE ); } break; } } if (empty($file)) { trigger_error('html_image: missing \'file\' parameter', E_USER_NOTICE); return; } if ($file[ 0 ] === '/') { $_image_path = $basedir . $file; } else { $_image_path = $file; } // strip file protocol if (stripos($params[ 'file' ], 'file://') === 0) { $params[ 'file' ] = substr($params[ 'file' ], 7); } $protocol = strpos($params[ 'file' ], '://'); if ($protocol !== false) { $protocol = strtolower(substr($params[ 'file' ], 0, $protocol)); } if (isset($template->smarty->security_policy)) { if ($protocol) { // remote resource (or php stream, …) if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) { return; } } else { // local file if (!$template->smarty->security_policy->isTrustedResourceDir($_image_path)) { return; } } } if (!isset($params[ 'width' ]) || !isset($params[ 'height' ])) { // FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader! if (!$_image_data = @getimagesize($_image_path)) { if (!file_exists($_image_path)) { trigger_error("html_image: unable to find '{$_image_path}'", E_USER_NOTICE); return; } elseif (!is_readable($_image_path)) { trigger_error("html_image: unable to read '{$_image_path}'", E_USER_NOTICE); return; } else { trigger_error("html_image: '{$_image_path}' is not a valid image file", E_USER_NOTICE); return; } } if (!isset($params[ 'width' ])) { $width = $_image_data[ 0 ]; } if (!isset($params[ 'height' ])) { $height = $_image_data[ 1 ]; } } if (isset($params[ 'dpi' ])) { if (strstr($_SERVER[ 'HTTP_USER_AGENT' ], 'Mac')) { // FIXME: (rodneyrehm) wrong dpi assumption // don't know who thought this up… even if it was true in 1998, it's definitely wrong in 2011. $dpi_default = 72; } else { $dpi_default = 96; } $_resize = $dpi_default / $params[ 'dpi' ]; $width = round($width * $_resize); $height = round($height * $_resize); } return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' . $height . '"' . $extra . ' />' . $suffix; }
Save
cmd:
run