/[corp_html]/inc/Smarty.addons.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.addons.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by dpavlin, Sat Feb 17 01:09:44 2001 UTC revision 1.4 by dpavlin, Thu Apr 12 20:36:12 2001 UTC
# Line 245  function smarty_func_html_select_date() Line 245  function smarty_func_html_select_date()
245          print $html_result;          print $html_result;
246  }  }
247    
 //-----------------------------------------  
 // Custom made by Dobrica Pavlinusic <dpavlin@rot13.org>  
   
 function smarty_func_img() {  
         extract(func_get_arg(0));  
   
         $f=Array();  
   
         if (isset($dir)) {  
                 $tdir=dirname($GLOBALS[SCRIPT_FILENAME])."/$dir";  
                 $h=opendir($dir);  
                 while ($tmp = readdir($h)) {  
                         if (is_file("$tdir/$tmp")) {  
 //                              print "$tdir/$tmp<br>\n";  
                                 $f[]=$tmp;  
                         }  
                 }  
                 closedir($h);  
 //              $f=shuffle($f);  
                 $src="$dir/$f[$nr]";  
         }  
   
         $add="";  
         if (isset($border)) {  
                 $add.=" border=\"$border\"";  
         }  
         if (isset($alt)) {  
                 $add.=" alt=\"$alt\"";  
         }  
         if (isset($align)) {  
                 $add.=" align=\"$align\"";  
         }  
         if (isset($hspace)) {  
                 $add.=" hspace=\"$hspace\"";  
         }  
         if (isset($vspace)) {  
                 $add.=" vspace=\"$vspace\"";  
         }  
   
         $size = GetImageSize(dirname($GLOBALS[SCRIPT_FILENAME])."/$src");  
         print "<img src=\"$src\" $size[3]$add>";  
 }  
   
248  ?>  ?>

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26