#!/usr/bin/perl # Whoops! If you see this message in your browser, your web hosting provider # has not properly mapped the .cgi file extension to Perl. # # Please contact them for more information. Mapping .cgi is easy for both # Unix and NT servers, and usually only takes a few seconds. # UBB.classic(tm) Program File # Ultimate Bulletin Board Core # $Id: ultimatebb.cgi,v 1.47 2003/02/07 22:02:47 cvscapps Exp $ # UBB.classic 6.x # Official Release Date for UBB.classic 6.0: March 15, 2001 # # First version of UBB created May 7, 1996 (by Ted O'Neill). # This entire program is copyright Infopop Corporation, 2003. # For more info on UBB.classic and other Infopop # Products and Services, visit: http://www.infopop.com # # Program Author: Ted O'Neill, with assistance from Michael Farris, Dave Dreezer # # Special Thanks to: Rosemary O'Neill, Mark Badolato, Charles Capps, # Graeme, Jesus de la Garza, Joe Siegler, Hal, Brett Harris, Kristi Miller, # Celeste Combs, everyone who beta-tested, and all of our support moderators! # # UBB.classic 6.x is dedicated to Edward Kriz. # # You may not distribute this program in any manner, modified or otherwise, # without the express, written consent from Infopop Corporation. # # You may make modifications, but only for your own use and within the confines # of the UBB.classic License Agreement (see our website for the full license). # # You may not distribute "hacks" for UBB.classic without approval from Infopop. # # Note: If you modify ANY code within your UBB.classic, we at Infopop Corporation # cannot offer you support -- thus modify at your own peril :) #use warnings; #our $warnhandler; #$SIG{__WARN__} = sub { $warnhandler .= $_[0]; }; #close STDERR; open(STDERR, ">", \$warnhandler) or die "Content-type: text/plain\n\nSTDERR -> warnhandler failed: $!"; #($ENV{REQUEST_METHOD} eq "GET" || $ENV{REQUEST_METHOD} eq "POST") or die "Unknown REQUEST_METHOD"; BEGIN { # get our modules directory set up ($0 =~ m!(.*)(\\|/)[^/\\]+!) && unshift(@INC, $1, "$1$2Modules"); $| = 1; } END { # print "
" . UBBCGI::escapeHTML($warnhandler) . ""; $filehandle && ref($filehandle) && $filehandle->cleanup(); } #print STDERR "Uh.\n"; use lib("./Modules", "."); # if there's no $0, or it's not sane... use strict; use Fcntl ':flock'; use UBBCGI qw(:cgi); # CGIPath/Modules/UBBCGI.pm use UBBCGI::Carp qw(fatalsToBrowser set_message carpout); # CGIPath/Modules/UBBCGI/Carp.pm #carpout(\*STDOUT); BEGIN { # pull in the best copy of Digest::MD5 that we can find do "Digest/MD5.pm"; if (!$Digest::MD5::VERSION) { require Digest::Perl::MD5; import Digest::Perl::MD5 'md5_hex'; } else { import Digest::MD5 'md5_hex'; } # end if } # end BEGIN use constant SEVENSEVENSEVEN => 0777; use constant SIXSIXSIX => 0666; use vars qw( $filehandle $forum_threads %forum_thread_data @alltheforums @allthecategories @memberslist_array %ProfileNumber %in %GotTime $vars_groups %vars_version_information %vars_style_reference %vars_wordlets_criterr %forum_recentmeta %vars_ci %vars_config $vars_graemlins %vars_misc %vars_registration %vars_forums %vars_styles %vars_display %vars_style %vars_email %vars_time %vars_search %vars_pm %vars_pntf %vars_poll %vars_wordlets %vars_wordlets_err %vars_wordlets_email %vars_wordlets_img %vars_wordlets_date %vars_wordlets_poll %template_html %template_match $user_permissions $username $password $last_login_dt $session_login_dt $last_login_j $session_login_j $days_prune $pubname $user_topic_view $user_number @ubber @login @session $Header_Popup $Footer_Popup $TBB_Popup $TBT_Popup $ThisHTML $HeaderClean $FooterClean $CurrentTab $Hiddens $direct_to $Legend $LoginWording $MainButtonsLine $ContactLine $TBT $TBB $Header $Footer $EmailHeader $show_logout $show_logout_noreg $instant_jscript $title_wording $poll $PNTF $pntf_cookie_data $ULTIMATEBB $trademark $trade $InfopopCopyright $version $version_number $masterCharset $release_j $exact_path @memberslist $memlistopen $cache_cookie $summary %member_profile %FILE_CACHE %GENERIC_GLOBALS $frontend $backend @benches ); ################################################################################## # NOTE TO USERS WHO ARE RUNNING UBB.classic IN THE NON-WRITABLE CGI-BIN SITUATION: # Modify the path in the following 'do' line to reflect the VariablesPath! # There is NO NEED to modify this line unless you are using a different # VariablesPath. PLEASE use the UBB's CGI directory as the VariablesPath # if at all possible. Thanks. ################################################################################## eval { do "vars_config.cgi"; }; &CheckDollarAt($@); # No need to touch this now that we have the VariablesPath! foreach my $file (qw(display misc email time search pm registration pntf poll ci template_match wordlets wordlets_err wordlets_img wordlets_date wordlets_pntf wordlets_poll)) { eval { do "$vars_config{VariablesPath}/vars_$file.cgi"; }; &CheckDollarAt($@); } # end foreach eval { require "$vars_config{CGIPath}/ubb_lib.cgi"; }; &CheckDollarAt($@); # &Bench("After vars_config & ubb_lib"); &InitImportantStuff; #ubb_lib &RequireCode("$vars_config{CGIPath}/ubb_lib_files.cgi"); &RequireCode("$vars_config{CGIPath}/ubb_lib_time.cgi"); &RequireCode("$vars_config{CGIPath}/ubb_lib_filehandler.cgi"); &RequireCode("$vars_config{CGIPath}/ubb_lib_filehandle.cgi"); # init our FileHandler object $filehandle = new UBB::FileHandler(\%vars_config, "global"); # load our template routines &LoadTemplate("public_common"); #out in the middle of nowhere, we have a subroutine! sub CheckDollarAt { my $error = shift; return unless $error; $masterCharset = "ISO-8859-1" unless $masterCharset; print header( -charset => "$masterCharset", -type => "text/html", ); print "
There was a compilation error while loading the UBB.classic"
. " libraries and data files:
\n$error
Sorry, this bulletin board is unavailable.
#The server is currently overloaded with requests. The bulletin board has #automatically turned itself off to help bring the server load back down.
#Please retry your request in a few minutes. Thank you for your paitence!
#}; # #if($^O =~ m/^linux$/i) { # if we're on a Linux box, we can enable basic load protection # if(-e "$vars_config{NonCGIPath}/forceclosed.cgi") { # my $untiltime = &OpenFileAsString("$vars_config{NonCGIPath}/forceclosed.cgi"); # if(time() > $untiltime) { # unlink("$vars_config{NonCGIPath}/forceclosed.cgi"); # } else { # &StandardHTML($shutdownmessage); # exit; # } # end if # } else { # if(-r "/proc/loadavg") { # open(LOADAVERAGE, "); # close(LOADAVERAGE); # if(($data[0] > 12.5) && ($data[2] > 7)) { # my $value = int(time() + 120 + rand(120)); # &WriteFileAsString("$vars_config{NonCGIPath}/forceclosed.cgi", $value); # &StandardHTML($shutdownmessage); # exit; # } # end if # } # end if # } # end if #} # end if # standard argument my $ubb = $in{ubb}; my $skip_cookie_check = ""; my $logoff = ""; #&Bench("Before ifs"); # perform user logoff? if ($ubb && ($ubb eq 'logoff')) { $skip_cookie_check = 'true'; my $cookieA = cookie( -name => "ubber$vars_config{Cookie_Number}", -value => ['', ''], -path => '/', -expires => '-2y' ); my $cookieB = cookie( -name => "session$vars_config{Cookie_Number}", -value => ['', ''], -path => '/', -expires => '-2y' ); my $cookieC = cookie( -name => "forumpw$vars_config{Cookie_Number}", -value => ['', ''], -path => '/', -expires => '-2y' ); #print header(-cookie=>[$cookieA, $cookieB, $cookieC]); print header( -cookie => [$cookieA, $cookieB, $cookieC, $pntf_cookie_data], -charset => "$masterCharset", ); # confirm logoff &set_page_elements; &StandardHTML($vars_wordlets{logged_off}); exit(0); } # end logoff if ($ubb && ($ubb eq 'clearcookies')) { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &clear_cookies; exit(0); } #end clearcookies if ($ubb && ($ubb eq 'dumpcookies')) { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &dump_cookies; exit(0); } #end clearcookies &RequireCode("$vars_config{CGIPath}/ubb_lib_secgroups.cgi"); &GetForumRecord(0); $vars_groups = new UBB::SecurityGroups({ 'CONFIG' => \%vars_config, 'FILEHANDLER' => $filehandle, 'VARSFORUMS' => \%vars_forums, 'IN' => \%in}); $vars_groups->load_groups(); if($vars_pntf{Enabled} eq "yes") { # if we have PNTF enabled &RequireCode("ubb_lib_pntf.cgi"); &RequireCode("ubb_lib_dumper.cgi"); import Data::ThatWhichDumps; $PNTF = UBB::PNTF->new(\%vars_config, $filehandle, \%vars_pntf, \%vars_forums); $PNTF->load(); my @pntf_cookie = cookie("PnTf_$vars_config{Cookie_Number}"); my @ubber_cookie = cookie("ubber$vars_config{Cookie_Number}"); my $thischeck = 0; if($ubber_cookie[0] && $ubber_cookie[4]) { my @up = &OpenProfile2($ubber_cookie[4]); if(!@up) { &StandardHTML($vars_wordlets_err{member_gone2}); } # end if $user_permissions = new UBB::SecurityToken($vars_groups, $ubber_cookie[4], \@up, \%vars_forums, \%in, \%vars_misc); $thischeck = 1; } elsif($vars_display{MembersOnlyAccess} eq "NO") { $thischeck = 1; } # end if if($thischeck) { my @pntf_cookie_append = $PNTF->append(&GetIPAddress, \@pntf_cookie, \@ubber_cookie, \%in, undef, undef, $user_permissions); if($pntf_cookie_append[0] && ($pntf_cookie_append[0] ne '') && # Cookie has something and (($pntf_cookie_append[0] ne $pntf_cookie[0]) || # UNIQID differs ($pntf_cookie_append[5] != $pntf_cookie[5]) || # or hidden value differs ($pntf_cookie_append[1] ne $pntf_cookie[1]) || # or IP differs ($pntf_cookie_append[3] ne $pntf_cookie[3])) ) { # or usernumber differs # then set the new cookie $pntf_cookie_data = cookie( -name => "PnTf_$vars_config{Cookie_Number}", -value => \@pntf_cookie_append, -path => '/', -expires => '+12h' ); } # end if } # end $thischeck $PNTF->write(); # closes the file } # end if if ($ubb eq 'markallread') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &mark_all_read; exit(0); } #end clearcookies if ($ubb eq 'forum_pw_check') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_forum.cgi"); &forum_pw_check; exit(0); } #end forum_pw_check # perform user login? @ubber = (); # nuke cookie if ($ubb eq 'do_login') { &GetOrPost("POST"); my $ip_number = &GetIPAddress; &check_ip_bans($ip_number); $skip_cookie_check = 'true'; &RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi"); my @user_info = &verify_id("$in{username}", "$in{password}"); # -> lib_2! my $pubname = $user_info[0]; my $dp = $user_info[1]; my $profile_number = $user_info[2]; my $mod_q = $user_info[3]; my $hidden = $user_info[4]; my $noav = $user_info[5]; my @temp_profile = &OpenProfile($profile_number); my($writeadmin,$this_un,$this_pw) = @temp_profile[4,0,1]; my @tzone = (split(/\|\^\|/, $temp_profile[39]))[1,2,0]; # chomp($mod_q); #6.1.0 - now forbidding login without queue approval if ($mod_q eq 'Q') { # user is registered but not approved! print header( -charset => "$masterCharset", -type => "text/html", ); &StandardHTML("$vars_wordlets_err{awaiting_approval}"); exit(0); } if ($writeadmin !~ /Write/) { #user has no write permissions -> can't login print header( -charset => "$masterCharset", -type => "text/html", ); &StandardHTML("$vars_wordlets_err{user_not_approved}"); exit(0); } if ($dp eq '') { $dp = "$vars_display{DaysPruneDefault}"; } my $cookie = cookie( -name => "ubber$vars_config{Cookie_Number}", -value => [$this_un, md5_hex($this_pw), $pubname, $dp, $profile_number, ($hidden || 0), ($noav || 0), @tzone], -path => '/', -expires => '+2y' ); $username = $in{username}; # Make sure user feels logged in @ubber = ($this_un, md5_hex($this_pw), $pubname, $dp, $profile_number, $hidden, $noav, @tzone); #print header(-cookie=>[$cookie]); print header( -cookie => [$cookie, $pntf_cookie_data], -charset => "$masterCharset" ); # display refer page my $clean_cgi = quotemeta("$vars_config{CGIURL}/ultimatebb.cgi"); my $clean_non = quotemeta($ULTIMATEBB); # Accelerator if (($in{refer} ne '') && ($in{refer} !~ m/register|age|coppa/i) && ($in{refer} !~ /(logoff|cookies|find_lost|password)$/) # Comment out the following line to allow redirects back to anywhere && ($in{refer} =~ /^($clean_cgi|$clean_non)/) ) { # take viewer back to topic &set_page_elements; &Transition("$in{refer}", "$vars_wordlets{thanks_for_login}", "$in{refer}"); exit(0); } else { $ubb = ''; } } # end do login # retrieve cookies unless we just set'em @ubber = @ubber ? @ubber : cookie("ubber$vars_config{Cookie_Number}"); if(@ubber && ($ubber[0])) { my @junk; ($username, $password, $pubname, $user_topic_view, $user_number, @junk) = @ubber; } # end if #if ($ubber[0] ne '') { $username = $ubber[0]; } #if ($ubber[1] ne '') { $password = $ubber[1]; } #if ($ubber[2] ne '') { $pubname = $ubber[2]; } #if ($ubber[3] ne '') { $user_topic_view = $ubber[3]; } #if ($ubber[4] ne '') { $user_number = $ubber[4]; } #make sure the user is not forging his cookie to get into a protected area #if (($vars_display{MembersOnlyAccess} eq 'YES') && (@ubber)) { if (@ubber) { my @checkTheProfile = &verify_id_num_2($username, $password, $user_number); unless ($checkTheProfile[4] =~ /Write/) { print header( -charset => "$masterCharset", ); &StandardHTML($vars_wordlets_err{user_not_approved}); } } @login = cookie("login$vars_config{Cookie_Number}"); if ($login[0] ne '') { $last_login_dt = $login[0]; } if ($login[1] ne '') { $last_login_j = $login[1]; } @session = cookie("session$vars_config{Cookie_Number}"); if ($session[0] ne '') { $session_login_dt = $session[0]; } if ($session[1] ne '') { $session_login_j = $session[1]; } # in case this is a new visitor! if ($last_login_dt eq '') { $last_login_dt = 'NEW'; } # is forum closed? if(($vars_misc{BBStatus} !~ /^ON/) && ((($ubb ne "avatar_select") || ($ubb ne "find_lost")) && ($in{cp} ne "cp"))) { my $isadm = ($username && &boolean_is_admin_or_mod(0, &OpenProfile($user_number) )) ? 1 : 0; my $isacl = ($vars_misc{BBStatus} =~ /ADMIN/) ? 1 : 0; my $ok = ($isadm && $isacl) ? 1 : 0; if(!$ok) { %vars_style = &LoadStyleTemplate("summary_page"); &set_page_elements; print header( -charset => "$masterCharset", -type => "text/html", ); &StandardHTML("$vars_misc{BBClosedMessage}"); exit(0); } # end if } # end off check # Once again... %vars_style = &LoadStyleTemplate($templatefile); &set_page_elements; # set login cookie, if necessary if ($skip_cookie_check ne 'true') { if ($session_login_dt eq '') { # set session cookie: # this is a temp cookie that stores previous last login my $cookie1 = cookie( -name => "session$vars_config{Cookie_Number}", -value => [$last_login_dt, $last_login_j], -path => '/' ); # set new last login my $cookie2 = cookie( -name => "login$vars_config{Cookie_Number}", -value => [$GotTime{LastLoginDT}, $GotTime{LastLoginJulian}], -path => '/', -expires => '+1y' ); my $cookie3; # reconfirm user data- in case profile details were changed if ($username ne '') { my @this_profile = &verify_id_num_2($username, $password, $user_number); # chomp($this_profile[1]); # chomp($this_profile[0]); # chomp($this_profile[21]); # chomp($this_profile[15]); # chomp($this_profile[35]); if ($this_profile[15] eq '') { $this_profile[15] = "$this_profile[0]"; } $cookie3 = cookie( -name => "ubber$vars_config{Cookie_Number}", -value => [$this_profile[0], md5_hex($this_profile[1]), $this_profile[15], $this_profile[21], $user_number, ($this_profile[35] || 0), ((split(/\|/, $this_profile[38]))[2] || 0), (split(/\|\^\|/, $this_profile[39]))[1,2,0]], -path => '/', -expires => '+2y' ); } #print header(-cookie=>[$cookie1, $cookie2, $cookie3]); print header( -cookie => [$cookie1, $cookie2, $cookie3, $pntf_cookie_data], -charset => "$masterCharset" ); } else { unless ($ubb =~ m/^(check_age|submit_new_reply|submit_new_topic|submit_registration|edit_profile)$/) { #print qq%Content-type: text/html\n\n%; print header( -cookie => [$pntf_cookie_data,], -charset => "$masterCharset", -type => "text/html", ); } # end unless } # end if } #if not do_login # members only access check if ($vars_display{MembersOnlyAccess} eq 'YES') { if (($username eq '') || ($logoff eq 'true')) { unless ($ubb =~ m/^(avatar_select|check_age|agree|show_coppa_form|register_page|underage_register_page|submit_registration|lost_password|find_lost)$/) { %vars_style = &LoadStyleTemplate("transition"); &set_page_elements; &LoadTemplate("public_login"); exit(0); } } } # all ubb options: $ubb = "" unless $ubb; if(($username && $user_number) && (!$user_permissions)) { # Yay, security groups! my @ur = &OpenProfile($user_number); $user_permissions = new UBB::SecurityToken($vars_groups, $user_number, \@ur, undef, undef, \%vars_misc); } # end if #die $user_permissions->has_permission("user_title", "define"); # forum summary if ($ubb eq '') { &RequireCode("$vars_config{CGIPath}/ubb_forum_summary.cgi"); &forum_summary; exit(0); } if ($ubb eq 'login') { &set_page_elements; &LoadTemplate("public_login"); exit(0); } if ($ubb eq 'agree') { &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); &do_agree; exit(0); } #end agree if ($ubb eq 'check_age') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); &check_age; exit(0); } #end coppa_agree if ($ubb eq 'register_page') { # &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); ®ister_page; exit(0); } #end register_page if ($ubb eq 'underage_register_page') { &GetOrPost("POST"); if ($vars_registration{COPPAType} eq 'COPPADenied') { &StandardHTML("$vars_wordlets_err{age_deny}"); } elsif ($vars_registration{COPPACheck} ne 'ON') { &StandardHTML("$vars_wordlets_err{coppa_turned_off}"); } else { &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); &underage_register_page; } exit(0); } #end underage_register_page if ($ubb eq 'show_coppa_form') { if ($vars_registration{COPPAType} eq 'COPPADenied') { &StandardHTML("$vars_wordlets_err{age_deny}"); } elsif ($vars_registration{COPPACheck} ne 'ON') { &StandardHTML("$vars_wordlets_err{coppa_turned_off}"); } else { &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); $vars_registration{'COPPAType'} = 'COPPAFormOnly'; %vars_style = &LoadStyleTemplate("registration"); &set_page_elements; my $COPPAInstructions = &ConvertReturns($vars_registration{COPPAInstructions}); &LoadTemplate("public_reg_confirm_kid"); } exit(0); } #end show_coppa_form if ($ubb eq 'submit_registration') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_registration.cgi"); &submit_registration; exit(0); } #end submit_reg if ($ubb eq 'forum') { if ($in{f} =~ /CAT:/) { my ($j, $cat_number); ($j, $cat_number) = split (/:/, $in{f}); $in{category} = $cat_number; &RequireCode("$vars_config{CGIPath}/ubb_forum_summary.cgi"); &forum_summary; } else { &RequireCode("$vars_config{CGIPath}/ubb_forum.cgi"); &get_forum; } exit(0); } # end forum if ($ubb eq 'rate_member') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &rate_member; exit(0); } #end rate_member if ($ubb eq 'email') { &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &email_user; exit(0); } #end email if ($ubb eq 'edit_my_profile') { &RequireCode( "$vars_config{CGIPath}/ubb_profile.cgi"); &edit_my_profile; exit(0); } #end edit_my_profile if ($ubb eq 'my_profile') { &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &my_profile; exit(0); } #end my_profile if ($ubb eq 'my_rating_list') { &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &my_rating_list; exit(0); } #end my_rating_list if ($ubb eq "recent_user_posts") { &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &recent_user_posts; exit(0); } #end recent_user_posts if ($ubb eq 'get_profile') { &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &get_profile; exit(0); } #end get_profile if ($ubb eq 'edit_profile') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &edit_profile; exit(0); } #end edit_profile if ($ubb eq 'avatar_select') { &GetOrPost("GET"); &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &avatar_select_menu; exit(0); } #end avatar_select if ($ubb eq 'preview_post') { #&GetOrPost("GET"); &RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi"); &preview_post; exit(0); } #end submit_new_topic if($ubb eq "poll") { &RequireCode("$vars_config{CGIPath}/ubb_poll.cgi"); &poll_dispatch; exit(0); } # end poll if ($ubb eq 'newtopic') { &RequireCode("$vars_config{CGIPath}/ubb_new_topic.cgi"); &new_topic_page; exit(0); } #end newtopic if ($ubb eq 'submit_new_topic') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_new_topic.cgi"); &submit_new_topic; exit(0); } #end submit_new_topic if ($ubb eq 'get_topic') { &RequireCode("$vars_config{CGIPath}/ubb_get_topic.cgi"); &get_topic($in{f}, $in{t}); exit(0); } #end get_topic if ($ubb eq 'print_topic') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &this_is_not_print_preview($in{f}, $in{t}); exit(0); } #end get_topic if ($ubb eq 'reply') { &RequireCode("$vars_config{CGIPath}/ubb_new_reply.cgi"); &reply_page; exit(0); } #end reply if ($ubb eq 'submit_new_reply') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_new_reply.cgi"); &submit_new_reply; exit(0); } #end submit_new_reply if ($ubb eq 'get_pm') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &get_pm; exit(0); } #end get_pm if ($ubb eq 'sent_pms') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &sent_pm_box; exit(0); } #end get_pm if ($ubb eq 'private_message') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &private_message; exit(0); } #end private_message if ($ubb eq 'submit_private_message') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &submit_pm; exit(0); } #end submit_pm if ($ubb eq 'pm_prune') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_prune; exit(0); } #end pm_prune if ($ubb eq 'pm_delete') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_delete; exit(0); } #end pm_delete if ($ubb eq 'pm_reply') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_reply; exit(0); } # end pm_reply if ($ubb eq 'submit_pm_reply') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &submit_pm_reply; exit(0); } #end submit_pm_reply if ($ubb eq 'ignore_list') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_list('ignore'); exit(0); } #end ignore_list if ($ubb eq 'buddy_list') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_list('buddy'); exit(0); } #end buddy_list if ($ubb eq 'do_ignore') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_do_list('ignore'); exit(0); } #end do_ignore if ($ubb eq 'do_buddy') { &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_do_list('buddy'); exit(0); } #end do_buddy if ($ubb eq 'update_ignore') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_update_list('ignore'); exit(0); } #end update_ignore if ($ubb eq 'update_buddy') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_pm.cgi"); &pm_update_list('buddy'); exit(0); } #end update_buddy if ($ubb eq 'get_ip') { &RequireCode("$vars_config{CGIPath}/ubb_get_topic.cgi"); &get_ip; exit(0); } #end get_ip if ($ubb eq 'delete_topic') { &RequireCode("$vars_config{CGIPath}/ubb_topic_maint.cgi"); &delete_topic; exit(0); } #end delete_topic if (($ubb eq 'close_topic') || ($ubb eq 'open_topic')) { &RequireCode("$vars_config{CGIPath}/ubb_topic_maint.cgi"); &topic_open_close; exit(0); } #end close_topic/open_topic if ($ubb eq 'stick_topic') { &RequireCode("$vars_config{CGIPath}/ubb_topic_maint.cgi"); &stick_topic; exit(0); } #end stick topic if ($ubb eq 'unstick_topic') { &RequireCode("$vars_config{CGIPath}/ubb_topic_maint.cgi"); &unstick_topic; exit(0); } #end unstick topic if ($ubb eq 'next_topic') { &RequireCode("$vars_config{CGIPath}/ubb_get_topic.cgi"); &next_topic; exit(0); } #end next_topic if (($ubb eq 'transfer') || ($ubb eq 'transfer_topic')) { &RequireCode("$vars_config{CGIPath}/ubb_topic_maint.cgi"); &transfer_topic; exit(0); } #end transfer if ($ubb eq 'edit_post') { &RequireCode("$vars_config{CGIPath}/ubb_edit_post.cgi"); &edit_post; exit(0); } #end edit_post if ($ubb eq 'submit_edit') { &GetOrPost("POST"); &RequireCode("$vars_config{CGIPath}/ubb_edit_post.cgi"); &submit_edit; exit(0); } #end submit_edit if ($ubb eq 'get_daily') { &RequireCode("$vars_config{CGIPath}/ubb_search.cgi"); &get_daily; exit(0); } #end get_daily unless($vars_search{AllowSearch} ne "TRUE") { if ($ubb eq 'search') { &RequireCode("$vars_config{CGIPath}/ubb_search.cgi"); &search; exit(0); } elsif($ubb eq 'search_tng') { &RequireCode("$vars_config{CGIPath}/ubb_search.cgi"); &search_tng_dispatch; exit(0); } #end search } #end check for search disabled if ($ubb eq 'send_topic') { &GetOrPost("POST") if $in{send_it}; &RequireCode("$vars_config{CGIPath}/ubb_friend.cgi"); &send_topic; exit(0); } #end send_topic if ($ubb eq 'faq') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &faq; exit(0); } #end faq if ($ubb eq 'ubb_code_page') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &ubb_code_page; exit(0); } #end ubb_code_page if ($ubb eq 'lost_password') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &lost_password; exit(0); } #end lost_password if ($ubb eq 'find_lost') { &GetOrPost("POST") unless(($in{cp} eq "cp") && ($ENV{HTTP_REFERER} =~ m/cp\.cgi/)); &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &find_lost; exit(0); } #end find_lost if ($ubb eq 'report_a_post') { &RequireCode("$vars_config{CGIPath}/ubb_lib_misc.cgi"); &report_a_post; exit(0); } #end find_lost if($vars_pntf{Enabled} eq "yes") { # Standard display if($ubb eq "pntf") { &RequireCode("$vars_config{CGIPath}/ubb_pntf.cgi"); &pntf_html; } # end pntf # Javascript version of the QuickSummary bits for inclusion on websites # # Disabled due to server load - perhaps in the future... # For now, a direct link to the cached copy will have to do. if($ubb eq "pntf_js") { &RequireCode("$vars_config{CGIPath}/ubb_pntf.cgi"); &pntf_js; } # end pntf # The *GOOD* stuff! if($ubb eq "pntf_admin") { &RequireCode("$vars_config{CGIPath}/ubb_pntf.cgi"); &pntf_admin; } # end pntf } # end if if($vars_display{EnableDirectory} ne "no") { if($ubb eq "directory") { &RequireUserLogin if $vars_display{EnableDirectory} eq "regonly"; &RequireCode("$vars_config{CGIPath}/ubb_profile.cgi"); &member_directory; } # end if } # end if %vars_style = &LoadStyleTemplate("transition"); # default error-- obviously they do not know where they are going &StandardHTML("$vars_wordlets_err{dead_end}"); exit(0); # comply with SafePerl #END { # print header(); # print "" . &DeBench . "