#!/usr/bin/perl # $ # $ (Cougaindex version 2.6) # $ # $ Simple script with no administration which is used as a default indexer, allows you # $ to customize the layout of directories say for downloading purposes... because the # $ files are generated on the fly it will only display the contents of what is in the # $ specific directory. # $ # $ This code is distributed in the hope that is will be useful but WITHOUT ANY # $ WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAMED. This includes # $ but isn't limited to warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR # $ PURPOSE. The RESELLING of this code is STRICTLY PROHIBITED. # $ # $ $Revision: 2.6 # $ $Author: Paul Williams # $ $Email: paul@rainbow.nwnet.co.uk # $ $URL: http://www.cougasoft.org/ # $ $Created: 05/12/1996 11:01 # $ $Last Modified: 01/04/2000 18:12 # $ # $ Copyright 1996, 1997, 1998, 1999, 2000 Cougasoft. All rights reserved. # $ # $ The http location of the graphics, so the below variable when viewed on # $ your website will look like: http://www.yourdomain.com/cougaindex/icons $imgloc = 'http://www.ulrich-wenger.ch/_icons/'; $imgloc .= "/" if ($imgloc !~ /\/$/); # $ Set the colours for the script to output here, I'm assuming you have either # $ a working or rough knowledge of perl so editing them by hand shouldn't be # $ a problem. If you get errors and have edited it, double check the variables. $BODYTEXT = '#000000'; $BGCOLOR = '#C0C0C0'; $LINK = '#004080'; $VLINK = '#0000A0'; $ALINK = '#0000A0'; $TBCOLOR = '#BABABA'; # $ Colour of the table. $BACKGROUNDGIF = ''; $ENV{'SCRIPT_NAME'} =~ /(.*)\/index[\w\W]+.[\w\W]+$/; # # $-------------------------------------------------------------------------------------------- # # M A I N P R O G R A M # # $-------------------------------------------------------------------------------------------- # print "Content-type: text/html\n\n" . # $ Please don't change this, people also seem to like to alter this which is # $ also a little dis-heartening, especially as its hidden inside the html output. "\n" . "\n" . "
\n" . "\n" . " | Filename | \n" . "Size | \n" . "\n"; print " |
\n" . " | .. | \n" . "- | \n" . "Higher Dir | \n"; print "
\n" . " | $_ | \n" . "- | \n" . "Dir | \n"; print "
\n" . " | %s | \n" . "%d kb | \n" . "%s | \n", $imgloc, $img, $_, $_, int($SIZE / 1024), $type); printf("
"; while ("; close (README); } print "\n"; print "\n"; # # $-------------------------------------------------------------------------------------------- # =========================================================================================== # $-------------------------------------------------------------------------------------------- #) { print ; } print "