#!/usr/local/bin/perl5 ############################################################### # #If you are running UBB on IIS, #you may need to add the following line #if so, just remove the "#" sign before the print line below #print "HTTP/1.0 200 OK\n"; eval { ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX / or Windows / ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \ #substitute all require files here for the file require "UltBB.setup"; require "Date.pl"; require "ubb_library.pl"; #ReadParse, GetForumRecord }; ##################################################### #################### Variables ###################### ##################################################### # $PROGNAME is name of program $PROGNAME = "$CGIURL/regsite.cgi"; $PROGFRAME = "$CGIURL/outside.cgi"; $PROGGENHDR = "$CGIURL/genhdr.cgi"; $ICOUTSIDE = "$MembersPath/icentric/ICoutside.log"; print ("Content-type: text/html\n\n"); &ReadParse; foreach $row(@in) { ($Name, $Value) = split ("=", $row); $Name = &decodeURL($Name); $Value = &decodeURL($Value); if ($Name eq "n") { $n = $Value; unless($n =~ /^A:\d{3}$/i) { $n =~ s/\D//sg; } } if ($Name eq "hp") { # site title $hp = $Value; $hp =~ s/http:\/\///sg; } if ($Name eq "logo") { # site logo $logo = $Value; $logo =~ s/http:\/\///sg; } if ($Name eq "desc") { # site desc $desc = $Value; $desc =~ s/\n/ /sg; $desc =~ s/\r/ /sg; $desc =~ s/\|/ /sg; $desc =~ s/ /+/sg; } if ($Name eq "hdrurl") { # site header URL $hdrurl = $Value; $hdrurl =~ s/http:\/\///sg; } } # end FOREACH $row $ForumURL = qq(http://www.healthboards.com/cgi/forumdisplay.cgi?action=topics&number=); ########## # main program $hpA = $ENV{'HTTP_REFERER'}; $hpA =~ s/http:\/\///sg; ($hp1, $hp2) = split(/\//, $hpA, 2); ### log sites if ($hpA ne "www.healthboards.com/cgi/regsite.cgi?action=demo") { $logdate = &GetDateTime; open (ICFD, ">>$ICOUTSIDE"); print ICFD ("$logdate||$ENV{'REMOTE_ADDR'}||$hpA\n"); close (ICFD); chmod (0666, "$ICOUTSIDE"); } if ($hdrurl ne "") { print <$hp1 -- power by HealthBoards.com FORMHTML } elsif ($hp ne "") { print <$hp -- power by HealthBoards.com FORMHTML } else { print <Error -- power by HealthBoards.com error FORMHTML } # end if-elsif-else exit(0); # comply with SafePerl