#!/usr/bin//env perl $basedir = "../photos/random/"; # CGI programs must print their own HTTP response headers print "Content-type: text/html\n\n"; # Declare the SGML application as HTML print "\n"; # print main page data as html print < MainFrame.html
MAINPAGE2 print < MAINPAGE3 printnews(); print <
More Latest News...
Today is
Next JSRC Meeting is in days.
Hashathon is in days.
Navesink Challenge is in days.
Holiday Party is in days.

Membership Application
Membership Status MAINPAGE opendir(PHOTOS, $basedir) || die "Unable to open $basedir: $!"; @files = readdir(PHOTOS); $trash = shift(@files); #remove first item since not valid file name $trash = shift(@files); #remove second since not valid file name srand(time ^ $$); $num = rand(@files); close(PHOTOS); print "\n\n"; print "
\n"; printevents(); print <
© 2002-2005, JSRC. Design by 'maRkLar'
LASTPART printcounter(); print <
Google
Search WWW Search www.jsrc.org

LASTPART2 sub printnews { $dfile = "updates.htm"; @html = (); open (nfile,"$dfile"); $/=undef; while ( ) { while ( /(.*?)<\/TopStory>/sgi) { push @html,$1; pos; } } print @html; close(nfile); } sub printevents { $dfile = "topevents.htm"; @html = (); open (nfile,"$dfile"); $/=undef; while ( ) { while ( /(.*?)<\/TopStory>/sgi) { push @html,$1; pos; } } print @html; close(nfile); } sub printcounter { $img_dir = "numbers3"; # What is the name of your home page? $home_page = "index.htm"; # What is the name of your count_log? $count_log ="gr_count.log"; # What is the name of your main log? $mainlog = "main.log"; # Do you want the count to appear in a table? 1=yes 0=no $table = '1'; # Text that appears before the count number $before = "You are runner"; # Text that appears after the count number $after = "since September 1998"; # You can change the font color for the counter 000000 = Black $font_color = ""; # You can chang the font size of the counter text $font_size = ""; # Do you want the counter text centered? 1=yes 0=no $center = '1'; ################################################### # This section is the page counter { open LOG,"$count_log"; # Open log and get count @log_lines = ; close LOG; foreach $line (@log_lines){ $next_number = $line +1; } } open LOG,"$count_log"; # Open log and print new count print LOG "$next_number"; close LOG; ################################################### # This section is the main log $PRINT = "Content-type:\ text/plain\n\n "; $shortdate = `date +"%D %T %Z"`; chop ($shortdate); { $PRINT; open (MAINLOG, ">>$mainlog"); print MAINLOG "Time: $shortdate - $next_number\n"; print MAINLOG "**********\n"; foreach $key (sort keys(%ENV)) { print MAINLOG "$key = $ENV{$key}

"; } print MAINLOG "**************\n"; print MAINLOG "Host: $ENV{'REMOTE_HOST'}; IP: $ENV{'REMOTE_ADDR'}\n"; print MAINLOG "Remote Host: $ENV{'REMOTE_ADDR'}\n"; print MAINLOG "With: $ENV{'HTTP_USER_AGENT'}\n"; print MAINLOG "From: $ENV{'HTTP_REFERER'}\n\n"; close (MAINLOG); } ################################################### if ($center eq '1'){ print "

"; } else{ print "
"; } print "
$font_color\n"; print "$font_size $before
\n"; if ($table eq '1'){ print "
\n"; } @numbers = split(//,$next_number); foreach $digit(@numbers){ if ($digit eq '0'){ print ""; } if ($digit eq '1'){ print ""; } if ($digit eq '2'){ print ""; } if ($digit eq '3'){ print ""; } if ($digit eq '4'){ print ""; } if ($digit eq '5'){ print ""; } if ($digit eq '6'){ print ""; } if ($digit eq '7'){ print ""; } if ($digit eq '8'){ print ""; } if ($digit eq '9'){ print ""; } } if ($table eq '1'){ print "
"; } print "$font_size $after
\n"; if ($center eq '1'){ print ""; } } exit 0;