#!/usr/bin/perl ############################### # Hot Links Pro 3 edscript.cgi # Created by Mike Ramirez # Nothing below here is configurable ############################### use CGI; my $q = CGI->new; print $q->header; # Display error if setup hasn't been run unless (-e './source/config.pl') { print "You must run the setup script."; exit; } require './source/headerfooter.pl'; require './source/config.pl'; require './source/banner.pl'; require './source/linkbuild.pl'; require './lang/langset.pl'; ############################### &header; print <<"HTML"; HTML ########## my $filetolock = $datafilepath; my $tempfile = $filetolock . ".lock"; open (LOCK, ">$tempfile"); if ($useflock == 1) {flock (LOCK, 2)} open (FILE, "$datafilepath"); @newlinkstemp = ; close(FILE); close(LOCK); unlink ($tempfile); @newlinks = sort {$b <=> $a} @newlinkstemp; #reverse link order, new links at the top foreach $line (@newlinks) { chomp($line); @linkinfo = split(/\|/, $line); if ($linkinfo[9] eq 'Yes') { $addedon = $linkinfo[8]; $addedon =~ s/_/ /g; $sendto = $linkinfo[3]; $sendto =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg; &dolinkbuild; } } ############ print <<"HTML";
$shtext1 : $edtext1
HTML if ($displayadverts == 1) {&showall} print <<"HTML";

$edtext1 - $edtext2
HTML &footer;