#!/usr/bin/perl # ### PRIMARY UBB SCRIPT ## # # Ultimate Bulletin Board is copyright Infopop Corporation, 1998-2000. # # ------------ ubbmisc.cgi ------------- # # This file contains miscellaneous functionality for the UBB. # # Infopop Corporation offers no # warranties on this script. The owner/licensee of the script is # solely responsible for any problems caused by installation of # the script or use of the script, including messages that may be # posted on the BB. # # All copyright notices regarding the Ultimate Bulletin Board # must remain intact on the scripts and in the HTML # for the scripts. # # For more info on the Ultimate BB, # see http://www.UltimateBB.com # ############################################################### # #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 "mods.file"; require "mail-lib.pl"; require "Styles.file"; require "ubb_library.pl"; require "ubb_library2.pl"; }; if ($@) { print ("Content-type: text/html\n\n"); print "Error including required files: $@\n"; print "Make sure these files exist, permissions are set properly, and paths are set correctly."; exit; } use Socket; &ReadParse; foreach $row(@in) { ($Name, $Value) = split ("=", $row); $Name = &decodeURL($Name); $Value = &decodeURL($Value); if ($Name eq "forum") { $Forum = $Value; $Forum =~ s/\/\\//g; $ForumCoded = &HTMLIFY($Forum); $ForumCoded =~ tr/ /+/; $Forum = &UNHTMLIFY($Forum); } if ($Name eq "TopicSubject") { $TopicSubject = $Value; $TopicSubject =~ s/<.+?>//g; $TopicSubject =~ s/); $BorderBottom = qq( ); } else { $TableWidth2 = $TableWidth; $BorderTop = ""; $BorderBottom = ""; } if ($BBStatus eq "OFF") { print ("Content-type: text/html\n\n"); &StandardHTML($BBClosedMessage); exit; } $ReplyMessage = $in{'ReplyMessage'}; $Message = $in{'Message'}; $SubjectCoded = &HTMLIFY($TopicSubject); $SubjectCoded =~ tr/ /+/; if ($in{'action'} eq "findthread") { &FindThread; } print ("Content-type: text/html\n\n"); if ($in{'action'} eq "clearcookies") { &ClearCookies; } if ($in{'action'} eq "sockettest") { &SocketTest; } if ($in{'action'} eq "getannounce") { &GetAnnounce; } if ($in{'action'} eq "getbio") { &GetBio; } if ($in{'action'} eq "sendthread") { &SendThreadForm; } if ($in{'action'} eq "SubmitThreadEmail") { &SubmitThreadEmail; } if ($in{'action'} eq "editbio") { &EditBio; } if ($in{'action'} eq "setprefs") { &SetPrefs; } if ($in{'action'} eq "PrefsSubmit") { &PrefsSubmit; } if ($in{'action'} eq "getip") { &GetIP; } if ($in{'action'} eq "checkbioid") { &CheckBioID; } if ($in{'action'} eq "modifybio") { &ModifyBio; } if ($in{'action'} eq "RegSubmit") { &RegSubmit; } if ($in{'action'} eq "pwrequest") { &PWRequest; } if ($in{'action'} eq "showcoppaform") { &PrintCOPPARegistrationHTML; } sub ClearCookies { print< $HeaderInsert $Header

Thank you. We have just deleted all cookies previously set from this forum. Note that you should reset your preferences now.

Click here to return to Preferences.

Click here to return to the forums.

$Footer COOKIES } sub FindThread { @thisfor = &GetForumRecord($number); my $LWA = $thisfor[6]; $DIRPW = $thisfor[7]; my $PrivateMax = $thisfor[13]; chomp($PrivateMax); if (-e "$ForumsPath/$in{'forum'}/forum$number.threads") { open(THREADLIST, "$ForumsPath/$in{'forum'}/forum$number.threads"); my @thisthreadlist = ; close(THREADLIST); if ($in{'go'} eq "older") { @threadlist = reverse(@thisthreadlist); } else { @threadlist = @thisthreadlist; } my $Next = "false"; FINDIT: foreach $uno(@threadlist) { @topicarray = split(/\|\^\|/, $uno); if ($Next eq "true") { $RetrieveTopic = "$topicarray[1]"; last FINDIT; } if ($topicarray[1] eq "$in{'thisthread'}") { $Next = "true" } } if ($RetrieveTopic ne "") { if (($LWA eq "private") && ($PrivateMax eq "yes")) { &get_cookie; #retrieves all current cookies $PasswordPrivate = "$cookie{PasswordPrivate}"; $UserNamePrivate = "$cookie{UserNamePrivate}"; $NumbersPrivate = "$cookie{ForumNumberPrivate}"; &VerifyID; if ($ProceedNow ne "true") { print ("Content-type: text/html\n\n"); &StandardHTML("This is a private forum and you have not been properly authorized to view posts in this forum."); exit; } $GoTo = "$CGIURL/forumdisplay.cgi?action=displayprivate&number=$number&topic=$RetrieveTopic"; } else { $GoTo = "$NonCGIURL/$in{'forum'}/HTML/$RetrieveTopic.html"; } print "Location: $GoTo\n\n"; exit; } else { print ("Content-type: text/html\n\n"); &StandardHTML("There are no topics $in{'go'} than this topic in this forum. Use your back button to return."); exit; } } else { print ("Content-type: text/html\n\n"); &StandardHTML("We cannot locate the next topic"); exit; } } sub GetBio { $ProfileNumber = &GetUserNumber($UserName); if ($ProfileNumber eq "") { &StandardHTML("Sorry, it appears that that user ($UserName) is no longer registered for our forums. No profile information is available for that user."); exit; } @thisprofile = &OpenProfile("$ProfileNumber.cgi"); $EmailView = $thisprofile[11]; $Signature = $thisprofile[12]; my $TheEmail = $thisprofile[2]; if (($EmailBlock eq "ON") || ($EmailView eq "no")) { $EmailField = "Not available."; } else { $EmailField = qq($TheEmail); } &ViewBioHTML; } ## END GET BIO sr sub CheckBioID { if (($in{'UserName'} eq "") || ($in{'Password'} eq "")) { &StandardHTML("You did not complete all required form fields! Please go back and re-enter."); } else { $NameFound = "no"; $ProfileNumber = &GetUserNumber($UserName); if ($ProfileNumber ne "") { $NameFound = "yes"; } else { $NameFound = "no"; } if ($NameFound eq "yes") { #Check Password Now @thisprofile = &OpenProfile("$ProfileNumber.cgi"); if ($in{'Password'} eq "$thisprofile[1]") { $pwmatch = "true"; $Password = $thisprofile[1]; $Email = $thisprofile[2]; $URL = $thisprofile[3]; $Occupation = $thisprofile[5]; $Location = $thisprofile[6]; $Interests = $thisprofile[9]; $Status = $thisprofile[8]; $TotalPosts = $thisprofile[7]; $Permissions = $thisprofile[4]; $DateRegistered = $thisprofile[10]; $EmailView = $thisprofile[11]; $Signature = $thisprofile[12]; $ICQnumber = $thisprofile[13]; $AllowMassMail = $thisprofile[14]; chomp($AllowMassMail); &ProcessEdit; } } ## END IF MEMBER = Username.cgi condition if ($NameFound ne "yes") { &StandardHTML("We have no one registered with that user name. Use your back button to try again."); } if (($NameFound eq "yes") && ($pwmatch ne "true")) { &StandardHTML("Sorry, but the password you entered was not correct. Please try again. Use your Back button."); } } # end check for missing fields } ## END CheckBioID SR ### sub ModifyBio { if (($Email eq "") || ($in{'NewPassword'} eq "") || ($Email !~ /\S+\@\S+\.\S+/)) { &StandardHTML("You did not complete all required form fields (or you did include a properly formatted email address)! Please go back and re-enter."); } else { ## Confirm UserName and Password to prevent hacking $ProfileNumber = &GetUserNumber($UserName); @profileinfo = &OpenProfile("$ProfileNumber.cgi"); $CurrentEmail = "$profileinfo[2]"; chomp($CurrentEmail); $Permissions = "$profileinfo[4]"; chomp($Permissions); $TotalPosts = "$profileinfo[7]"; $Status = "$profileinfo[8]"; $DateRegistered = "$profileinfo[10]"; if ($profileinfo[1] eq "$in{'Password'}") { ## check for duplicate email addresses, if applicable &GetMemberListArray; $GetEmails; if ($EmailCheck eq "true") { ### members, EmailList arrays... #Check For Duplicate Email my $duplicate = ""; $RegEmail = lc($Email); $CurrEmail = lc($CurrentEmail); #only check if email is being changed if ($RegEmail ne "$CurrEmail") { $UpdateEmailFile = "true"; &CheckBans; if (-e "$MembersPath/temp.file") { &StandardHTML("We are temporarily upgrading our Memberships. This process only takes a minute or two. Please try changing your profile again in a couple of minutes. Thank you!"); exit; } unless ($Permissions =~ /Write/) { &StandardHTML("Sorry, we cannot process your profile change requst for the following reason:

We do not allow email address changes for users that are not permitted to post notes."); exit; } CHECKEMAIL: for $thisemail(@EmailList) { ($theemail, $junk) = split(/\?\?/, $thisemail); $checkemail = lc($theemail); if ($RegEmail eq "$checkemail") { $duplicate = "yes"; last CHECKEMAIL; } #end if regemail } # end foreach } #end regemail/curremail compare } #END if Email check eq TRUE if ($duplicate eq "yes") { &StandardHTML("You cannot use the email address you tried to use. Another registered user is already using it."); } else { # if email verify is on, then we can't let users change # email address without sending a new password generated # by system to them $Password = "$in{'NewPassword'}"; $ModifyWarning = ""; if (($CurrentEmail ne "$Email") && ($UseEmail eq "ON") && ($EmailVerify eq "ON")){ #generate new password $NewPassword = &GeneratePassword; $sendto = "$Email"; $from = "$BBEmail"; $subject = "$BBName Registration - Your New Password"; $message = "Hello!\n\r\nBecause you just modified your email address, we have sent you a new password to use for your registration on $BBName. Your registration information is provided below, including your new password. You will need this information in order to post any messages in our forums.\n\r\nYour UserName: $UserName\nYourPassword: $NewPassword\nYour Email Address of record is now: $Email"; $Password = "$NewPassword"; $ModifyWarning = "Note: Because you changed your email address, and because we require email verification, a new password has been issued to you. This new password has been sent to: $Email. You may change your password, but you may not change your password and email address at the same time. Thank you!"; if ($SMTPEmail eq "On") { &SendEmail; } else { &send_mail("$BBEmail", "$sendto", "$subject", "$message"); } } @amend = @blank; if ($UpdateEmailFile eq "true") { open (EMAILFILE, "$MembersPath/emailfile.cgi"); my @emailsfile = ; close (EMAILFILE); $CurrEmail =~ s/([\.|\@])/\\$1/isg; foreach $checker(@emailsfile) { chomp($checker); if ($checker =~ m/^$CurrEmail\|\|/i) { ($junk, $thisnum) = split(/\|\|/, $checker); $NewLine = "$RegEmail||$thisnum"; push(@amend, $NewLine); } else { push(@amend, $checker); } } &Lock("lock.file"); open(EMAILFILE, ">$MembersPath/emailfile.cgi"); foreach $dos(@amend) { chomp($dos); print EMAILFILE "$dos\n"; } close(EMAILFILE); &Unlock("lock.file"); chmod (0666, "$MembersPath/emailfile.cgi"); } $Signature = "$in{'Signature'}"; $Signature =~ s/()//isg; $Signature =~ s//>/g; $Signature =~ s/\s+$//g; $Signature = &ConvertReturns("$Signature"); if ($AllowSignatureImage eq 'no'){ $OverrideImages = "yes"; } else { $OverrideImages = "no"; $UBBImages = 'ON'; } $Signature = &UBBCode("$Signature"); $in{'ICQnum'} =~ s/\D//g; # rem non numbers @filter_these = ("Occupation","Location","URL","Interests","RegEmail"); # rem HTML and unclosed tags foreach(@filter_these){ $$_ =~ s/<.+?>//g; $$_ =~ s/$MembersPath/$ProfileNumber.cgi") || die(&StandardHTML("Unable to open Members profile file. $!") ); print MEMBERSHIP ("$profileinfo[0]\n"); print MEMBERSHIP ("$Password\n"); print MEMBERSHIP ("$Email\n"); print MEMBERSHIP ("$URL\n"); print MEMBERSHIP ("$Permissions\n"); print MEMBERSHIP ("$Occupation\n"); print MEMBERSHIP ("$Location\n"); print MEMBERSHIP ("$TotalPosts\n"); print MEMBERSHIP ("$Status\n"); print MEMBERSHIP ("$Interests\n"); print MEMBERSHIP ("$DateRegistered\n"); print MEMBERSHIP ("$in{'EmailView'}\n"); print MEMBERSHIP ("$Signature\n"); print MEMBERSHIP ("$in{'ICQnum'}\n"); print MEMBERSHIP ("$in{'AllowMassMail'}\n"); close (MEMBERSHIP); &Unlock("lock.file"); #confirm processing to user, provide links to other places &BioModifyConfirmHTML; } } else { &StandardHTML("Sorry, but you seem to be trying to hack into someone else's profile. You can not edit someone's profile without knowing their password."); exit; } } } ## END Modify Bio SR sub GetAnnounce { $ForumNumber = $in{'ForumNumber'}; @thisforum = &GetForumRecord($ForumNumber); if ($thisforum[6] eq "private") { $ExactPath = "Forum$ForumNumber/private-$thisforum[7]"; } else { $ExactPath = "Forum$ForumNumber"; } opendir (GETANNC, "$ForumsPath/$ExactPath/ANNC"); my @forummsgs = readdir(GETANNC); closedir (GETANNC); my @announcements = grep(/annc/, @forummsgs); #now we have all announcements in the forum my $announce = ""; foreach $announce(@announcements) { my ($start, $end, $trash) = split("-", $announce); &DateCompare("$start", "$end"); if ($Live eq "true") { $sortline = ("$StartJulian|$announce"); push(@livelist, $sortline); } } #end foreach $announce $listtotal = @livelist; @sortlist = sort(@livelist); #the sorted list of announcements @sortlist = reverse(@sortlist); #now we need to print the announcements $Moderator = ("Forum" . "$ForumNumber" . "Moderator"); $Moderator = $$Moderator; @mods = split(/\|\|\^\|\|/, $Moderator); foreach $unomod(@mods) { chomp($unomod); $ModNumber = &GetUserNumber($unomod); if ($ModNumber ne "") { @theprofile = &OpenProfile("$ModNumber.cgi"); $ModeratorEmail = "$theprofile[2]"; if ($ModeratorLine ne "") { $ModeratorLine .= qq(, $unomod); } else { $ModeratorLine = qq($unomod); } } } $Forum = $thisforum[1]; $CustomTitle = $thisforum[9]; chomp($CustomTitle); if ($CustomTitle eq "") { $CustomTitle = "$BBTitle"; } $ForumCoded = &HTMLIFY($Forum); $ForumCoded =~ tr/ /+/; &AnnounceTopHTML; $AltColor = "$AltColumnColor1"; #print each announcement foreach $liveannounce(@sortlist) { ($StartCheck, $anncfile) = split(/\|/, $liveannounce); open (ANNC, "$ForumsPath/$ExactPath/ANNC/$anncfile"); @anncinfo = ; close (ANNC); #format end date ($startdate, $enddate, $trash2) = split("-", $anncfile); my $StartMonth = substr($startdate, 0, 2); my $StartDay = substr($startdate, 2, 2); my $StartYear = substr($startdate, 4, 4); my $EndMonth = substr($enddate, 0, 2); my $EndDay = substr($enddate, 2, 2); my $EndYear = substr($enddate, 4, 4); $DateStart = "$StartMonth-$StartDay-$StartYear"; $DateEnd = "$EndMonth-$EndDay-$EndYear"; if ($DateFormat eq "US") { $FormatStart = $DateStart; $FormatEnd = $DateEnd; } elsif ($DateFormat eq "Euro") { $FormatStart = &DateFormat("$DateStart", "Euro"); $FormatEnd = &DateFormat("$DateEnd", "Euro"); } elsif ($DateFormat eq "USX") { $FormatStart = &DateFormat("$DateStart", "USExpanded"); $FormatEnd = &DateFormat("$DateEnd", "USExpanded"); } else { $FormatStart = &DateFormat("$DateStart", "EuroExpanded"); $FormatEnd = &DateFormat("$DateEnd", "EuroExpanded"); } my $Author = $anncinfo[0]; my $Subject = $anncinfo[1]; my $Status = $anncinfo[2]; my $ForumList = $anncinfo[3]; my $Message = $anncinfo[4]; chomp($Author); chomp($Subject); chomp($Status); chomp($ForumList); chomp($Message); $StartCheck = ($StartCheck + .99); if ($StartCheck >= $in{'Session'}) { $NewGIF = "\"New"; } else { $NewGIF = "\"Old"; } print< $Subject $NewGIF posted by $Author     ($FormatStart through $FormatEnd)


$Message
LINE if ($AltColor eq "$AltColumnColor1") { $AltColor = "$AltColumnColor2" } else { $AltColor = "$AltColumnColor1" } } #end foreach $liveannounce print < New Announcement  New Announcement (since you last visited)
New Announcement  Old Announcement


ALMOSTBOTTOM &PageBottomHTML; #in ubb_library.pl } #end GetAnnounce sr ## HTML CODE #### sub EditBio { print< $BBName - Edit Profile $HeaderInsert $Header
Modify Your Profile

It is your responsibility to keep your profile information up-to-date. Do not ask the administrator or moderators to do this for you.


To modify your current profile information, please identify yourself below.

UserName
Password
Forget your password?  
 
$Footer EDITbioHTML } ##END EDIT BIO SR sub BioModifyConfirmHTML { &GetCookieInfo; if ($SetCookies eq "DirectorySpecific") { $ExtraInfo = qq(domain=$TheDomain;path=/$ThePath;); } else { $ExtraInfo = ""; } print< Member Profile Modification Confirmation $HeaderInsert $Header

Thank you, $UserName. Your profile has been successfully updated.

$ModifyWarning

Return to: Forums Summary Page
Edit Your Profile
Help/FAQ

$Footer HTML } ## END Bio Modify Confirmation sr sub SetPrefs { &get_cookie; #retrieves all current cookies $CurrentDaysPrune = "$cookie{DaysPrune}"; $CurrentNS = "$cookie{NameStorage}"; if ($CurrentNS eq "yes") { $NSOn = "CHECKED"; $NSOff = ""; } elsif ($CurrentNS eq "no") { $NSOff = "CHECKED"; $NSOn = ""; } else { $NSOn = "CHECKED"; $NSOff = ""; } if ($CurrentDaysPrune eq "1") { $DP1On = "SELECTED"; } elsif ($CurrentDaysPrune eq "2") { $DP2On = "SELECTED"; } elsif ($CurrentDaysPrune eq "5") { $DP5On = "SELECTED"; } elsif ($CurrentDaysPrune eq "10") { $DP10On = "SELECTED"; } elsif ($CurrentDaysPrune eq "20") { $DP20On = "SELECTED"; } elsif ($CurrentDaysPrune eq "30") { $DP30On = "SELECTED"; } elsif ($CurrentDaysPrune eq "45") { $DP45On = "SELECTED"; } elsif ($CurrentDaysPrune eq "60") { $DP60On = "SELECTED"; } elsif ($CurrentDaysPrune eq "75") { $DP75On = "SELECTED"; } elsif ($CurrentDaysPrune eq "100") { $DP100On = "SELECTED"; } elsif ($CurrentDaysPrune eq "365") { $DP365On = "SELECTED"; } elsif ($CurrentDaysPrune eq "1000") { $DP1000On = "SELECTED"; } else { $DP1On = "SELECTED"; } if ($DisplayRegistration eq "NO") { $StoreNameWording = qq(); $NameOption = ""; $NSCookieSlot = ""; } else { $StoreNameWording = qq% Store Username & Password in browser memory for 1 year (otherwise you will have to type your username and password once per browser session)

yes no
%; $NameOption = qq%
  • the option to store your username and password in memory for one year (you won't have to type your name/password at all during that year). If you check no, your username and password will be saved after you type it once, but only for that browser session (no long-term memory)%; $NSCookieSlot = qq%if (NameStorage == "yes") { document.PREFS.NameStorage[0].checked = true; } else { document.PREFS.NameStorage[1].checked = true; }%; } print< $BBName Preferences $HeaderInsert $Header
    Forum Preferences

    We use cookies to store your preferences. Sometimes cookies become corrupted or deleted in your browser. If so, you may want to delete all cookies that have been set by this forum. This will mean that all previously saved cookie info will be lost, but it will also mean that any possible cookie problem may be fixed.

    Click here to delete all cookies set by this forum!

    $BorderTop $StoreNameWording
    You may customize this bulletin board to reflect your preferences. Below are your preference options.
      $NameOption
    • the standard number of days (history) for viewing topics

    Default Topic View:
    $BorderBottom



    Note: Your preferences are stored as cookies in your browser. Thus, you must be using a cookies-enabled browser (Netscape and Microsoft Internet Explorer both support cookies). If your browser does not support cookies or you have the cookies option turned off in your browser preferences, the settings you make above will not take affect. Also, please note that the settings are set to last for one year. After each year, you will have to reset your preferences.


    $Footer
    PrefsHTML } ## END Set Prefs SR ## sub PrefsSubmit { &GetCookieInfo; if ($SetCookies eq "DirectorySpecific") { $ExtraInfo = qq(domain=$TheDomain;path=/$ThePath;); } else { $ExtraInfo = ""; } print< $HeaderInsert $Header

    $Footer CONFIRMHTML } sub ViewBioHTML { if ($thisprofile[3] eq "") { $thisprofile[3] = " "; } if ($thisprofile[5] eq "") { $thisprofile[5] = " "; } if ($thisprofile[6] eq "") { $thisprofile[6] = " "; } if ($thisprofile[7] eq "") { $thisprofile[7] = " "; } if ($thisprofile[9] eq "") { $thisprofile[9] = " "; } if ($thisprofile[10] eq "") { $DateRegistered = "Not available."; } else { $DateRegistered = "$thisprofile[10]"; #format date----------------------------------- if ($DateFormat eq "US") { $DateRegistered = $DateRegistered; } elsif ($DateFormat eq "Euro") { $DateRegistered = &DateFormat("$DateRegistered", "Euro"); } elsif ($DateFormat eq "USX") { $DateRegistered = &DateFormat("$DateRegistered", "USExpanded"); } else { $DateRegistered = &DateFormat("$DateRegistered", "EuroExpanded"); } } #end if/else thisprofile[10] if ($thisprofile[8] eq "Administrator") { $ThisStatus = "$AdminTitle"; } elsif ($thisprofile[8] eq "Moderator") { $ThisStatus = "$ModeratorTitle"; } elsif ($thisprofile[8] eq "Member") { $ThisStatus = "$MemberTitle"; } else { $ThisStatus = "$JrMemberTitle"; } $ICQline = "$thisprofile[13]"; if ($ICQline eq "") { $ICQline = " "; } $SearchName = "$thisprofile[0]"; $SearchName = &HTMLIFY($SearchName); $SearchName =~ tr/ /+/; # remove all HTML code from display fields of profile $profile_index = 0; foreach(@thisprofile){ $thisprofile[$profile_index] =~ s/<.+?>//g; $profile_index++; } $ICQline =~ s/<.+?>//g; print < $HeaderInsert $Header
    Profile for $thisprofile[0]

    Search: All posts by this registered user.

    $BorderTop
    Date Registered: $DateRegistered
    Status: $ThisStatus
    Total Posts: $thisprofile[7]
    Current Email: $EmailField
    Homepage: $thisprofile[3]
    Occupation: $thisprofile[5]
    Location: $thisprofile[6]
    Interests: $thisprofile[9]
    ICQ Number: $ICQline
    $BorderBottom

    $YourCopyrightNotice



    $infopopcopy
    Ultimate Bulletin Board $Version



    $Footer BioHTML } ## END View BIO HTML sr sub ProcessEdit { if ($EmailView eq "no") { $EVno = "CHECKED"; } else { $EVyes = "CHECKED"; } if ($Status eq "Administrator") { $Status = "$AdminTitle"; } elsif ($Status eq "Moderator") { $Status = "$ModeratorTitle"; } elsif ($Status eq "Member") { $Status = "$MemberTitle"; } else { $Status = "$JrMemberTitle"; } if (($UseEmail eq "ON") && ($EmailVerify eq "ON")) { $WarningHTML = "Warning: Because we require email verification, if you change your email address, a new password will be created for you and emailed to the new email address you list. Thus, do not change your email address unless you can retrieve email from it to get your new password."; } else { $WarningHTML = ""; } $Signature = &EditUBBConvert("$Signature"); $Signature =~ s/

    /\n\r\n/isg; $Signature =~ s/
    /\n/isg; if ($AllowSignature eq "YES") { $SigStatus = "enabled"; }else { $SigStatus = "not enabled"; } unless ($AllowSignatureImage eq 'YES') { $SigImageAllowed = 'The UBB Code Image tag is not permitted, however.' } if ($AllowMassMail eq "no") { $AllowMailNo = "CHECKED"; $AMM = qq(); } elsif ($AllowMassMail eq "") { $AllowMailYes = "CHECKED"; $AMM = qq(); } else { $AllowMailYes = "CHECKED"; $AMM = qq(); } print< $HeaderInsert $Header
    Modify Your Profile

    Thank you! We have confirmed your identity, $UserName ($Status)

    Feel free to modify any of the fields below.


    $WarningHTML

    $AMM $BorderTop
    Email Address
    Password
    Homepage
    Occupation
    City, State, Country
    Interests
    ICQ Number

    Signature
    Note: The Signature feature is currently $SigStatus by this bulletin board's administrator. You may use UBB Code in this field, but not HTML. $SigImageAllowed

    Allow Bulletin Board Administrators and Moderators To Send You Email Notices?
    yes     no
    Keep your email address viewable to other users when you post notes?
    yes no
    $BorderBottom

    $Footer EditHTML } ##END Process Edit SR sub AnnounceTopHTML { print< $BBName Announcements $HeaderInsert $Header

    $Forum
    (moderated by $ModeratorLine)
      $BBName
      $Forum


    profile | register | preferences | faq | search
    Current Announcements: $listtotal
    Note: Announcements are made by bulletin board administrators and moderators only. You may not reply to these announcements.
    TOP } #end AnnounceTopHTML sr sub RegSubmit { &HackChecker; if ($SuspendRegister eq "true") { &StandardHTML("Sorry, we are not accepting new registrations currently."); exit; } #get user's IP number: my $IPNumber = $ENV{'REMOTE_ADDR'}; unless (-e "$MembersPath/emailfile.cgi") { &StandardHTML("We are upgrading our software at the moment and cannot process new registrations. Please try registering again in a little while. Thank you!"); exit; } if (-e "$MembersPath/temp.file") { &StandardHTML("We are temporarily upgrading our Memberships. This process only takes a minute or two. Please try registering again in a couple of minutes. Thank you!"); exit; } if (-e "$NonCGIPath/temp.file") { &StandardHTML("We are temporarily upgrading our Memberships. This process only takes a minute or two. Please try registering again in a couple of minutes. Thank you!"); exit; } #Check Email Ban List-- &CheckBans; ## Check to make sure censored words are not used in username if ($Censor eq "ON") { @censored = split(/ /, $censorwords); $BadWord = "false"; CHECKCENSORLIST: for (@censored) { if (m/({)(.*)(})/) { $_ = ("$2"); } if ($UserName =~ /$_/i) { $BadWord = "true"; $CensorWord = $_; last CHECKCENSORLIST; } } #end for checkcensorlist if ($BadWord eq "true") { $RejectUserName = "true"; &StandardHTML("Sorry, you have attempted to register a name that includes a word (\"$CensorWord\") that has been censored on this bulletin board."); } } #end if censor is on if (($BannedEmail ne "true") && ($RejectUserName ne "true")){ if (($UseEmail eq "ON") && ($EmailVerify eq "ON")) { if ( ($UserName eq "") || ($Email !~ /\S+\@\S+\.\S+/) ) { &StandardHTML("You did not properly complete all required form fields! Remember that you must enter a valid email address. Please go back and re-enter."); } else { &GoAhead; } } else { if ( ($UserName eq "") || ($Email !~ /\S+\@\S+\.\S+/) || ($in{'Password'} eq "") || ($PasswordConfirm eq "") ) { &StandardHTML("You did not properly complete all required form fields! Remember that you must enter a valid (properly formatted) email address. Please go back and re-enter."); } else { if ($in{'Password'} eq "$PasswordConfirm") { &GoAhead; } else { &StandardHTML("Registration Failed!

    You failed to type the same password twice on the registration form. Please go back and try again.

    Use your back button to try again."); } } } } # end if banned email ne true } ## END RegSubmit SR ## sub GoAhead { #check for illegal (non alphanumeric characters) if (($UserName =~ m/^\s/) || ($UserName =~ m/\ /) || ($UserName =~ m/\s$/) || ($UserName =~ m/\s{2,}/) || ($UserName =~ m/\|\!/) || ($UserName =~ m/\|\|/) || ($UserName =~ m/\|$/) || ($UserName =~ m/^\|/) || ($UserName =~ m/\"/) || ($Email =~ m/\s/) || ($UserName =~ m/>|

    1. You may not begin or end a User Name with a space.

    2. You may not have two or more consecutive spaces.

    3. You may not use a name with a pipestem followed by an exclamation point.

    4. You may not use a name with a two consecutive pipestems.5. You may not use any quotation marks.

    6. Your email address must not contain any spaces.

    7. You may not use a name that contains a < and a > .

    8. You may not use a name that contains memberslist or emailfile.

    9. You must start and end your username with an English letter or number or one of the following symbols: !, ?, #, $, @, *, &, ^, +, -, ~, :, ], [, '.

    10. You may not include a semicolon.

    Use your back button to try again.
    "); exit; } else { #check to make sure Username is unique #determine EmailList array, members array & LastNumber $UserName =~ s/\s+/ /g; $Email =~ s/\s+//g; &GetMemberListArray; &GetEmails; # LastNumber = last number used in members file my $LastNum = $LastNumber; $AddOne = $LastNum + 1; $NextNumber = sprintf("%8d", $AddOne); $NextNumber =~ tr/ /0/; $duplicate = "no"; $LCusername = lc($UserName); CHECKDUPES: for $checkthis(@members) { $LCcheckthis = lc($checkthis); if ($LCcheckthis eq "$LCusername") { $duplicate = "yes"; &StandardHTML("Someone else has already registered that UserName. Please try again. Use your back button."); last CHECKDUPES; } } #CHECK to make sure email isn't a duplicate too $RegEmail = lc($Email); if (($duplicate ne "yes") && ($EmailCheck eq "true")) { # @EmailList contains all registered emails CHECKEMAIL: foreach $thisemail(@EmailList) { ($theemail, $junk) = split(/\?\?/, $thisemail); $checkemail = lc($theemail); if ($RegEmail eq "$checkemail") { $duplicate = "yes"; &StandardHTML("Someone else has already registered that email address. Please try again. Use your back button."); last CHECKEMAIL; } } } #END if duplicate ne yes if ($duplicate ne "yes") { if (($UseEmail eq "ON") && ($EmailVerify eq "ON")) { #generate password $Password = &GeneratePassword; } else { $Password = "$in{'Password'}"; } # Get Today's Date so we can log the date of registration &GetDateTime; #Prepare Signature - prevent HTML, strip returns, do UBB Code @censored = split(/ /, $censorwords); $Signature = &CensorCheck("$in{'Signature'}"); $Signature =~ s/()//isg; $Signature =~ s//>/g; $SignatureHTML = &ConvertReturns("$Signature"); if ($AllowSignatureImage eq 'no'){ $OverrideImages = "yes"; } else { $OverrideImages = "no"; $UBBImages = 'ON'; } $SignatureHTML = &UBBCode("$SignatureHTML"); $in{'ICQnum'} =~ s/\D//sg; # rem non numbers @filter_these = ("Occupation","Location","URL","Interests","RegEmail"); # rem HTM and unclosed tags foreach(@filter_these){ $$_ =~ s/<.+?>//sg; $$_ =~ s/$MembersPath/$NextNumber.cgi") or die("Unable to open Members directory."); print MEMBERSHIP ("$UserName\n"); print MEMBERSHIP ("$Password\n"); print MEMBERSHIP ("$RegEmail\n"); print MEMBERSHIP ("$URL\n"); print MEMBERSHIP ("$WritePermission\n"); print MEMBERSHIP ("$Occupation\n"); print MEMBERSHIP ("$Location\n"); print MEMBERSHIP ("0\n"); print MEMBERSHIP ("Junior Member\n"); print MEMBERSHIP ("$Interests\n"); print MEMBERSHIP ("$HyphenDate\n"); print MEMBERSHIP ("$in{'EmailView'}\n"); print MEMBERSHIP ("$SignatureHTML\n"); print MEMBERSHIP ("$in{'ICQnum'}\n"); print MEMBERSHIP ("$in{'AllowMassMail'}\n"); close (MEMBERSHIP); &Unlock ("lock.file"); chmod (0777, "$MembersPath/$NextNumber.cgi"); ## APPEND NEW REGISTRATION TO REG FILE &Lock ("lock.file"); open (LIST, ">>$MembersPath/memberslist.cgi"); print LIST "$UserName|!!|$NextNumber\n"; close (LIST); &Unlock ("lock.file"); chmod (0666, "$MembersPath/memberslist.cgi"); &Lock ("lock.file"); open (LIST, ">>$MembersPath/emailfile.cgi"); print LIST "$RegEmail||$NextNumber\n"; close (LIST); &Unlock ("lock.file"); chmod (0666, "$MembersPath/emailfile.cgi"); if ($UseEmail eq "ON") { ### EMAIL VERIFY 'ON' section # standard email verification -> send new user a password if ( ($ModerateRegs eq 'OFF') && ($EmailVerify eq "ON") ){ $sendto = "$Email"; $from = "$RegsAdminEmail"; $subject = "$BBName Registration - Your Password"; $message = "Hello!\n\r\nThank you for registering on $BBName ($CGIURL/Ultimate.cgi). Your registration is provided below, including your new password. You will need this information in order to post any messages in our forums at $CGIURL/Ultimate.cgi .\n\r\nYour UserName: $UserName\nYour Password: $Password\nYour Email Address of record is: $RegEmail\n\r\nNote that you change this password online using the \"edit profile\" button on our bulletin board. If you change your registered email address, however, a new random password will be emailed to you so that we can verify any new email address you use.\n\r\nAgain, thank you for registering."; $RegWording1 = "You have successfully registered the name $UserName for $BBName. "; $RegWording2 = "Your password has been emailed to you at $Email"; } # standard email verification but no posting until approval -> send adult user a password elsif ( ($ModerateRegs eq 'ON') && ($EmailVerify eq "ON") && ($in{'regtype'} ne 'COPPA') ) { $sendto = "$Email"; $from = "$RegsAdminEmail"; $subject = "$BBName Registration Request Received"; $message = "Hello!\n\r\nThank you for registering on $BBName ($CGIURL/Ultimate.cgi). \n\r\nNote: your registration must be approved by the administrator before you can post. Please be patient. Keep the following information in order to post any messages in our forums at $CGIURL/Ultimate.cgi .\n\r\nYour UserName: $UserName\nYour Password: $Password\nYour Email Address of record: $RegEmail\n\r\nIf you change your registered email address, however, a new random password will be emailed to you so that we can verify any new email address you use.\n\r\nAgain, thank you for registering.\n\r\nIf you have questions about your registration request contact $RegsAdminEmail\n\r\n"; $RegWording1 = "You have successfully reserved the name $UserName for $BBName. "; $RegWording2 = "Your password has been emailed to you at $Email."; } # standard email verification but no posting until approval -> send COPPA user a password elsif ( ($ModerateRegs eq 'ON') && ($EmailVerify eq "ON") && ($in{'regtype'} eq 'COPPA') ) { $sendto = "$Email"; $from = "$RegsAdminEmail"; $subject = "$BBName Registration Request Received"; $instructions = $COPPAInstructions; $instructions =~ s/"/"/ig; $instructions =~ s/
    /\n/ig; $instructions =~ s/

    /\n\n/ig; $message = "Hello!\n\r\nThank you for asking to register on $BBName ($CGIURL/Ultimate.cgi).\n\r\nWe have reserved the following:\n\r\nYour UserName: $UserName\nYour Password: $Password\n\r\nBecause you are under 13 your registration information must be approved by your parent or guardian before you can participate. You must have this approval sent to us or we will delete your registration.\n\r\nPrint out and follow these instructions:\n\r\n$instructions \n\r\nIf you have questions about your registration request contact $RegsAdminEmail.\n\r\n"; $RegWording1 = "You have successfully reserved the name $UserName for $BBName. "; $RegWording2 = "Your password has been emailed to you at $Email"; } if ($EmailVerify eq "ON") { $BBEmail = $RegsAdminEmail; if ($SMTPEmail eq "On") { &SendEmail; } else { &send_mail("$BBEmail", "$sendto", "$subject", "$message"); } } ### EMAIL VERIFY 'OFF' section # This is an ADULT request elsif ( ($ModerateRegs eq 'ON') && ($EmailVerify eq "OFF") && ($in{'regtype'} ne 'COPPA') ) { $RegWording1 = "You have successfully registered the name $UserName for $BBName. "; $RegWording2 = "$Password"; } # This is a COPPA request elsif ( ($ModerateRegs eq 'ON') && ($EmailVerify eq "OFF") && ($in{'regtype'} eq 'COPPA') ) { $RegWording1 = "Thank you for asking to register on $BBName ($CGIURL/Ultimate.cgi).\n\r\nYou have successfully reserved the name $UserName for $BBName. \n\r\nBecause you are under 13 your registration information must be approved by your parent or guardian before you can participate. You must have this approval sent to us or we will delete your registration.\n\r\nPrint out and follow these instructions:\n\r\n$instructions \n\r\nIf you have questions about your registration request contact $RegsAdminEmail.\n\r\n"; $RegWording2 = "$Password"; } if ($in{'regtype'} eq 'COPPA') { &PrintCOPPARegistrationHTML; } else { &PrintRegistrationHTML; } # Send email to parent if listed if ($in{'ParentEmail'} =~ /\S+\@\S+\.\S+/) { $BBEmail = $RegsAdminEmail; $sendto = $in{'ParentEmail'}; $from = "$RegsAdminEmail"; $subject = "Registration Request Submitted for $BBName"; $message = qq( Hello! We received a registration request from someone under 13 naming you as Parent or Guardian. The Bulletin Board $BBName requires permission before your son/daughter can activate a registration. We asked your son/daughter to print out the registration form for you to sign and send in. The same form is available at $CGIURL/ubbmisc.cgi?action=showcoppaform Our privacy policy describes the web site and our use of the information we gather at $PrivacyURL Please review the form with your son/daughter and follow the instruction printed at the top of the page. If there are questions please contact $RegsAdminEmail Thank you. ); # end qq if ($SMTPEmail eq "On") { &SendEmail; } else { &send_mail("$BBEmail", "$sendto", "$subject", "$message"); } }# end if parent email } else { # email is turned off ! if ($in{'regtype'} eq 'COPPA') { $RegWording1 = "You have successfully registered your User Name and Password for $BBName but your registration will not be activated until we receive approval from your parent or guardian. Print out this page and follow the instructions. $COPPAInstructions"; $RegWording2 = "$Password"; &PrintCOPPARegistrationHTML; } else { $RegWording1 = "You have successfully registered your User Name and Password for $BBName. "; $RegWording2 = "$Password"; &PrintRegistrationHTML; } } # end if/else email #1 if ( ($OnRegsNotifyAdmin ne 'OFF') && ($UseEmail eq 'ON') ) { # COPPA notify only - no adults if (($OnRegsNotifyAdmin eq 'COPPA') && ($in{'regtype'} eq 'COPPA')) { $notifyadmin++; # flag it $sendto = "$RegsAdminEmail"; $from = "$RegEmail"; $subject = "COPPA Registration Request"; $message = "Parent/Guardian Email: $in{'ParentEmail'}\n\r\n"; $message = "The following information was submitted:\n\r\n"; } # All Regs Notify elsif ($OnRegsNotifyAdmin eq 'ON') { $notifyadmin++; # flag it $sendto = "$RegsAdminEmail"; $from = "$RegEmail"; $subject = "New Registration Request"; $message = "The following information was submitted:\n\r\n"; } # else do nothing if flag isn't set if ($notifyadmin) { # only email if the flag is set $message .= &PrintProfileText(); if ($WritePermission !~ /Write/) { $message .= "\n\r\n Click here to activate the Posting Privileges:\n\r\n"; $message .= "$CGIURL/cpanel4.cgi?action=updatepermiss&AdminWrite::$NextNumber=true&RemoteUpdate=TRUE\n\r\n"; $message .= "[You must be logged in already as Admin to use this direct link]\n\r\n"; } else { $message .= "\n\r\nPosting Privileges are ON for this user\n\r\n"; } $BBEmail = $RegsAdminEmail; if ($SMTPEmail eq "On") { &SendEmail; }else { &send_mail("$RegsAdminEmail", "$sendto", "$subject", "$message"); } } # end if notifyadmin } # end if Notify Admin } # end use email/verify on check } ### end if dupe ne yes } # end GoAhead subroutine sub PrintRegistrationHTML { &GetCookieInfo; if ($SetCookies eq "DirectorySpecific") { $ExtraInfo = qq(domain=$TheDomain;path=/$ThePath;); } else { $ExtraInfo = ""; } if ($in{'regtype'} eq 'COPPA') { $welcomewording = "

    You cannot post until we receive approval from your parent or guardian. Print out this page or the email you will receive. Follow the instructions carefully

    "; $finalwords = $COPPAInstructions; } elsif ($ModerateRegs eq 'ON'){ $welcomewording = "

    The administrator must approve your registration request before you can post. Contact $RegsAdminEmail for more information

    Here is the information you submitted."; } else { $welcomewording = "

    Feel free to post messages on any of our forums. Your registration information is listed below.

    "; } print < User Registration Confirmation $HeaderInsert $Header
    Subject Announcement
    Congratulations!

    $RegWording1 $welcomewording

    User Name $UserName
    Password $RegWording2
    Email $Email
    City, State, Country $Location
    Occupation $Occupation
    Interests $Interests
    Homepage $URL
    Signature $SignatureHTML

    $finalwords

    Click here to enter the Bulletin Board now!





    .
    $Footer HTML } ## END Print Registration sr sub PWRequest { # Find the right registration &GetMemberListArray; &GetEmails; # returns @EmailList array $Found = ""; #lowercase the email input $sendto = lc($in{'sendto'}); $CountIt = 0; foreach $emailline(@EmailList) { ($theemail, $thenumber) = split(/\?\?/, $emailline); $theemail = lc("$theemail"); if ($theemail eq "$sendto") { chomp($thenumber); @thisprofile = &OpenProfile("$thenumber.cgi"); $YourName = "$thisprofile[0]"; $YourPassword = "$thisprofile[1]"; $CountIt = $CountIt + 1; $Found = "yes"; } } if ($CountIt >= 2) { &StandardHTML("Sorry, we cannot process your request because more than one person is using that email address."); exit; } if ($Found eq "yes") { #Send the Email $from = "$BBEmail"; $subject = "Your UserName and Password - $BBName"; $message = ("Here is the registration information you requested for $BBName. \n\n Your UserName is: $YourName\n Your Password is: $YourPassword \n\n This bulletin board is located at $CGIURL/Ultimate.cgi \n\nThank you!"); if ($SMTPEmail eq "On") { &SendEmail; } else { &send_mail("$BBEmail", "$sendto", "$subject", "$message"); } #Notify user that email has been sent &Forward("$CGIURL/Ultimate.cgi?action=intro&BypassCookie=true", "Your username and password for this bulletin board have just been emailed to you!

    You are now being automatically returned to the main forums page."); } else { &StandardHTML("We have no one registered with the email address you listed. Use your back button to try again."); } } #end PWRequest sr sub SocketTest { &StandardHTML("The Socket module is installed on your web server. You may use the Socket option for performing UBB email functions.

    Use your back button to return to the Variables page."); } sub SendThreadForm { if ($UBBFriendUSE eq 'OFF'){ &StandardHTML("Sorry! This feature is not activated on this bulletin board."); exit; } $Subject = &UNHTMLIFY($in{'Subject'}); print< $HeaderInsert $Header

    UBBFriend Send This Page To A Friend

    $BorderTop SendThread if ($UBBFriendUSE eq 'ON'){ print qq( );# end qq } # end if UBBFriend ON else { print qq( );# end qq } print qq(
    Your Name:
    Your Email (so your friend can reply to you):
    * This feature is available only to registered users. Please identify yourself.
       The email address from your profile will be the return address for this message.
    Your UserName:
    Your Password:
    Your Real Name:
    Send To (Person's Name):
    Send To (Email Address):
    Subject:
    Message:
    $BorderBottom

    ); # end qq &PageBottomHTML; } #end SendThreadForm sub SubmitThreadEmail { if ($UBBFriendUSE eq 'OFF'){ &StandardHTML("Sorry! This feature is not activated on this bulletin board."); exit; } if ($UBBFriendUSE eq 'RegUsers') { if (($in{'UserName'} eq "") || ($in{'Password'} eq "")) { &StandardHTML("You did not complete all required form fields! Please go back and re-enter."); exit; } $ProfileNumber = &GetUserNumber($UserName); if ($ProfileNumber ne "") { $NameFound = "yes"; } else { $NameFound = "no"; } if ($NameFound eq "yes") { #Check Password Now @thisprofile = &OpenProfile("$ProfileNumber.cgi"); if ($in{'Password'} eq "$thisprofile[1]") { $pwmatch = "true"; $Email = $thisprofile[2]; $Permissions = $thisprofile[4]; } } ## END IF MEMBER = Username.cgi condition if ($NameFound ne "yes") { &StandardHTML("We have no one registered with that user name. Use your back button to try again."); exit; } if (($NameFound eq "yes") && ($pwmatch ne "true")) { &StandardHTML("Sorry, but the password you entered was not correct. Please try again. Use your Back button."); exit; } if ($Permissions !~ /Write/) { &StandardHTML("Sorry, we are unable to send this email. You do not have posting privileges on this bulletin board"); exit; } else { $in{'FromEmail'} = $Email; # use the member's email address } } # end if UBBfriend eq RegUsers ## #validate required fields if (($in{'FromName'} eq "") || ($in{'EmailMessage'} eq "") || ($in{'SendToEmail'} !~ m/\S+\@\S+\.\S+/) || ($in{'EmailSubject'} eq "") || ($in{'FromEmail'} !~ m/\S+\@\S+\.\S+/) || ($in{'SendToName'} eq "") ) { &StandardHTML("You failed to complete all required fields, or you failed to provide a proper email address. Please use your back button to try again."); } else { $ReplyTo = "$in{'FromName'}<$in{'FromEmail'}>"; $sendto = $in{'SendToEmail'}; $subject = "$in{'EmailSubject'}"; $message = "$in{'EmailMessage'}"; if ($SMTPEmail eq "On") { &SendEmail; } else { &send_mail("$ReplyTo", "$sendto", "$subject", "$message"); } &Forward("$in{'ForwardURL'}", "We have sent your email to $in{'SendToEmail'}. You are now being taken back to the page from which you sent the email."); } #end if/else form validation } #end SubmitThreadEmail sub VerifyID { $NameFound = "no"; $ProfileNumber = &GetUserNumber($UserNamePrivate); if ($NumbersPrivate ne "") { if ($NumbersPrivate =~ /\:\:/) { @CheckAccess = split(/\:\:/, $NumbersPrivate); } else { @CheckAccess = $NumbersPrivate; } CHECKER: foreach $checker(@CheckAccess) { chomp($checker); ($checknum, $checkdir) = split(/\:/, $checker); if ($checknum eq "$number") { if ($checkdir eq "$DIRPW") { $ProceedNow = "true"; last CHECKER; } else { &StandardHTML("We cannot confirm your identity."); exit; } #if checkdir }# if checknum } #foreach } #if np if ($ProceedNow ne "true") { if ($ProfileNumber ne "") { $NameFound = "yes"; } else { $NameFound = "no"; } @thisprofile = &OpenProfile("$ProfileNumber.cgi"); if ($PasswordPrivate eq "$thisprofile[1]") { $Permission = "$thisprofile[4]"; $Status = $thisprofile[8]; ($GenPerms, $SpecificPerms) = split(/\&/, $Permission); $Moderator = ("Forum" . "$number" . "Moderator"); $Moderator = $$Moderator; #split up Mod var @mods = split(/\|\|\^\|\|/, $Moderator); $ModMatch = ""; foreach $unomod(@mods) { if ($unomod eq "$UserNamePrivate") { $ModMatch = "true"; } } if (($Status eq "Administrator") || ($ModMatch eq "true")) { $ProceedNow = "true"; } if (($SpecificPerms ne "") && ($ProceedNow ne "true")){ chomp($specificPerms); @accessarray = split(",", $SpecificPerms); CHECKARRAY: foreach $uno(@accessarray) { if ($uno eq "$number") { $ProceedNow = "true"; last CHECKARRAY; } } } } } } #end VerifyID sub GetIP { #print authorization screen- must be admin or mod my $IPTitle = qq($BBName - Show Logged IP Number For This Post); my $IPRunner = qq(I P      L O G      D I S P L A Y); my $IPIntro = qq(To view the logged IP number for this post, identify yourself below.); $IPHidden = qq(
    ); &AuthorizeCheck($IPTitle, $IPIntro, $IPHidden, $IPRunner); } sub CheckBans { my @banlist = &OpenFile("$NonCGIPath/BanLists/EmailBan.cgi"); if ($banlist[0] ne "") { my $banword = ""; CheckBanList: for $banword(@banlist) { chomp($banword); $banword2 = quotemeta($banword); if ($Email =~ m/$banword2/i) { &StandardHTML("Sorry, you have attempted to register with an email address that has been banned. We are not currently allowing the following email address to be registered:

    $banword

    Please feel free to email us at $BBEmail if you have any questions."); $BannedEmail = "true"; exit; last CheckBanList; } } } #if EmailBan list is not empty #Check IP Ban List-- my @IPbanlist = &OpenFile("$NonCGIPath/BanLists/IPBan.cgi"); if ($IPbanlist[0] ne "") { my $bannum = ""; CheckIPBanList: for $bannum(@IPbanlist) { chomp($bannum); $bannum2 = quotemeta($bannum); if ($IPNumber =~ m/$bannum2/i) { &StandardHTML("Sorry, but we are currently preventing anyone registering from your IP Number. Your IP Number is: $IPNumber.

    Please feel free to email us at $BBEmail if you have any questions."); $BannedEmail = "true"; exit; last CheckIPBanList; } } } #if IPBan list is not empty } sub PrintProfileText { my $message .= ("UserName: $UserName\n"); $message .= ("Password: $Password\n"); $message .= ("RegEmail: $RegEmail\n"); $message .= ("URL: $URL\n"); $message .= ("Permission: $WritePermission\n"); $message .= ("Occpation: $Occupation\n"); $message .= ("Location: $Location\n"); $message .= ("Number of Posts: 0\n"); $message .= ("Status: $Status\n"); $message .= ("Interests: $Interests\n"); $message .= ("Date: $HyphenDate\n"); $message .= ("EmailView: $in{'EmailView'}\n"); $message .= ("Signature: $in{'Signature'}\n"); $message .= ("ICQ: $ICQ\n"); $message .= ("Allow Mass Email: $in{'AllowMassMail'}\n"); return $message; } sub PrintCOPPARegistrationHTML { print <<"COPPA" Permission to Participate at $BBName

    Permission to Participate at $BBName

    Instructions for a Parent or Guardian

    $COPPAInstructions

    Here is the required information supplied with this registration request:

    User Name $UserName
    Password $RegWording2
    Email $Email

    Information supplied below is optional. Please review it carefully.

    To make changes to the profile information below, please click here and enter the username and password.

    City, State, Country $Location
    Occupation $Occupation
    Interests $Interests
    Homepage $URL
    Signature $SignatureHTML
    Allow Bulletin Board Administrators and Moderators To Send You Email Notices? $in{'AllowMassMail'}
    Keep your email address viewable to other users when you post notes? $in{'EmailView'}
    ICQ Number $in{'ICQ'}
       

    Please sign the form below and send it to us. [see instructions above]

    YES: I have reviewed the information my child has supplied and I have read the Privacy Policy for the web site. I understand that the profile information may be changed by $UserName using a password. I understand that I may ask for this registration profile be removed entirely.

    Parent/Guardian Full Name



    Signature



    Relation to Child



    Telephone



    Email Address



    Date

    Online Request Date $HyphenDate [available for online registration only]

    Please contact $RegsAdminEmail with any questions

    Contact Us | $MyHomePage | Privacy Statement

    $YourCopyrightNotice

    $infopopcopy
    Ultimate Bulletin Board $Version

    COPPA } # end SR exit(0); # comply with SafePerl