#!/usr/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/ ## ## ## ############################################ #use strict # 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! ## ############################################## ################################################# ## Define your forum's configuration settings! ## ################################################# ## (1) Specify the location of your webbbs_settings.pl script: require "/home/httpd/cgi-bin/webbbs_settings.pl"; ## (2) Locate the files and directories unique to this forum: $dir = "/home/elgonquin/WebSite/undertable/messages"; $cgiurl = "http://www.elgonquin.com/undertable/index.cgi"; $DBMType = 0; ## (2) Define your e-mail notification features: $mailprog = '/usr/sbin/sendmail'; $WEB_SERVER = ""; $SMTP_SERVER = ""; $admin_name = "Elgonquin Staff"; $maillist_address = "staff\@elgonquin.com"; $notification_address = "staff\@elgonquin.com"; $email_list = 1; $private_list = 0; $HeaderOnly = 0; # 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: $SpellCheckerID = "0532115747"; $SpellCheckerPath = "/cgi-bin/sproxy.cgi"; $SpellCheckerJS = "http://www.elgonquin.com/roundtable/spch.js"; $SpellCheckerLang = "en"; $UserProfileDir = "/home/elgonquin/WebSite/undertable/userprofs"; $UserProfileURL = "http://www.elgonquin.com/undertable/userprofs"; $MaxGraphicSize = 20; # BEGIN { @AnyDBM_File::ISA = qw (DB_File) } $MetaFile = ""; $HeaderFile = "header.txt"; $FooterFile = "footer.txt"; $MessageHeaderFile = "msg-header.txt"; $MessageFooterFile = "msg-footer.txt"; $SSIRootDir = ""; $bodyspec = "BGCOLOR=\"E1D4BD\" TEXT=\"#460500\" LINK=\"#00327E\" VLINK=\"#A89453\" ALINK=\"#FF0000\" BACKGROUND=\"../appearance/wood1.jpg\""; $fontspec = "FACE=\"Arial\""; $navbarspec = "BORDER=0 CELLSPACING=0 CELLPADDING=6"; $navbarcolor = "#FF0000"; $navbarfontspec = "FACE=\"Arial\""; $tablespec = "BORDER=0 CELLSPACING=0 CELLPADDING=3"; $tablecolor = ""; $tablefontspec = "FACE=\"Arial\""; $ListBullets = 0; @SubjectPrefixes = (); $MessageOpenCode = ""; $MessageCloseCode = ""; $NewOpenCode = "NEW:"; $NewCloseCode = ""; $AdminOpenCode = "ADMIN!"; $AdminCloseCode = ""; $UseLocking = 1; $RefreshTime = 1; $UseFrames = ""; $BBSFrame = "_parent"; $WelcomePage = ""; $Moderated = 0; $SearchURL = ""; $TopNPosters = 30; %Navbar_Links = (); $SepPostFormIndex = 0; $SepPostFormRead = 0; $DefaultType = "By Threads, Mixed"; $DefaultTime = "2 Week(s)"; $boardname = "UnderTable"; $shortboardname = "UnderTable"; $printboardname = 0; $DateConfig = ""; $IndexEntryLines = 2; $InputColumns = 70; $InputRows = 18; $HourOffset = 0; $ArchiveOnly = 0; $AllowHTML = 1; $SingleLineBreaks = 1; $AutoQuote = 1; $AutoQuoteChar = ">"; $AutoHotlink = 1; %SmileyCode = (); %FormatCode = (); $NM_Telltale = "*NM*"; $Pic_Telltale = ""; $ThreadSpacer = ""; $GuestbookSpacer = ""; $DisplayEmail = 1; $ResolveIPs = 1; $DisplayIPs = 0; $DisplayViews = 0; $UseCookies = 1; ## (4) Define your visitors' capabilities: $MaxMessageSize = 200; $MaxInputLength = 200; $LockRemoteUser = 1; $AllowUserDeletion = 1; $AllowEmailNotices = 1; $AllowPreview = 1; $AllowURLs = 1; $AllowPics = 1; $SaveLinkInfo = 0; $AllowUserPrefs = 1; $AllowNewThreads = 1; $AllowResponses = 1; $NaughtyWords = ""; $CensorPosts = 0; $ShowPosterIP = 0; $BannedIPs = "ip68-0-83-103.tu.ok.cox.net 68.0.83.103 mondial.net.au proxy.mondial.net.au 203.142.224.21 203.142.224.23 203.142.224. starindo.net .starindo.net 203.29.192. 203.76.17.27"; $CompleteBan = 1; ############################################# ## 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"; }