# ---------------- # show file list # ---------------- sub show_list { print "\n" ; print "\n"; foreach $file (<*>){ $time = localtime((stat($file))[$ST_MTIME]); $size = ((stat($file))[$ST_SIZE]); chomp($file); if ( $file =~ /\~$/ ) { next ; } if ( $file =~ /^RCS/ ) { next ; } if ( $file =~ /cgi$/ ) { next ; } if ( $file =~ /^list$/ ) { next ;} if ( $file =~ /.shtml$/ ) { next ;} if ( $file =~ /^#.*#$/ ) { next ;} print ""; print " "; print " "; print " \n";} print "
nameComma
separated
Last UpdateBytes
$file(no frame)(CSV)$time$size
" ;} sub header { my($title) = $_[0]; print &PrintHeader; print < $title HEADER } # # show other pointers in Title area # sub pointer { # get and initilize font related parameter $font0 = $ARGUMENT; $font1 = $ARGUMENT; $font2 = $ARGUMENT; $frameN = $ARGUMENT; $frameY = $ARGUMENT; # if already included, edit them if ( $ARGUMENT =~ /fontsize/i ) { $font0 =~ s/fontsize=[^&]+//; $font1 =~ s/fontsize=[^&]+//; $font1 .= '&fontsize=-1'; $font2 =~ s/fontsize=[^&]+//; $font2 .= '&fontsize=-2';} # if not included, add font parameter else { $font0 .= ''; $font1 .= '&fontsize=-1'; $font2 .= '&fontsize=-2'; } if ( $ARGUMENT =~ /frame/i ) { $frameN =~ s/frame=YES/frame=no/i; $frameY =~ s/frame=NO/frame=yes/i; } else { $frameN .= '&frame=no' ; $frameY .= '&frame=yes' ; } # show them, print "Index | "; print "help\n"; print "(Font "; print "Normal | "; print "-1 | "; print "-2 ) "; print "frame ( "; print "+ | "; print "-) "; print "
"; print "Filename: ($FILE), "; $time = localtime((stat($FILE))[$ST_MTIME]); print "Last update: $time
\n"; } sub usage { header('Database list'); print < Database to TABLE conversion tool in cgi No argument show list file=filename process file (filename) width=nn set column width nn ( for example width=66 ) frame=no no frame and no counting number help=yes show this message format=plain show original plain format ( for copying ) (delimit URI and parameter by ?, delimit paramemters by & ) for example. $URI?file=telephone.txt&frame=no HELPHELP exit; } 1; __END__