#!/usr/bin/perl -wT use CGI::Carp qw(fatalsToBrowser); ############################################################################## # Last Modified script Version 1.0 # # Copyright 2000, UtilMind Solutions info@utilmind.com # # http://www.utilmind.com # # Created 24.XII.1998 Last Modified 24.I.2000 # ############################################################################## # COPYRIGHT NOTICE # # Copyright 2000, UtilMind Solutions All Rights Reserved. # # # # This program is being distributed as shareware. It may be used and # # modified free of charge for personal, academic, government or non-profit # # use, so long as this copyright notice and the header above remain intact. # # Any commercial use should be registered. Please also send us an email, # # and let us know where you are using this script. By using this program # # you agree to indemnify UtilMind Solutuons from any liability. # # # # Selling the code for this program without prior written consent is # # expressly forbidden. Obtain permission before redistributing this # # program over the Internet or in any other medium. In all cases # # copyright and header must remain intact. # # # # Please check the README file for full details on installation # # and registration. # ############################################################################## # Configuration @months = ("January","February","March","April","May","June", "July","August","September","October","November","December"); ################################# # Executable # Get the input $link = $ENV{'DOCUMENT_URI'}; $root = $ENV{'DOCUMENT_ROOT'}; if (substr($link, 1, 1) eq '/') { $link = substr($link, 1, length($link) - 1); } if (substr($root, length($root), 1) eq '/') { $root = substr($root, 0, length($root) - 1); } ### Calculating the $date ### ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$root/$link"); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime); $time = sprintf("%02d",$min); $year += 1900; $date = "$months[$mon] $mday, $year at $hour:$time"; print "Content-Type: text/html\n\n$date";