#!/usr/local/bin/perl ######################################### # # # SCRIPT CREATED BY # # the_actor-guy # # # # MORE SCRIPTS LIKE THIS # # CAN BE FOUND AT # # http://webtv.tourguide.net # # # # YOU MAY USE AND REDISTRIBUTE # # THIS SCRIPT AS LONG AS YOU # # LEAVE THIS HARMLESS LITTLE # # CREDIT TO ME ALONE. THANX # # # ######################################### ############################################# # EDIT THESE TWO VARIABLES # ############################################# $listhits = "25"; # SITES SHOWN PER PAGE $log = "ffalog.txt"; # TEXT FILE WHERE INFO STORED ############################################# #   EDITING DONE (REST IS OPTIONAL)       # ############################################# use CGI qw(param); $showhits = param("showhits"); $showhitsplus = param("showhitsplus"); $action = param("action"); $title = param("title"); $color = param("color"); $link = param("link"); $grad = param("grad"); $desc = param("desc"); $angle = param("angle"); $url = param("url"); $text = param("text"); ############################################# print "Content type: text/html\n\n"; print "FFA links page


"; if ($action eq "") { &main; } if ($action eq "add") { &add; } if ($action eq "preview") { &preview; } if ($action eq "done") { &done; } if ($action eq "") { print "

ADD YOUR SITE"; } ############################################# sub main { open (DATA,"$log"); $data = ; close (DATA); @data = split(/&&/,$data); foreach (@data) { ++$totalhits; } if ($showhits eq "") { $showhits = $listhits; } $showmin = $showhits - $listhits; if ($showhits <= $totalhits) { print "Sites $showmin through $showhits out of $totalhits

"; } if ($showhits > $totalhits) { print "Sites $showmin through $totalhits out of $totalhits

"; } if ($showmin >= $listhits) { print "              Prev $listhits              "; } if ($totalhits >= $showhits) { $showhitsplus = $showhits + $listhits; print "              Next $listhits              "; } if ($action eq "") { print "

ADD YOUR SITE"; } print "

"; $currenthits = 0; foreach $i (@data) { ++$currenthits; if ($currenthits > $showmin) { if ($currenthits <= $showhits) { ($url,$title,$desc,$color,$grad,$angle,$text,$link) = split(/%%/,$i); $title =~ tr/_/ /; $desc =~ tr/_/ /; if ($url ne "") { print "
$title
$desc

"; } } } } } ############################################# sub add { print "Welcome, please fill out the form. This information will be what is displayed about your site in the FFA links page.

Site URL:
Site Title:
Description:
Table Color:
Table Gradcolor:
Gradangle:
Text Color:
Link Color:
"; } ############################################ sub preview { print "OK, this is what your site will look like in the Webring Directory. If you want to edit it more, press \"Back\" and try again, otherwise press Submit.


$title
$desc



When you do press the Submit button, your table you see above is FINAL. You will not be able to log back in and change it. Make sure the table is the way you want it.

"; } ############################################# sub done { $title =~ tr/ /_/; $desc =~ tr/ /_/; open (PRINT,">>$log"); print PRINT "$url%%$title%%$desc%%$color%%$grad%%$angle%%$text%%$link&&"; close (PRINT); print "Your site has been submitted. Wanna see it?

Yea, I wanna see it!"; }