#!/usr/local/bin/perl # ### PRIMARY FREEWARE UBB SCRIPT ## # # Ultimate Bulletin Board is copyright Infopop Corporation, 1998-1999. # # ------------ Ultimate.cgi ------------- # # This file contains intro functionality for the Freeware 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. These "powered by" and copyright notices MUST # remain visible when the pages are viewed on the Internet. # # You may not SELL this script. You may offer it freely to others. # It is freeware. You may not alter the code and then call it another # name. You may not alter the code and then resell it under another # name, either. # # For more info on the Ultimate BB, including licensing info, # 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 "Styles.file"; require "ubb_library.pl"; }; print ("Content-type: text/html\n\n"); if ($@) { print "Error including required files: $@\n"; print "Make sure these files exist, permissions are set properly, and paths are set correctly."; exit; } &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 = &UNHTMLIFY($TopicSubject); } if ($Name eq "UserName") { $UserName = $Value; $UserNameFile = $UserName; $UserNameFile =~ s/ /_/g; #remove spaces } if ($Name eq "PasswordConfirm") { $PasswordConfirm = $Value; } if ($Name eq "number") { $number = $Value; } if ($Name eq "DaysPrune") { $DaysPrune = $Value; } if ($Name eq "topic") { $topic = $Value; } if ($Name eq "Email") { $Email = $Value; $Email =~tr/A-Z/a-z/; } if ($Name eq "URL") { $URL = &CleanThis($Value); $URL = &PipeCleaner($URL); } if ($Name eq "Permissions") { $Permissions = $Value; } if ($Name eq "Occupation") { $Occupation = &CleanThis($Value); $Occupation = &PipeCleaner($Occupation); } if ($Name eq "Location") { $Location = &CleanThis($Value); $Location = &PipeCleaner($Location); } if ($Name eq "TotalPosts") { $TotalPosts = $Value; } if ($Name eq "Status") { $Status = $Value; } if ($Name eq "Interests") { $Interests = &CleanThis($Value); $Interests = &PipeCleaner($Value); } if ($Name eq "sendto") { $sendto = $Value; } } # end FOREACH $row if ($VariablesPath eq "") { $VariablesPath = $CGIPath; } $SubjectCoded = &HTMLIFY($TopicSubject); $SubjectCoded =~ tr/ /+/; if (@in == 0) { &Intro; } if ($in{'action'} eq "intro") { &Intro; } if ($in{'action'} eq "noncoppareg") { &Agree; } if ($in{'action'} eq "agree") { if ($COPPACheck eq "ON"){ &COPPACheck; } else { &Agree; } } if ($in{'action'} eq "email") { &DoEmail($in{'ToWhom'}); } if ($in{'action'} eq "register") { &Register; } if ($in{'action'} eq "showcoppaform") { &PrintCOPPARegistrationHTML; } if ($in{'action'} eq "rules") { &Rules; } if ($in{'action'} eq "lostpw") { if ($UseEmail eq "ON") { &LostPW; } else { &StandardHTML("Sorry, but this feature is not available, per your administrator's directions. Use your back button to return to the BB."); } } ## INTRO PAGE SUBROUTINES #### sub Intro { &GetDateTime; &ForumsTopHTML; open (FORUMFILE, "$VariablesPath/forums.cgi"); @forums = ; close (FORUMFILE); @forums = grep(/\|/, @forums); @sortforums = @forums; for (@sortforums) { @thisforuminfo = split(/\|/, $_); chomp($thisforuminfo[8]); $x = "$thisforuminfo[8]"; $GetHour = ""; $GetMinute = ""; $MilHour = ""; $TheDate = ""; $LatestTime = ""; ## Get Forum Data from lastnumber.file(s) open (FORUMDATA, "$ForumsPath/Forum$x/lastnumber.file"); my @data = ; close (FORUMDATA); $TotalTopics = $data[1]; chomp($TotalTopics); $TotalPosts = $data[2]; chomp($TotalPosts); if ($TotalTopics eq "") { $TotalTopics = "0"; } if ($TotalPosts eq "") { $TotalPosts = "0"; } if ($TotalTopics > 0) { #open lasttime.file for forum open (LTime, "$ForumsPath/Forum$x/lasttime.file"); @lasttime = ; close (LTime); $LastDate = $lasttime[0]; $LastTime = $lasttime[1]; chomp($LastDate); chomp($LastTime); #split time/date ($GetHour, $GetMinute) = split(/:/, $LastTime); ($GetMinute, $AMpm) = split(/ /, $GetMinute); chomp($AMpm); ($GetMonth, $GetDate, $GetYear) = split(/-/, $LastDate); $CheckThisYear = length($GetYear); if ($CheckThisYear < 4) { if ($CheckThisYear == 2) { $GetYear = ("19" . "$GetYear"); } else { $GetYear = $GetYear - 100; $GetYear = sprintf ("%2d", $GetYear); $GetYear =~tr/ /0/; $GetYear = ("20" . "$GetYear"); } } &MilitaryTime2; $MilTime = "$MilHour:$GetMinute"; if ($TimeFormat eq "24HR") { $LatestTime = "$MilTime"; } else { $LatestTime = "$LastTime"; } if ($DateFormat eq "Euro") { $TheDate = "$GetDate-$GetMonth-$GetYear"; $DateWording = "All dates are in DD-MM-YY format."; } else { $TheDate = "$GetMonth-$GetDate-$GetYear"; $DateWording = "All dates are in MM-DD-YY format."; } } else { $GetMonth = ""; $GetDate= ""; $GetYear = ""; $LatestTime = ""; $TheDate = ""; } @thisforum = &GetForumRecord($x); $ForumName = $thisforum[1]; $Moderator = ("Forum" . "$x" . "Moderator"); $Moderator = $$Moderator; $ForumDesc = $thisforum[2]; $OnOff = $thisforum[3]; chomp($OnOff); $ForumCoded = &HTMLIFY($ForumName); $ForumCoded =~ tr/ /+/; $ForumDesc =~ s/"/"/g; if ($ForumDescriptions eq "no") { $ForumDesc = ""; } if ($GetMonth ne "") { # Compare Last Login Time to Last Post Time.. $LPMonth = $GetMonth; $CheckThisYear = length($GetYear); if ($CheckThisYear < 4) { if ($CheckThisYear == 2) { $JYear = ("19" . "$GetYear"); } else { $GetYear = $GetYear - 100; $GetYear = sprintf ("%2d", $GetYear); $GetYear =~tr/ /0/; $JYear = ("20" . "$GetYear"); } } else { $JYear = "$GetYear"; } } # end if/else month ne "" if ($OnOff eq "On") { &ForumsGutsHTML; } ## End IF ONOFF Conditional } &ForumsBottomHTML; } #END INTRO SR ### sub ForumsTopHTML { print < $BBName - powered by Infopop Ultimate Bulletin Board
$BBName
profile | register | faq
INTROHTML } ## END FORUMS TOP HTML sub ForumsGutsHTML { print < ForumSummary } ## END FORUMS GUTS HTML sub ForumsBottomHTML { print <

All times are $TimeZone. $DateWording

BOTTOMhtml &PageBottomHTML; } ## END Forums Bottom HTML subroutine ### END Intro Page Subroutines #### sub Agree { print <
Forum Posts Last Post Moderator
$ForumName
$ForumDesc
$TotalPosts $TheDate $LatestTime $Moderator
$BBName Rules


Registration for this bulletin board is completely free! If you agree to our rules below, you should press the "Agree" button, which will enable you to register. If you do not agree, press the "Cancel" button.
$BBName Rules & Policies

$BBRules

Agreement } sub Register { print< $BBName Registration Bulletin Board Registration

In order to post messages on this Bulletin Board, you must first register.

UserNames can be up to 25 characters and passwords can be a maximum of 13 characters. Please use only letters and numbers. Passwords are case-sensitive. This means that "Howard" is distinct from "HOWARD."

Note: all of the information provided on this page (with the exception of your password) will be viewable by anyone visiting the bulletin board. Thus, if you don't feel comfortable about completing certain fields, just leave them blank. In addition, your passwords are not encrypted and can be seen by the BB administrators. Do not use a password that you would be afraid to reveal to anyone. Required fields are marked by an asterisk.

User Name*
Password*
Enter Password Again*
Email*
City, State, Country
Occupation
Homepage
Interests






RegHTML } ## END Register SR ## 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.

Please add any other information you approve to the profile information below.

City, State, Country $Location
Occupation $Occupation
Interests $Interests
Homepage $URL
Keep your email address viewable to other users when you post notes? $in{'EmailView'}
   

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 $BBEmail with any questions

Contact Us | $MyHomePage | Privacy Statement

$YourCopyrightNotice

$infopopcopy
Ultimate Bulletin Board Freeware 2000d

COPPA } # end SR sub COPPACheck { # age check &GetDateTime; @months = ("blank" , "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $COPPADate = "$mday $months[$JSMonth] " . ($JSYear-13); print < $HeaderInsert $Header

$BBName

Registration - Age Verification

Please click the link that describes your age:

Born On or Before $COPPADate

Born After $COPPADate
 

Privacy Information

The Federal Trade Commission's Children's Online Privacy Protection Act of 1998 (COPPA) is intended to protect the privacy of children using the Internet. As of April 21, 2000, many Web sites are required to obtain parental consent before collecting, using, or disclosing personal information from children under 13.

See COPPA News Release and Full Text of Federal Register Notice [PDF 270K]

Please read $BBName Privacy Statement

Permission Form

A parent or guardian must mail or fax a signed permission form to the administrator of $BBName before a user under age 13 can complete the registration.

Contact Information
For further information contact $BBEmail.
 

Contact Us | $MyHomePage | Privacy Statement

$YourCopyrightNotice



Powered by Infopop Ultimate Bulletin Board Freeware 2000d

$Footer COPPACheck }