Parent Directory | Revision Log | Patch
revision 1.2 by dpavlin, Mon Mar 12 23:41:29 2001 UTC | revision 1.3 by dpavlin, Sat Mar 17 15:46:05 2001 UTC | |
---|---|---|
# | Line 104 function smarty_func_html_checkboxes() | Line 104 function smarty_func_html_checkboxes() |
104 | return $html_result; | return $html_result; |
105 | } | } |
106 | ||
107 | // filesize | |
108 | ||
109 | function smarty_mod_filesize($file,$unit) | |
110 | { | |
111 | $path=dirname($GLOBALS[SCRIPT_FILENAME])."/$file"; | |
112 | print "-- $path --"; | |
113 | ||
114 | if ($size=filesize($path)) { | |
115 | switch ($unit) { | |
116 | case 'Mb': | |
117 | case 'mb': | |
118 | return sprintf("%02.1d Mb",$size/(1024*1024)); | |
119 | case 'Kb': | |
120 | case 'kb': | |
121 | return sprintf("%02.1d Mb",$size/1024); | |
122 | } | |
123 | return $size; | |
124 | } | |
125 | } | |
126 | ||
127 | ?> | ?> |
128 |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |