/[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 by dpavlin, Sat Feb 17 01:09:44 2001 UTC revision 1.2 by dpavlin, Fri Feb 23 13:57:12 2001 UTC
# Line 253  function smarty_func_img() { Line 253  function smarty_func_img() {
253    
254          $f=Array();          $f=Array();
255    
256            global $img_time;
257            if (!isset($img_time)) {
258                    $img_time=time();
259            }
260                    
261    
262          if (isset($dir)) {          if (isset($dir)) {
263                  $tdir=dirname($GLOBALS[SCRIPT_FILENAME])."/$dir";                  $tdir=dirname($GLOBALS[SCRIPT_FILENAME])."/$dir";
264                  $h=opendir($dir);                  $h=opendir($dir);
265                    $pics=0;
266                  while ($tmp = readdir($h)) {                  while ($tmp = readdir($h)) {
267                          if (is_file("$tdir/$tmp")) {                          if (is_file("$tdir/$tmp") && substr($tmp,0,1)!=".") {
268  //                              print "$tdir/$tmp<br>\n";  //                              print "$tdir/$tmp<br>\n";
269                                  $f[]=$tmp;                                  $f[]=$tmp;
270                                    $pics++;
271                          }                          }
272                  }                  }
273                  closedir($h);                  closedir($h);
274  //              $f=shuffle($f);  //              $f=shuffle($f);
275                  $src="$dir/$f[$nr]";                  $ord=($img_time+$nr) % $pics;
276                    $src="$dir/$f[$ord]";
277          }          }
278    
279          $add="";          $add="";

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

  ViewVC Help
Powered by ViewVC 1.1.26