#!/usr/bin/perl

############################################
##                                        ##
##       WebAdverts (Configuration)       ##
##           by Darryl Burgdorf           ##
##       (e-mail burgdorf@awsd.com)       ##
##                                        ##
##             version:  2.11             ##
##         last modified: 12/8/99         ##
##           copyright (c) 1999           ##
##                                        ##
##    latest version is available from    ##
##        http://awsd.com/scripts/        ##
##                                        ##
############################################

# The following variables should be set to define the locations
# and URLs of various files, as explained in the documentation.

$display_path = "/home/sekunda/ftp/ads/ads_display.cgi";
$adverts_dir = "/home/sekunda/ftp/ads";
$display_cgi = "http://www.sekunda.com/ads/ads.cgi";

$advertzone = "";

$ADVUseLocking = 1;
$ADVUseCookies = 1;
$CheckForCookie = 1;

$ADVLogIP = 1;
$ADVResolveIPs = 0;

$ADVRandomizeList = 1;
$DefaultBanner = "http://www.sekunda.com/ads/banner/sekunda.gif";

$IgnoredIPs = "";
$RequireMember = 0;

# $Ztext = "";
# $Zalt = "";
# $Ztarget = "";
# $Zwidth = "";
# $Zheight = "";
# $Zborder = "";

$ExchangeName = "SekundaAuctions™";
$ExchangeURL = "http://www.sekunda.com/ads/";
$ExchangeLogo = "http://www.sekunda.com/ads/banner/exchangelogo.gif";
$ExchangeLogoWidth = 350;
$ExchangeLogoHeight = 16;
$ExchangeLogoPosition = "buttom";
$ExchangeBannerWidth = 350;
$ExchangeBannerHeight = 40;

# NOTHING BELOW THIS LINE NEEDS TO BE ALTERED!

unless ($ADVNoPrint) { $ADVQuery = $ENV{'QUERY_STRING'}; }

if ($ADVUseCookies && $CheckForCookie && ($ADVQuery =~ /page=/)
  && ($ADVQuery !~ /advert=/) && ($ADVQuery !~ /banner=/)
  && ($ENV{'HTTP_COOKIE'} !~ /TestCookie=TestValue/)  
  && ($ADVQuery !~ /checkforcookie/)) {
	print "Set-Cookie: TestCookie=TestValue\n";
	print "location: $display_cgi?$ADVQuery;checkforcookie\n\n";
}
elsif ($CheckForCookie
  && ($ENV{'HTTP_COOKIE'} !~ /TestCookie=TestValue/)) {
	$ADVUseCookies = 0;
}

require $display_path;
&ADVsetup;

unless ($ADVNoPrint) { reset 'A-Za-z'; exit; }

1;
