15 |
function smarty_func_img() { |
function smarty_func_img() { |
16 |
extract(func_get_arg(0)); |
extract(func_get_arg(0)); |
17 |
|
|
18 |
$f=Array(); |
$f = array(); |
19 |
|
|
20 |
global $img_time; |
global $img_time; |
21 |
if (!isset($img_time)) { |
if (!isset($img_time)) { |
22 |
$img_time=time(); |
$img_time=time(); |
23 |
} |
} |
24 |
|
|
|
|
|
25 |
if (isset($dir)) { |
if (isset($dir)) { |
26 |
$tdir=dir2path($dir); |
$tdir=dir2path($dir); |
27 |
$h=opendir($dir); |
$h=opendir($dir); |
142 |
} |
} |
143 |
} |
} |
144 |
|
|
145 |
|
// pic_url|js_popup:"dir_reference" |
146 |
|
|
147 |
|
function smarty_mod_js_popup($pic, $dir) { |
148 |
|
if ($dir) { global ${$dir}; $pic = ${$dir}."/".$pic; } |
149 |
|
if ($pic) { |
150 |
|
@$size = GetImageSize($pic); |
151 |
|
list($w, $h) = array($size[0], $size[1]); |
152 |
|
} |
153 |
|
$opts = array("scrollbar=no", "menu=no", "personal=no"); |
154 |
|
// KLUDGY!!! I have to somehow include the window chrome (ie. |
155 |
|
// decorations: titlebar, borders...) when calculating |
156 |
|
/// width/height... |
157 |
|
if ($w) array_push($opts, "width=".($w + 6)); |
158 |
|
if ($h) array_push($opts, "height=".($h + 25)); |
159 |
|
return "with (window.open(this.href, this.target, '".implode(',', $opts)."')) { }; return false;"; |
160 |
|
} |
161 |
|
|
162 |
// input functions (input, rinput) |
// input functions (input, rinput) |
163 |
|
|
164 |
function smarty_func_input() { |
function smarty_func_input() { |