#!/usr/local/bin/perl # # Program: bpconf.pl # Author: Drummond Miles # Email: info@gadnet.com # # Created: 29/12/98 # Last Modified: 12/09/99 - removed references to $cgipath for ease of cross-platform # installation # Copyright G.A.D.Miles 1998. All Rights Reserved # # Download script from http://www.gadnet.com/bplus # # This program is being distibuted as freeware. It can be freely downloaded and used. # It may be modified as long as the copyright information remains intact. # # Any use of this program is entirely at the risk of the user. No liability will be # accepted by the author. # # This code must not be sold, even in modified form, without the written permission # of the author. # print "Content-type: text/html\n\n"; read(STDIN,$indata,$ENV{'CONTENT_LENGTH'}); @indata = split(/&/,$indata); foreach $i (0..$#indata) { $indata[$i] =~ s/\+/ /g; ($key,$val) = split(/=/,$indata[$i],2); $key =~ s/%(..)/pack("c",hex($1))/ge; $val =~ s/%(..)/pack("c",hex($1))/ge; $indata{$key} .= "\0" if (defined($indata{$key})); $indata{$key} .= $val; } require "bpsubs.cgi"; open (STDERR, ">>bperror.log"); open (VARS, "+; close (VARS); if ($vars[0] =~ /1\;\n/) { $vars[0] = "2\;"; $vars[1] = "\$bpdata = \"$ENV{'DOCUMENT_ROOT'}bp/ads\"\;"; $vars[2] = "\$title = \"BannerPlus\"\;"; $vars[5] = "\$bpurl = \"http://$ENV{'HTTP_HOST'}/bp\"\;"; $vars[8] = "\$cgipath = \"$cgipath\"\;"; $vars[9] = "\$cgiurl = \"http://$ENV{'HTTP_HOST'}/computers/cgi/bannerrotators/bannerplus/bp/cgi-bin\"\;"; $vars[16] = "\$mailprog = \"/usr/lib/sendmail\"\;"; } $vars[1] =~ /\"(.*)\"\;$/; $bpdata = $1; $vars[2] =~ /\"(.*)\"\;$/; $title = $1; $vars[5] =~ /\"(.*)\"\;$/; $bpurl = $1; $vars[6] =~ /\"(.*)\"\;$/; $defaultbanner = $1; $vars[7] =~ /\"(.*)\"\;$/; $defaulturl = $1; $vars[9] =~ /\"(.*)\"\;$/; $cgiurl = $1; $vars[14] =~ /\"(.*)\"\;$/; $myemail = $1; #$_ = $myemail; #s/\\//g; #$myemail = $_; $myemail =~ s/\\//g; $vars[15] =~ /\"(.*)\"\;$/; $autoname = $1; $mailprog = ""; $dormant = 0; $logoflag = ""; $logourl = ""; $logoimage = ""; $emailnew = "N"; $datetype = "UK"; $emailwm = "N"; $personal = "N"; $string = "?" . $ENV{'QUERY_STRING'}; if (!$indata{'update'}) { if (-e "bpadmin.txt") { if (!$indata{'password'}) { &header("Enter Administration Password"); print "


In order to access this function, you must enter the administration password.\n"; print "


\n"; print "
\n"; print "Password: "; print "\n"; print "     "; print "
\n"; &footer; } else { open (PASSWORD, "+; close (PASSWORD); chop $indata{'password'} if ($indata{'password'} =~ /\n$/); chop $password if ($password =~ /\n$/); if ($password ne crypt($indata{'password'}, "dm")) { &header("Password Error"); print "


The password you entered is incorrect. Please try again.\n"; &footer; } } } } open (DEFAULT, "+; close (DEFAULT); if ($indata{'update'}) { &update; return; } print "BannerPlus - Configuration\n"; print "\n"; print "
\n"; print "\n"; print "\n"; print "
BannerPlus\n"; print "
Default Configuration

 \n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
No \n"; print "Yes \n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
No \n"; print "Yes \n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
No \n"; print "Yes \n"; } print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
dd/mm/yyyy \n"; print "mm/dd/yyyy \n"; } print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
Yes \n"; print "No \n"; } print "\n"; print "\n"; print "\n"; print "\n"; } else { print "
Yes \n"; print "No \n"; } print "\n"; print "\n"; print "
Description
Free Credits:\n"; print "
If new members should receive a \n"; print "number of free exposure credits when they join, then enter that number \n"; print "here.
Display Ratio:\n"; print "
Enter the default \n"; print "Display Ratio. Members will earn one exposure credit when they have displayed \n"; print "\'x\' banners on their site, where \'x\' is the Display Ratio. This can be \n"; print "a fraction. A display ratio of 1.5 means that a member will earn two exposure \n"; print "credits for every three banners displayed on their site.
CGI URL:\n"; print "
This is the URL of your CGI directory. \n"; print "Eg:http://www.yourserver.com/cgi-bin
Banner Data Path:\n"; print "
This is the path \n"; print "to your banner data directory. Eg: /opt2/yourserver/httpd/htdocs/bp/ads
Banner Data URL:\n"; print "
This is the URL of your banner exchange \n"; print "directory. Eg:http://www.yourserver.com/bp
Banner Exchange Title:\n"; print "
The title of your \n"; print "banner exchange. Eg: Martin\'s Music Exchange
Default Banner URL:\n"; print "
The URL of the banner which should \n"; print "be displayed if no member banner qualifies to be displayed. Normally this \n"; print "would be a banner advertising your banner exchange program. 
Default URL:\n"; print "
The URL which \n"; print "the browser should go to if the Default Banner (see above) is clicked on. \n"; print "Normally this would be the URL of your banner exchange main page.
Admin Password:\n"; print "
Change the admin password (or leave blank for no change).\n"; print "
Auto Names:\n"; if ($autoname eq "N") { print "
No \n"; print "Yes
If you select 'Yes' \n"; print "the software will automatically generate member IDs instead of allowing the member \n"; print "to select their own ID.
Email Address:\n"; print "
Enter your email address here.\n"; print "
Mail Program:\n"; print "
The path of your email \n"; print "program. This feature is not available in the freeware version.\n"; print "
Dormancy:\n"; print "
Enter the number of days of inaction before \n"; print "a member becomes dormant. This feature is not available in the freeware version.\n"; print "
Mini Banner:\n"; if ($logoflag eq "N") { print "
No \n"; print "Yes
If you want a small Link Exchange style image \n"; print "to appear to the left of the main banner, check this box and fill in the next two fields. This feature is not available in the freeware version.\n"; print "
Logo URL:\n"; print "
Enter the URL to go to if the mini-banner is \n"; print "clicked on. This feature is not available in the freeware version.\n"; print "
Mini Banner:\n"; print "
Enter the URL of your \n"; print "mini banner. This feature is not available in the freeware version.\n"; print "
Email New Members:\n"; if ($emailnew eq "N") { print "
No \n"; print "Yes
If you want all new members to recieve a \n"; print "welcome email, click on yes and use the admin function to create the email. This feature is not available in the freeware version.\n"; print "
Date Format:\n"; if ($datetype eq "UK") { print "
dd/mm/yyyy \n"; print "mm/dd/yyyy
Enter the style of date \n"; print "which your prefer. This feature is not available in the freeware version.\n"; print "
Email to Webmaster:\n"; if ($emailwm eq "Y") { print "
Yes \n"; print "No
If the exchange administrator should be \n"; print "sent an email when a member is awaiting confirmation, click Yes and use the admin \n"; print "function to create the email. This feature is not available in the freeware version.\n"; print "
Personal Details:\n"; if ($personal eq "Y") { print "
Yes \n"; print "No
If you want the member to enter \n"; print "their personal details (eg address, phone, gender etc) click Yes. This feature is not available in the freeware version.\n"; print "
\n"; print "
\n"; &footer; sub update { $defaults[0] = $indata{'ratio'}; $defaults[1] = $indata{'credits'}; open (DEFAULT, "+
Configuration Complete\n"; print "

Click HERE to return to the main page.\n"; &footer; }