#!/tmp_mnt/usr/local/bin/perl5 ###################################################################### # BEFORE TRYING TO EDIT THIS SCRIPT, READ THE README FILE ###################################################################### # # Dream Catchers CGI Scripts Feel free to modify # Free Linkage this script to your # Created by Seth Leonard needs, but please # for Dream Catchers Technologies, Inc. keep this portion so # that I get credit. # http://dreamcatchersweb.com/scripts The same goes for # distribution. # # (c)1996/1997 Dream Catchers Technologies, Inc., # All Rights Reserved # ###################################################################### # ONLY EDIT THIS PART OF THE SCRIPT!!!! $freelocation = "http://www.foxsden.org/simfanatic/sim/linkage/free.htm"; $freepath = "/tmp_mnt/npac/server/foxsden00/sroot/droot/simfanatic/sim/linkage/free.htm"; $cgilocation = "http://boss.npac.syr.edu:8080/cgi-bin/sim/linkage/free.cgi"; # DO NOT EDIT BELOW THIS LINE!!!! ##################################################################### # Receive Info From Free Link read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $value =~ s/<([^>]|\n)*>//g; $INPUT{$name} = $value; } # Give Error Messages &no_url unless $INPUT{'url'}; &no_title unless $INPUT{'title'}; &no_category unless $INPUT{'category'}; # Set Up Free Link Page open (FILE, "$freepath"); @lines = ; close(FILE); # Write To Free Link Page open (FREE,">$freepath"); foreach $line (@lines) { if ($line =~ //) { print FREE "\n"; print FREE "$INPUT{'title'}
\n"; } else { print FREE ("$line"); } } close (FREE); &follow; # Error Pages sub no_url { print ("Content-type: text/html\n\n"); print ("No URL\n"); print ("

URL appears to be blank

\n"); print ("You didn't add your URL so your entry to the Free Link Page was not added.\n"); print ("Please add your url below.
\n"); print ("
\n"); print ("Page URL: \n"); print ("

\n"); print ("

\n"); print ("
\n"); print ("\n"); exit; } sub no_title { print ("Content-type: text/html\n\n"); print ("No Title\n"); print ("

Title appears to be blank

\n"); print ("You didn't add your Title so your entry to the Free Link Page was not added.\n"); print ("Please add your url below.
\n"); print ("\n"); print ("Page Title: \n"); print ("

\n"); print ("

\n"); print ("
\n"); print ("\n"); exit; } sub no_category { print ("Content-type: text/html\n\n"); print ("No Category\n"); print ("

Category appears to be blank

\n"); print ("You didn't add your Category so your entry to the Free Link Page was not added.\n"); print ("Please hit \"BACK\" on your Browser and fix this\n"); print ("\n"); exit; } sub follow { print ("Content-type: text/html\n\n"); print ("Thank You\n"); print ("

Thank You For Adding a Link

\n"); print ("Here's what you added:

\n"); print ("Page URL: $INPUT{'url'}
\n"); print ("Page Title: $INPUT{'title'}

\n"); print ("Back to The Free Links Page. "); print ("If you do not see your entry, hit RELOAD
\n"); print ("\n"); exit; }