Providers
Debian Linux
SDF
MinGW-W64
Verizon
Research
Faqs and RFCs
FileSearching
Google
Google Groups
W3Schools Online Web Tutorials
Wikipedia
Multimedia
CTIS
For the Pigs Among Us
Family Photos
My House
My Photos (1999-2002?)
My Photos (2005)
Retro Computers
Minions of Mirth
Main
Criticals
Criticals (Single Player)
Ghaqua
Maps and Points of Interest
Miscellaneous
Monster Templates
Miscellaneous
Area Codes
Bard’s Tale
Dungeons & Dragons Online
My Blog
Quote of the Day
RogueBasin
Slashdot
The Adventuer’s Guild
Weather
GitHub:eprive/Z80-MBC3
Programming
Main
Across
Biorhythm
BMP Chips
Complex Roots
Magic Square
Magic Square(js)
Matrix(js)
More DOS Programs
Roll
Strip Dups (bash)
Wacky Wood-Worker
How To
Enlightenment 0.16.7.2 Startup Patch
How to Create an OS X Iconset
My RedHat Howto
SSH to VMS (Deathrow OpenVMS Cluster)
Tools
Allowable Mortgage Interest
Dates and Mileage
Day of the Year
Fun With Time
Downloads
Educational
Utilities
source.pl
#!/usr/pkg/bin/perl -w @wday = qw{ Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, }; @mon = qw{ January February March April May June July August September October November December }; my($sec, $min, $hour, $day, $mon, $year, $wday, $yday, $isdst) = localtime; @date = ( $wday[$wday], $day, $mon[$mon], $year+1900 ); $count_file="/arpa/gm/m/mcsuper5/html/data/count_file"; #$doc="source.pl"; ($Arg, $PATHNAME) = split(/=/, $ENV{"QUERY_STRING"}, 2); $FILENAME = $PATHNAME; $FILENAME =~ s/.+\/([^\/]+)/$1/; $doc = $FILENAME; print "Content-type: text/html\n\n"; open HEADER, "../parts/header"; foreach (<HEADER>) { s{__TITLE__}{$FILENAME}; s{__BCKGRND__}{/tiles/purple_marble.png}; if ( ! /navpane.html.part/ ) { print $_; } else { system "./navpane.pl" ; } } close HEADER; print qq|<h1>$FILENAME</h1><br />|; print qq|<center><textarea id="code" class="code" style="width:95%;height:6.5in;" wrap="off" spellcheck="false" >|; open CODE, $PATHNAME; foreach (<CODE>) { s/&/&/g; s/</</g; s/>/>/g; print $_; } close CODE; print qq|</textarea></center>|; print qq|<p>This source has been viewed |; open(CFILE, $count_file); @counts=<CFILE>; close(CFILE); # Read the count file, pick the correct entry and increment it $found = 0; for $line (@counts) { chop ($line); ($page,$count)=split(/ /, $line); $page=~s/'//g; if ($page eq $doc) { $count++; $found = 1; $line = "'$page' $count"; $found_count = $count; } push (@newcount, $line); } if ($found == 1) { $count = $found_count } else { $count = 1; push (@newcount, "'$doc' 1"); } @newcount=sort(@newcount); # Updates the count file open (CFILE, ">$count_file"); flock(CFILE, 2); # lock for $line (@newcount) { print CFILE "$line\n"; } flock(CFILE, 8); # unlock close CFILE; print "$count"; print qq| times.</p>|; open FOOTER, "../parts/footer"; foreach (<FOOTER>) { s{__DATE__}{@date}; print $_; } close FOOTER;
This source has been viewed 15 times.
Friday, 6 December 2024
Michael J. Chappell
Contact me at:
mcsuper5@freeshell.org