/[corp_html]/inc/Smarty.local.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /inc/Smarty.local.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch 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    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26