############################################################ # E-Blah Bulliten Board Systems Platinum # ############################################################ # Software Version : Platinum - 7 # # Project started : December 2001 by Justin # # Distrobuted by : http://www.eblah.com # # License Agreement : http://www.eblah.com/?v=license # ############################################################ # Copyright (c) 2001 - 2004 e-blah! - all rights reserved. # ############################################################ $theblahver = 13; $version = 'Platinum 7'; $versioncr = 'Platinum 7 Final'; # Debugging information $debug = 1; # 1 - just info :: 2/4 - sleep before output :: 3/4 - info with All Files open and closed #if($debug) { # eval { use Time::HiRes qw(time); }; # $START_TIME = time; #} $scripttype = -e('Blah.cgi') ? 'cgi' : 'pl'; # Once you have a working install, you can comment this out so that it will not require the CGI module use CGI::Carp 'fatalsToBrowser'; $languagep = "English"; $languages = "/home/minimarc/public_html/cgi-bin/forum/Languages"; require('Settings.pl'); require("$code/QuickCore.pl"); &UFS; &CheckCookies; if($URL{'theme'}) { $settings[26] = $URL{'theme'}; } # Preview if($settings[26] && -e("$theme/$settings[26].v2")) { require("$theme/$settings[26].v2"); } $language = "$languages/$languagep"; require("$language.lng"); require("$code/Routines.pl"); require("$code/Load.pl"); # Load basic forum settings that we can use later &LMG; &BoardCheck; &ClickLog; &AL; if(($maintance || (-e "$root/Maintance.lock") || $noguest) || $lockout) { CoreLoad('BoardLock'); &MainLO; } &Ban; &LoadBoard; sub UFS { my($query); @url = split(/\,/,$ENV{'QUERY_STRING'}); foreach (@url) { ($action,$actiondo) = split(/=/,$_); $URL{$action} = $actiondo; if($action =~ /\&/) { $blockform = 1; } # Hack attemp, block forms!! } if(!$blockform) { if($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/) { # If it's an upload (uses CGI library) ... require CGI; import CGI qw(:standard); $form = new CGI; foreach $var ($form->param) { $output = join(',',$form->param($var)); if(!$nouselist{$var}) { $FORM{$var} = $output; } } } else { # If it's not ... read(STDIN, my $temp, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/,$temp); foreach (@pairs) { ($key,$content) = split(/=/,$_); $content =~ tr/+/ /; $content =~ s/%(..)/pack("c",hex($1))/ge; $key =~ tr/+/ /; $key =~ s/%(..)/pack("c",hex($1))/ge; chomp($content); $FORM{$key} = $content; } } } } sub CoreLoad { my($temp1,$temp2) = @_; if($CoreLoaded{$temp1,$temp2}) { return; } $CoreLoaded{$temp1,$temp2} = 1; if($temp2 == 1) { $load = "$language/$temp1.lng"; } elsif($temp2) { $load = $temp1; } else { $load = "$code/$temp1.pl"; } eval { require($load); }; if($_[1] == 2) { if($@) { return(0); } return(1); } if($@) { &error(qq~$rtxt[52]\n\n$load\n\n\[size=1\]$@\[/size\]~,2); } } sub LoadBoard { %LoadBoard = ( 'memberpanel' => 'MemberPanel,MemberPanel', 'login' => 'Login,Login', 'mod' => 'Moderate,Moderate', 'register' => 'Register,Register', 'admin' => 'AdminList,AdminList', 'post' => 'Post,Post', 'ppoll' => 'Poll,PPoll', 'display' => 'MessageDisplay,MessageDisplay', 'mindex' => 'MessageIndex,MessageIndex', 'print' => 'Print,PrintDisplay', 'members' => 'Members,Members', 'report' => 'Report,Report', 'cal' => 'Calendar,CalendarLoad', 'download' => 'Attach,Download', 'stats' => 'Stats,Stats', 'search' => 'Search,Search', 'invite' => 'Invite,Invite', 'recommend' => 'Recommend,Recommend', 'mark' => ',Mark', 'shownews' => 'Portal,Shownews', 'portal' => 'Portal,Portal' ); if($LoadBoard{$URL{'v'}}) { ($core,$sub) = split(',',$LoadBoard{$URL{'v'}}); if($core ne '') { CoreLoad($core); } &$sub; } elsif($URL{'m'} && $URL{'b'}) { CoreLoad("MessageDisplay"); &MessageDisplay; } elsif($URL{'b'}) { CoreLoad("MessageIndex"); &MessageIndex; } else { CoreLoad('BoardIndex'); &LoadIndex; } } 1;