update
This commit is contained in:
34
core/plugins/Smarty/function.imgformat.php
Normal file
34
core/plugins/Smarty/function.imgformat.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* File: function.imgformat.php
|
||||
* Type: function
|
||||
* Name:
|
||||
* Purpose:
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function smarty_function_imgformat($param, &$smarty)
|
||||
{
|
||||
$out = '';
|
||||
if(isset($param['name'])) {
|
||||
if(Mailer::$attachImages) {
|
||||
$imgContainer = Registry::Get(Mailer::$c_name);
|
||||
if(empty($imgContainer)) {
|
||||
$imgContainer = array();
|
||||
}
|
||||
$nn = md5($param['name']);
|
||||
$imgContainer[] = array('img' => $param['name'], 'name' => $nn);
|
||||
$out = 'cid:'.$nn;
|
||||
Registry::Set(Mailer::$c_name, $imgContainer);
|
||||
} else {
|
||||
$out = URL_STATIC_CONTENT . '/image/' . $param['name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user