/[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.1 by dpavlin, Sat Mar 3 12:56:17 2001 UTC revision 1.3 by dpavlin, Sat Mar 17 15:46:05 2001 UTC
# Line 48  function smarty_func_img() { Line 48  function smarty_func_img() {
48                  $add.=" vspace=\"$vspace\"";                  $add.=" vspace=\"$vspace\"";
49          }          }
50    
51            $out="";
52            $product_link = array (
53    "andol.gif"=>"human_health.php?search=andol&show_description=on#results",
54    "andol_c.jpg"=>"human_health.php?search=andol%25c&show_description=on#results",
55    "bisolex.jpg"=>"human_health.php?search=bisolex&show_description=on#results",
56    "plibex.gif"=>"human_health.php?search=plibex&show_description=on#results",
57    "plivit_b.gif"=>"human_health.php?search=plivit%25b&show_description=on#results",
58    "plivit_b6.gif"=>"human_health.php?search=plivit%25b6&show_description=on#results",
59    "plivit_c.gif"=>"human_health.php?search=plivit%25c&show_description=on#results",
60            );
61    
62            $pic=basename($src);
63            if ($product_link[$pic]) {
64                    $out.="<a href=\"$product_link[$pic]\">";
65                    $add.=" border=\"0\"";
66            }
67    
68          $size = GetImageSize(dirname($GLOBALS[SCRIPT_FILENAME])."/$src");          $size = GetImageSize(dirname($GLOBALS[SCRIPT_FILENAME])."/$src");
69          print "<img src=\"$src\" $size[3]$add>";          $out.="<img src=\"$src\" $size[3]$add>";
70            if ($product_link[$pic]) {
71                    $out.="</a>";
72            }
73            print $out;
74  }  }
75    
76  // checkboxes  // checkboxes
# Line 83  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.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26