/[docman2]/docman.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 /docman.php

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

revision 1.28 by dpavlin, Mon Jul 29 12:17:03 2002 UTC revision 1.29 by dpavlin, Mon Jul 29 12:34:18 2002 UTC
# Line 230  echo($fstr) ; ?></TEXTAREA> Line 230  echo($fstr) ; ?></TEXTAREA>
230          }          }
231          if ( !$file_lock && $ext!="" && strstr(join(' ',$gblImages),$ext) ) {            if ( !$file_lock && $ext!="" && strstr(join(' ',$gblImages),$ext) ) {  
232                  $info  = getimagesize($fsPath) ;                  $info  = getimagesize($fsPath) ;
233                  $tstr = "<IMG SRC=\"$webRoot".urlpath($relPath)."\" BORDER=0 " ;                  $tstr = "<IMG SRC=\"$self?A=V&D=".urlpath(dirname($relPath))."&F=".urlpath(basename($relPath))."\" BORDER=0 " ;
234                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;
235                  $tstr .= (int)(($fsize+1023)/1024) . "Kb\">" ;                  $tstr .= (int)(($fsize+1023)/1024) . "Kb\">" ;
236  //              echo htmlentities($tstr) . "<BR><BR>" . $tstr ;  //              echo htmlentities($tstr) . "<BR><BR>" . $tstr ;
# Line 481  function MockIcon($txt) { Line 481  function MockIcon($txt) {
481    
482  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
483    
484  function GifIcon($txt) {  function GifIcon($txt = "") {
485          global $gblIconLocation ;          global $gblIconLocation, $gblImages ;
486    
487          switch (strtolower($txt)) {          switch (strtolower($txt)) {
         case ".bmp" :  
         case ".gif" :  
         case ".jpg" :  
         case ".jpeg":  
         case ".tif" :  
         case ".tiff":  
                 $d = "image2.gif" ;  
                 break ;  
488          case ".doc" :          case ".doc" :
489                  $d = "layout.gif" ;                  $d = "layout.gif" ;
490                  break ;                  break ;
# Line 570  function GifIcon($txt) { Line 562  function GifIcon($txt) {
562                  $d = "quill.gif";                  $d = "quill.gif";
563                  break;                  break;
564          default :          default :
565                  $d = "generic.gif" ;                  if (in_array(strtolower($txt),$gblImages)) {
566                            $d = "image2.gif" ;
567                    } else {
568                            $d = "generic.gif" ;
569                    }
570          }          }
571    
572    
573          return "<IMG SRC=\"$gblIconLocation" . $d . "\" BORDER=0>" ;          return "<IMG SRC=\"$gblIconLocation" . $d . "\" BORDER=0>" ;
574  } // end function GifIcon  } // end function GifIcon
575    

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.26