#!/usr/local/bin/perl ############################################ ## ## ## WebBBS ## ## by Darryl Burgdorf ## ## (e-mail burgdorf@awsd.com) ## ## ## ## version: 4.22 ## ## last modified: 4/19/00 ## ## copyright (c) 2000 ## ## ## ## latest version is available from ## ## http://awsd.com/scripts/ ## ## ## ############################################ # COPYRIGHT NOTICE: # # Copyright 2000 Darryl C. Burgdorf. All Rights Reserved. # # This program is being distributed as shareware. It may be used and # modified by anyone, so long as this copyright notice and the header # above remain intact, but any usage should be registered. (See the # program documentation for registration information.) Selling the # code for this program without prior written consent is expressly # forbidden. Obtain permission before redistributing this program # over the Internet or in any other medium. In all cases copyright # and header must remain intact. # # This program is distributed "as is" and without warranty of any # kind, either express or implied. (Some states do not allow the # limitation or exclusion of liability for incidental or consequential # damages, so this notice may not apply to you.) In no event shall # the liability of Darryl C. Burgdorf and/or Affordable Web Space # Design for any damages, losses and/or causes of action exceed the # total amount paid by the user for this software. ############################################## ## You MUST define the following variables! ## ############################################## ## (1) Specify the locations of your WebBBS files: $webbbs_index = "webbbs_index.pl"; $webbbs_read = "webbbs_read.pl"; $webbbs_form = "webbbs_form.pl"; $webbbs_post = "webbbs_post.pl"; $webbbs_misc = "webbbs_misc.pl"; $webbbs_rebuild = "webbbs_rebuild.pl"; $webbbs_text = "webbbs_text.pl"; $webbbs_basic = "webbbs_basic.pl"; $dir = "$ENV{'DOCUMENT_ROOT'}/msgboards/msg-racing"; $cgiurl = "http://womenrunners.com/cgi-local/msgboards/racing.pl"; $DBMType = 0; ## (2) Define your e-mail notification features: $mailprog = "/usr/lib/sendmail"; $WEB_SERVER = ""; $SMTP_SERVER = ""; $admin_name = "Administrator"; $maillist_address = "admin\@womenrunners.com"; $notification_address = "admin\@womenrunners.com"; $email_list = 1; $private_list = 1; $HeaderOnly = 1; # use Socket; # use Net::SMTP; ################################################################# ## You MAY define the following variables, but do not have to! ## ################################################################# ## (3) Tailor the appearance and functionality of your BBS: # BEGIN { @AnyDBM_File::ISA = qw (DB_File) } $MetaFile = ""; $HeaderFile = "$ENV{'DOCUMENT_ROOT'}/msgboards/header.txt"; $FooterFile = "$ENV{'DOCUMENT_ROOT'}/msgboards/footer.txt"; $MessageHeaderFile = "$ENV{'DOCUMENT_ROOT'}/msgboards/header.txt"; $MessageFooterFile = "$ENV{'DOCUMENT_ROOT'}/msgboards/footer.txt"; $SSIRootDir = ""; $bodyspec = "BGCOLOR=\"#999966\" TEXT=\"#000000\""; $fontspec = "SIZE=2 FACE=\"arial,helvetica,sans-serif\""; $navbarcolor = "ffffff"; $navbarfontspec = "SIZE=1 FACE=\"arial,helvetica,sans-serif\""; $tablecolor = "ffffff"; $tablefontspec = "SIZE=2 FACE=\"arial,helvetica,sans-serif\""; $ListBullets = 0; @SubjectPrefixes = (); $MessageOpenCode = ""; $MessageCloseCode = ""; $NewOpenCode = "*"; $NewCloseCode = ""; $AdminOpenCode = "ADMIN!"; $AdminCloseCode = ""; $UseLocking = 1; $RefreshTime = 3; $UseFrames = ""; $BBSFrame = "_parent"; $WelcomePage = ""; $Moderated = 0; $SearchURL = ""; $TopNPosters = 0; %Navbar_Links = (); $SepPostFormIndex = 0; $SepPostFormRead = 0; $DefaultType = "Chronologically, Reversed"; $DefaultTime = "36 Month(s)"; $boardname = ""; $shortboardname = "Racing Message Board"; $printboardname = 1; $DateConfig = "%mo%/%dy%/%yr% %HR%:%mn%"; $IndexEntryLines = "news"; $InputColumns = 50; $InputRows = 10; $HourOffset = 0; $ArchiveOnly = 0; $AllowHTML = 0; $SingleLineBreaks = 1; $AutoQuote = 1; $AutoQuoteChar = ":"; $AutoHotlink = 1; %SmileyCode = (); %FormatCode = (); $NM_Telltale = "*NM*"; $Pic_Telltale = ""; $ThreadSpacer = ""; $GuestbookSpacer = ""; $DisplayEmail = 0; $ResolveIPs = 1; $DisplayIPs = 0; $DisplayViews = 0; $UseCookies = 1; ## (4) Define your visitors' capabilities: $MaxMessageSize = 50; $MaxInputLength = 50; $LockRemoteUser = 1; $AllowUserDeletion = 0; $AllowEmailNotices = 1; $AllowPreview = 1; $AllowURLs = 0; $AllowPics = 0; $SaveLinkInfo = 0; $AllowUserPrefs = 0; $AllowNewThreads = 1; $AllowResponses = 1; $NaughtyWords = ""; $CensorPosts = 0; $ShowPosterIP = 1; $BannedIPs = ""; $CompleteBan = 0; ############################################# ## Do NOT change anything in this section! ## ############################################# require $webbbs_text; require $webbbs_basic; if ($BannedIPs && $CompleteBan) { if ($ResolveIPs) { if (($ENV{'REMOTE_ADDR'} =~ /\d+\.\d+\.\d+\.\d+/) && (!($ENV{'REMOTE_HOST'}) || ($ENV{'REMOTE_HOST'} =~ /\d+\.\d+\.\d+\.\d+/))) { @domainbytes = split(/\./,$ENV{'REMOTE_ADDR'}); $packaddr = pack("C4",@domainbytes); $resolvedip = (gethostbyaddr($packaddr, 2))[0]; unless ($resolvedip =~ /^[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})$/) { $resolvedip = ""; } if ($resolvedip) { $ENV{'REMOTE_HOST'} = $resolvedip; } } } else { $ENV{'REMOTE_HOST'} = ""; } unless ($ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; } @bannedips = split(/ /,$BannedIPs); foreach $bannedip (@bannedips) { if (($ENV{'REMOTE_HOST'} =~ /$bannedip/i) || ($ENV{'REMOTE_ADDR'} =~ /$bannedip/i)) { require $webbbs_read; &Initialize_Data; &Error("9520","9521"); } } } if ($ENV{'QUERY_STRING'} =~ /noframes/i) { $UseFrames = ""; } if ((!($UseFrames) && ($ENV{'QUERY_STRING'} =~ /review=(\d+)/i)) || (!($UseFrames) && ($ENV{'QUERY_STRING'} =~ /rev=(\d+)/i)) || ($ENV{'QUERY_STRING'} =~ /read=(\d+)/i) || ($ENV{'QUERY_STRING'} =~ /form=(\d+)/i)) { require $webbbs_read; } elsif ($ENV{'QUERY_STRING'} =~ /post/i) { require $webbbs_post; } elsif (($ENV{'QUERY_STRING'} =~ /addresslist/i) || ($ENV{'QUERY_STRING'} =~ /delete/i) || ($ENV{'QUERY_STRING'} =~ /reconfigure/i) || ($ENV{'QUERY_STRING'} =~ /search/i) || ($ENV{'QUERY_STRING'} =~ /subscribe/i) || ($ENV{'QUERY_STRING'} =~ /topstats/i)) { require $webbbs_misc; } else { require $webbbs_index; } &WebBBS; ################################################################### ## If necessary, set up the WebAdverts configuration subroutine! ## ################################################################### sub insertadvert { local($adzone) = @_; $ADVNoPrint = 1; if ($adzone) { $ADVQuery = "zone=$adzone"; } else { $ADVQuery = ""; } require "/usr/www/users/dburgdor/scripts/ads/ads.pl"; }