#!/usr/bin/perl # # ### FREEWARE UBB SCRIPT ## # # Ultimate Bulletin Board is copyright Infopop Corporation, 1998 - 2000. # # ------------ cpanel.cgi ------------- # # This file contains 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"; print ("Content-type: text/html\n\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 "mods.file"; require "Styles.file"; require "ubb_library.pl"; require "ubb_library2.pl"; }; 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 "action") { $action = $Value; } if ($Name eq "ViewEntire") { $ViewEntire = $Value; } if ($Name eq "NN") { $NN = $Value; $NN =~tr/A-Z/a-z/; } if ($Name eq "Email") { $Email = $Value; $Email =~tr/A-Z/a-z/; } if ($Name eq "UserName") { $UserName = $Value; } if ($Name eq "Password") { $Password = $Value; } } #end foreach loop if ($VariablesPath eq "") { $VariablesPath = $CGIPath; } if ($action eq "setmods") { &SetMods; } if ($action eq "UpdateThreads") { &UpdateThreads; } if ($action eq "styles") { &Styles; } if ($action eq "prune") { &StandardHTML("Sorry, but this feature is not available in the freeware version. The freeware version is a function-limited version of the licensed version of the UBB. Other features not included in the freeware version, but found in the licensed ver sion, include:
For more information on the licensed version, including current pricing, please visit: www.ultimatebb.com"); } if ($action eq "variables") { &Variables; } if ($action eq "permissions") { &Permissions; } if ($action eq "env") { &Env; } if ($action eq "logintoforums") { &LogIntoForums; } if ($action eq "getbio4admin") { &GetBio4Admin; } sub UpdateThreads { $PageTitle = "Update Threads"; &HEADERHTML; print<Note: only administrators may update HTML threads.

After you make changes to your control panel settings, these changes take affect immediately for all new pages. Older HTML pages, however, are not updated until you update them here. You should run this function after you have made all changes to your c ontrol panel settings.

Your User Name
Your Password

Threads } ## END UpdateThreads SR ## sub LogIntoForums { $PageTitle = "Set Forum Variables"; &HEADERHTML; print<
Your User Name
Your Password




Powered by the Ultimate Bulletin Board
Copyright, Infopop Corporation, 1998 - 2000.
ForumLoginHTML } # end logintoforums sr sub Env { print<

Your Environmental Variables

Use these to help you figure out your absolute file paths, and other system information.

Perl Info:
You are using Perl Version $]

Your Environmental Variables:
Note: "DOCUMENT_ROOT" shows your absolute path to your root web directory. "SCRIPT_FILENAME" shows you absolute path of your CGI directory. If your SCRIPT_FILENAME shows "/www/whatever/whatever/cgi-bi n/cpanel.cgi", your Absolute Path variable for your CGI directory would be "/www/whatever/whatever/cgi-bin".

TOP for $key (keys(%ENV)) { printf("%-10.20s: $ENV{$key}
", $key); } print< BOTTOM } # END ENV SR sub Permissions { $PageTitle = "Permissions Center"; &HEADERHTML; print<

Identify Yourself Below (case sensitive)
Your User Name
Your Password

Conduct Member Search:
User Name
Email Address
Number of Posts

If you want to view the entire list of users rather than conduct a search, check this box (not recommended for large membership sites since it could take a long time to process).





Control Panel | Bulletin Board

Powered by: Ultimate Bulletin Board, © Infopop Corporation, 1998-2000.
permissHTML } ## END Permissions ## sub Variables { $PageTitle = "Set Variables"; &HEADERHTML; print< To configure your bulletin board variables for the first time, click here.

To revise existing variables, you must first identify yourself, so that we can verify your status as an administrator.

Your User Name
Your Password




Copyright, Infopop Corporation, 1998 - 2000.
VARHTML } sub SetMods { $PageTitle = "Set Moderators"; &HEADERHTML; print<Note: only administrators may set moderators. Identify yourself below.
Your User Name
Your Password

ModTOP #get current moderator info $ForumTotal = &GetTotalForums; for ($x = 1; $x <= $ForumTotal; $x++) { @thisforum = &GetForumRecord($x); $ForumName = "$thisforum[1]"; $Moderator = ("Forum" . "$x" . "Moderator"); $Moderator = $$Moderator; print< MIDMOD } ##END FOREACH $line print<

TRUEBOTTOM } ## END SET MODS SR ## sub HEADERHTML { print< $BBName
$PageTitle

HEADER } #end HEADERHTML sr sub GetBio4Admin { @thisprofile = &OpenProfile("$UserName.cgi"); $EmailField = "$thisprofile[2]"; &ViewBioCPHTML; } ## END GET BIO sr sub ViewBioCPHTML { print < Profile for $thisprofile[0]


Forum Name Current Moderator Change to: $ForumName $Moderator
Date Registered: $DateRegistered
Status: $thisprofile[8]
Total Posts: $thisprofile[7]
Current Email: $EmailField
Homepage: $thisprofile[3]
Occupation: $thisprofile[5]
Location: $thisprofile[6]
Interests: $thisprofile[9]

BioHTML } ## END View BIO HTML sr sub Styles { $PageTitle = "Set Style"; &HEADERHTML; print<
Your User Name
Your Password




Copyright, Infopop Corporation, 1998 - 2000.
VARHTML }