01 |
function thumb($imgurl, $width, $height, $ bg = true ) |
03 |
global $cfg_mainsite,$cfg_multi_site; |
04 |
$thumb = eregi( "" ,$imgurl)?str_replace($cfg_mainsite, '' ,$imgurl):$imgurl; |
05 |
list($thumbname,$extname) = explode( '.' ,$thumb); |
06 |
$newthumb = $thumbname. '_' .$width. '_' .$height. '.' .$extname; |
07 |
if (!$thumbname || !$extname || !file_exists(DEDEROOT.$thumb)) return $imgurl; |
08 |
if (!file_exists(DEDEROOT.$newthumb)) |
10 |
include_once DEDEINC. '/image.func.php' ; |
13 |
ImageResizeNew(DEDEROOT.$thumb, $width, $height, DEDEROOT.$newthumb); |
17 |
ImageResize(DEDEROOT.$thumb, $width, $height, DEDEROOT.$newthumb); |
20 |
return $cfg_multi_site== 'Y' ?$cfg_mainsite.$newthumb:$newthumb; |
|