#!/usr/bin/perl # ### PRIMARY UBB SCRIPT ## # # Ultimate Bulletin Board is copyright Infopop Corporation, 1998-2000. # # ------------ forumdisplay.cgi ------------- # # This file contains the functionality for the UBB # individual forum page display. # # 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 "ubb_library.pl"; }; print ("Content-type: text/html\n\n"); &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 "BypassCookie") { $BypassCookie = $Value; } if ($Name eq "category") { $category = $Value; $CategoryName = &GetCatName($category); } if ($Name eq "PasswordConfirm") { $PasswordConfirm = $Value; } if ($Name eq "number") { $number = $Value; unless($number =~ /^A:\d{6}$/i) { $number =~ s/\D//sg; } } if ($Name eq "DaysPrune") { $DaysPrune = $Value; } if ($Name eq "topic") { $topic = $Value; } if ($Name eq "TotalPosts") { $TotalPosts = $Value; } if ($Name eq "sendto") { $sendto = $Value; } } # end FOREACH $row if ($VariablesPath eq "") { $VariablesPath = $CGIPath; } if (-e "$ForumsPath/Forum$number/forumstyles.file") { require "$ForumsPath/Forum$number/forumstyles.file"; $use_forum_styles++; } else { require "$VariablesPath/Styles.file"; } $infopopcopy =~ s/\"\"/\"$CopyrightTextColor\"/; # fix missing copyright text color in custom styles my $RegLinkHere = ""; unless ($DisplayRegistration eq "NO") { $RegLinkHere = qq(Profil | Registrieren |); } if ($AllowSearch eq "FALSE") { $SearchOption = ""; } else { $SearchOption = qq(| Suchen); } if ($use_forum_styles) { # set above with -e $Header = $ForumHeader unless ($ForumHeader eq ''); $Footer = $ForumFooter unless ($ForumFooter eq ''); } if( ($Header ne "") || ($Footer ne "") ) { #create random numbers for headers/footers $RandomNumber = &MakeRandomNumber; $RandomNumber2 = $RandomNumber + 100074; if ($Header ne "") { $Header =~ s/UBBrandomX/$RandomNumber/isg; $Header =~ s/UBBrandomY/$RandomNumber2/isg; } if ($Footer ne "") { $Footer =~ s/UBBrandomX/$RandomNumber/isg; $Footer =~ s/UBBrandomY/$RandomNumber2/isg; } } #adjust bgcolor variables if ($BGColor ne ""){ $BGColor = qq(bgcolor="$BGColor"); } if ($AltColumnColor1 ne ""){ $AltColumnColor1 = qq(bgcolor="$AltColumnColor1"); } if ($AltColumnColor2 ne ""){ $AltColumnColor2 = qq(bgcolor="$AltColumnColor2"); } if ($CategoryStripColor ne ""){ $CategoryStripColor = qq(bgcolor="$CategoryStripColor"); } if ($TableColorStrip ne ""){ $TableColorStrip = qq(bgcolor="$TableColorStrip"); } if ($PageBackground ne ""){ $PageBackground = qq(background="$NonCGIURL/$PageBackground"); } if ($TableBorderColor ne ""){ $TableWidth2 = "100%"; $BorderTop = qq(
); $BorderBottom = qq(
); } else { $TableWidth2 = $TableWidth; $BorderTop = ""; $BorderBottom = ""; } if ($BBStatus eq "OFF") { &StandardHTML($BBClosedMessage); exit; } $ReplyMessage = $in{'ReplyMessage'}; $Message = $in{'Message'}; $SubjectCoded = &HTMLIFY($TopicSubject); $SubjectCoded =~ tr/ /+/; if (@in == 0) { &Topics; exit; } if ($in{'action'} eq "topics") { &Topics; exit; } if ($in{'action'} eq "idcheck") { #&HackChecker; &idcheck; } if ($in{'action'} eq "displayprivate") { &DisplayPrivate; } sub Topics { if ($number eq "") { &StandardHTML("Sie haben kein Forum oder Archiv ausgewählt - bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut!"); exit; } &get_cookie; #retrieves all current cookies $SessionLogin = "$cookie{sessionLogin}"; $SessionLoginDT = "$cookie{sessionLoginDT}"; #check to see if forum is private! if ($number =~ /A/) { ($junk, $ArchiveNumber) = split(/\:/, $number); &DisplayArchive($ArchiveNumber); exit; } @thisforum = &GetForumRecord($number); if ($thisforum[8] eq "") { &StandardHTML("Das von Ihnen gewählte Forum oder Archiv konnte nicht gefunden werden - bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut!"); exit; } $category = $thisforum[0]; $CategoryName = &GetCatName($category); $ForumPW = $thisforum[12]; $LWA = $thisforum[6]; if ($LWA eq "private") { $ReplyRestrict = "restrict"; $TopicRestrict = "restrict"; } else { ($TopicRestrict, $ReplyRestrict) = split("&", $LWA); } $Moderator = ("Forum" . "$number" . "Moderator"); $Moderator = $$Moderator; #split up Mod var @mods = split(/\|\|\^\|\|/, $Moderator); if ($LWA eq "private") { $PrivateMax = $thisforum[13]; chomp($PrivateMax); #check for private cookies to see if we can proceed immediately $PasswordPrivate = "$cookie{PasswordPrivate}"; $UserNamePrivate = "$cookie{UserNamePrivate}"; $NumbersPrivate = "$cookie{ForumNumberPrivate}"; $DIRPW = "$thisforum[7]"; $ExactPath = "Forum$number/private-$DIRPW"; if ($PasswordPrivate ne "") { &VerifyID; if (($ForumPW ne "") && ($ProceedNow ne "true")) { &ConfirmIdentity; exit; } } else { &ConfirmIdentity; exit; } } else { $DIRPW = ""; $ExactPath = "Forum$number"; $ProceedNow = "true"; } if ($ProceedNow eq "true") { if ($DaysPrune eq "") { $DaysPrune = "$cookie{DaysPrune}"; } if ($DaysPrune eq "") { $DaysPrune = $DaysPruneDefault; } if ($in{'start'} eq "here") { $AddNewSessionLogin = "true"; } $Forum = $thisforum[1]; $CustomTitle = $thisforum[9]; chomp($CustomTitle); if ($CustomTitle eq "") { $CustomTitle = "$BBTitle"; } if ($TopicRestrict eq "restrict") { $TopicLegend = "Neue Beiträge: Nur autorisierte Benutzer können neue Beiträge in diesem Forum erstellen."; } elsif ($TopicRestrict eq "allreg") { $TopicLegend = "Neue Beiträge: Alle registrierten Benutzer können Beiträge in diesem Forum erstellen."; } else { $TopicLegend = "Neue Beiträge: Alle Benutzer (auch unregistrierte Besucher) können Beiträge in diesem Forum erstellen."; } if ($ReplyRestrict eq "restrict") { $ReplyLegend = "Antworten: Nur autorisierte Benutzer können Antworten in diesem Forum erstellen."; } elsif ($ReplyRestrict eq "allreg") { $ReplyLegend = "Antworten: Alle registrierten Benutzer können Antworten in diesem Forum erstellen."; } elsif ($ReplyRestrict eq "all") { $ReplyLegend = "Antworten: Alle Benutzer (auch unregistrierte Besucher) können Antworten in diesem Forum erstellen."; } else { $ReplyLegend = "Antworten: In diesem Forum können keine Antworten erstellt werden."; } $ForumCoded = &HTMLIFY($Forum); $ForumCoded =~ tr/ /+/; 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); } } } #are icons allowed? - ICON CONCEPT BY KOMBAT03! if ($AllowIcons eq "TRUE") { $IconFieldHeader = qq( ); } else { $IconFieldHeader = ""; } #Check Announcements &CheckAnnouncements("$number"); &TopicTopHTML; &CurrentDate; if ($DaysPrune eq "1000") { $DPJulian = 0; } else { $DPJulian = $CurrentJulian - $DaysPrune; } ##### create new threads summary file, if necessary unless (-e "$ForumsPath/$ExactPath/forum$number.threads") { my $CreateThreadFile = "yes"; &ForumSummary($number); } # end UNLESS THREADS SUMMARY EXISTS ########## if ($CreateThreadFile ne "yes") { #open thread file online @thefinalarray = &OpenFile("$ForumsPath/$ExactPath/forum$number.threads"); } $TotalTopics = @thefinalarray; #open last number file @foruminfo = &OpenFile("$ForumsPath/$ExactPath/lastnumber.file"); chomp($foruminfo[1]); $LastNumberVerify = $foruminfo[1] + 0; if ($TotalTopics != $LastNumberVerify) { &SetThreadInfo; &ForumSummary($number); @sortfinalarray = sort(@finalarray); } else { @sortfinalarray = sort(@thefinalarray); } @finalarray = reverse(@sortfinalarray); ## @finalarray hold thread summary used to display page $x = $number; #set Days Prune variable to 3 digits for matching-- if ($DaysPrune == 1) { $Days1 = "SELECTED"; } elsif ($DaysPrune == 2) { $Days2 = "SELECTED"; } elsif ($DaysPrune == 5) { $Days5 = "SELECTED"; } elsif ($DaysPrune == 10) { $Days10 = "SELECTED"; } elsif ($DaysPrune == 20) { $Days20 = "SELECTED"; } elsif ($DaysPrune == 30) { $Days30 = "SELECTED"; } elsif ($DaysPrune == 45) { $Days45 = "SELECTED"; } elsif ($DaysPrune == 60) { $Days60 = "SELECTED"; } elsif ($DaysPrune == 75) { $Days75 = "SELECTED"; } elsif ($DaysPrune == 100) { $Days100 = "SELECTED"; } elsif ($DaysPrune == 1000) { $Days1000 = "SELECTED"; } else { $Days365 = "SELECTED"; } &TopicMidHTML; $Count = 0; CHECKEACH: for $eachone(@finalarray) { chomp($eachone); @threadinfo2 = split(/\|\^\|/, $eachone); if ($threadinfo2[2] eq "") { next CHECKEACH; } $PostDateJulian2 = $threadinfo2[0]; ($PostDateJulian, $junk) = split(/\./, $PostDateJulian2); #do date compare on post julian if ($PostDateJulian >= $DPJulian) { push(@goodarray2, $eachone); } else { last CHECKEACH; } } #foreach eachone $TotalGood2 = @goodarray2; $TotalGood = $TotalGood2 - 1; #check to see if we need to truncate this list unless (($ForumDisplayMax eq "") || ($ForumDisplayMax eq "NONE")) { $Sections = $TotalGood2 / $ForumDisplayMax; $Sections = "$Sections"; if ($Sections =~ /\./) { ($Whole, $junk) = split(/\./, $Sections); $Sections = $Whole; } else { $Sections = $Sections - 1; } if ($in{'startpoint'} eq "") { $StartPoint = 0; $ArrayStop = $ForumDisplayMax - 1; if ($TotalGood <= $ArrayStop) { $MoreTopicsWording = ""; $ArrayStop = $TotalGood; } else { for ($Section = 0; $Section <= $Sections; $Section++) { $Starting = $Section * $ForumDisplayMax; $Block = $Section + 1; if ($Block == 1) { $MoreTopicsWording .= qq($Block ); } else { $MoreTopicsWording .= qq($Block ); } } } } else { $StartPoint = $in{'startpoint'}; $ArrayStop = $StartPoint + $ForumDisplayMax; $ArrayStop--; if ($TotalGood <= $ArrayStop) { $ArrayStop = $TotalGood; } for ($Section = 0; $Section <= $Sections; $Section++) { $Starting = $Section * $ForumDisplayMax; $Block = $Section + 1; if ($StartPoint == $Starting) { $MoreTopicsWording .= qq($Block ); } else { $MoreTopicsWording .= qq($Block ); } } } if ($MoreTopicsWording ne "") { $MoreTopicsW = ("Seite: $MoreTopicsWording"); } @truncate = @goodarray2[$StartPoint... $ArrayStop]; @goodarray3 = sort(@truncate); @goodarray2 = reverse(@goodarray3); } foreach $goodie(@goodarray2) { chomp($goodie); @threadinfo = split(/\|\^\|/, $goodie); $ClosedItem = $threadinfo[6]; chomp($ClosedItem); $ReplyCount=$threadinfo[3]; #format date $ThisYear = substr($threadinfo[5], 0, 4); $ThisMonth = substr($threadinfo[5], 4, 2); $ThisDay = substr($threadinfo[5], 6, 2); $hour = substr($threadinfo[5], 8, 2); $min = substr($threadinfo[5], 10, 2); $HyphenIt = "$ThisMonth-$ThisDay-$ThisYear"; if ($DateFormat eq "US") { $TheDate = "$ThisMonth-$ThisDay-$ThisYear"; $DateWording = "Alle Datumsangaben werden im MM.TT.JJ - Format dargestellt."; $DateSize = "2"; } elsif ($DateFormat eq "Euro") { $TheDate = "$ThisDay.$ThisMonth.$ThisYear"; $DateWording = "Alle Datumsangaben werden im TT.MM.JJ - Format dargestellt."; $DateSize = "2"; } elsif ($DateFormat eq "USX") { $TheDate = &DateFormat("$HyphenIt", "USExpanded"); $DateSize = "1"; } else { $TheDate = &DateFormat("$HyphenIt", "EuroExpanded"); $DateSize = "1"; } $TopicJulianDT = $threadinfo[0]; #format time option 1 if ($TimeFormat eq "24HR") { $FormatTime = "$hour:$min"; } &NormalTime; #format time option 2 if ($TimeFormat eq "AMPM") { $FormatTime = "$hour:$min $AMPM"; } if ($SessionLogin eq "") { if ($ClosedItem =~ /X/) { $FolderIcon = ""; } else { if (($HotIcons eq "ON") && ($ReplyCount > $HotCount)) { $FolderIcon = ""; } else { $FolderIcon = ""; } } } else { if ($TopicJulianDT > $SessionLogin) { if ($ClosedItem =~ /X/) { $FolderIcon = ""; } else { if (($HotIcons eq "ON") && ($ReplyCount > $HotCount)) { $FolderIcon = ""; } else { $FolderIcon = ""; } } $NewThreadPosts = "yes"; } else { if ($ClosedItem =~ /X/) { $FolderIcon = ""; } else { if (($HotIcons eq "ON") && ($ReplyCount > $HotCount)) { $FolderIcon = ""; } else { $FolderIcon = ""; } } $NewThreadPosts = "no"; } } if ($AllowIcons eq "TRUE") { my $IconNumber = $threadinfo[7]; chomp($IconNumber); if ($IconNumber eq "") { $IconNumber = "1"; } unless (-e "$NonCGIPath/icons/icon$IconNumber.gif") { $IconNumber = "1"; } $IconField = qq(); } else { $IconField = ""; } &TopicGutsHTML; } #end foreach goodarray &TopicBottomHTML; &GetForumSelectList; if ($SessionLogin ne "") { &TopicBottom2JShtml; } else { &TopicBottom2NonJShtml; } } else { $AccessWording = qq(Ihre Identität konnte nicht verifiziert werden ... bitte identifizieren Sie sich:); &ConfirmIdentity; exit; } # if proceednow = true } ## END TOPICS SR #### sub CheckAnnouncements { $ForumNumber = shift; opendir (GETANNC, "$ForumsPath/$ExactPath/ANNC"); @forummsgs = readdir(GETANNC); closedir (GETANNC); @announcements = grep(/annc/, @forummsgs); #now we have all announcements in the forum #need to figure out which ones are live $NewAnnounce = ""; for $eachannc(@announcements) { $Live = ""; $Dead = ""; ($start, $end, $trash) = split("-", $eachannc); &DateCompare("$start", "$end"); if ($Live eq "true") { $sortline = ("$StartJulian|$eachannc"); push(@livelist, $sortline); } $StartJulian = ($StartJulian + .99); if ($StartJulian > $SessionLogin) { $NewAnnounce = "true"; } if ($Dead eq "true") { unlink ("$ForumsPath/$ExactPath/ANNC/$eachannc"); } } #end For $eachannc #now we have our list of announcements @thesortlist = sort(@livelist); #sort list @sortlist = reverse(@thesortlist); #reverse it, latest first $ListTotal = @sortlist; ($junk, $anncfile) = split(/\|/, $sortlist[0]); if ($ListTotal < 1) { $AnnouncementBlock = ""; } else { if ($NewAnnounce eq "true") { open (LATEST, "$ForumsPath/$ExactPath/ANNC/$anncfile"); @latest = ; close (LATEST); $LatestTitle = $latest[1]; chomp($LatestTitle); $AnnouncementBlock = "\"Neue   $LatestTitle"; } else { open (LATEST, "$ForumsPath/$ExactPath/ANNC/$anncfile"); @latest = ; close (LATEST); $LatestTitle = $latest[1]; chomp($LatestTitle); $AnnouncementBlock = "\"Ankündigung!\"  $LatestTitle"; } } } #end CheckAnnouncements sr # HTML SUBROUTINES ASSOCIATED WITH THE # FORUM PAGE DISPLAY ARE LISTED BELOW--- sub TopicTopHTML { &GetCookieInfo; if ($SetCookies eq "DirectorySpecific") { $ExtraInfo = qq(domain=$TheDomain;path=/$ThePath;); } else { $ExtraInfo = ""; } &GetDateTime; print < $BBName $HeaderInsert $Header TOP } ## END TOPIC TOP HTML sr sub TopicMidHTML { if ($CategoriesOnly eq "true") { $FolderLine = qq(  $CategoryName
  $Forum); } else { $FolderLine = qq(  $Forum); } print <

$Forum
(moderiert von $ModeratorLine)

$AnnouncementBlock

  $BBName
$FolderLine

Neuen Beitrag erstellen
$RegLinkHere Voreinstellungen | Hilfe $SearchOption

$TopicLegend
$ReplyLegend
$BorderTop $IconFieldHeader OtherMiddle } ## END Middle HTML for Topic Page sub TopicGutsHTML { if ($PrivateMax eq "yes") { $ThisURL = qq($CGIURL/forumdisplay.cgi?action=displayprivate&number=$number&topic=$threadinfo[1]); } else { $ThisURL = qq($NonCGIURL/$ExactPath/HTML/$threadinfo[1].html); } print < $IconField GUTS } ## END Guts HTML for Topic Page sub TopicBottomHTML { print< $BorderBottom
  Thema erstellt von Antworten Letzter Beitrag
$FolderIcon $threadinfo[2] $threadinfo[4] $threadinfo[3] $TheDate $FormatTime
$MoreTopicsW

Alle Zeiten werden im $TimeZone - Format dargestellt.
$DateWording
Gehe zu:
Neue Beiträge vorhanden!  Neue Beiträge seit Ihrem letzten Besuch vorhanden $RedHot.
Keine neuen Beiträge vorhanden!  Keine neuen Beiträge seit Ihrem letzten Besuch vorhanden $YellowHot.
Thema geschlossen  Beitrag geschlossen - keine Antworten möglich.
Neues Thema erstellen

TrueTopicBottom &PageBottomHTML; } sub TopicBottom2NonJShtml { if ($HotIcons eq "ON") { $YellowHot = "(\"Hot!\"  Mehr als $HotCount Antworten vorhanden!)"; } else { $YellowHot = ""; } print< Keine neuen Beiträge vorhanden!  Offenes Thema $YellowHot.
\"Geschlossenes  Geschlossenes Thema - keine Antwoten möglich.

Neues Thema erstellen

TrueTopicBottom &PageBottomHTML; } sub idcheck { #open member file to see if user can access private forum if (($in{'UserName'} eq "") || ($in{'Password'} eq "")) { &StandardHTML("Sie müssen Ihren Benutzernamen und Ihr Kennwort eingeben!"); } else { #open registration file, if possible $NameFound = "no"; $ProfileNumber = &GetUserNumber($in{'UserName'}); if ($ProfileNumber ne "") { $NameFound = "yes"; } else { $NameFound = "no"; } $AllowedToEnter = ""; if ($NameFound eq "yes") { @theprofile = &OpenProfile("$ProfileNumber.cgi"); if ($in{'Password'} eq "$theprofile[1]") { $Permission = $theprofile[4]; $Status = $theprofile[8]; if ($Permission =~ /\&/) { ($junk, $forumnumbers) = split(/\&/, $Permission); chomp($forumnumbers); if ($forumnumbers =~ /,/) { @forumnums = split(",", $forumnumbers); } else { @forumnums = "$forumnumbers"; } } #check against forum password, if necessary @thisforum = &GetForumRecord($in{'forumnumber'}); if ($thisforum[12] ne "") { if ($in{'ForumPassword'} eq "$thisforum[12]") { $PasswordCheck = "true"; } } my $PermissionCheck = "false"; CHECKPERM: foreach $theesone(@forumnums) { if ($theesone eq "$in{'forumnumber'}") { $PermissionCheck = "true"; last CHECKPERM; } } $ThisNumber = $in{'forumnumber'}; $UserName = &decodeURL("$in{'UserName'}"); &CheckModStatus("Forum$in{'forumnumber'}", "$UserName"); if (($Status eq "Administrator") || ($PermissionCheck eq "true") || ($ModMatch eq "yes") || ($PasswordCheck eq "true")) { &GrantAccess; } else { &StandardHTML("Sie sind für den Zugriff auf dieses Forum nicht autorisiert."); } } else { &StandardHTML("Das von Ihnen eingegebene Kennwort ist falsch - bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut!"); } } else { &StandardHTML("Der von Ihnen eingegebene Benutzername ist dem System nicht bekannt - bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut!"); } } } # end id check sub ConfirmIdentity { if ($ForumPW ne "") { $FPWWording = qq(If you are not an administrator or moderator and have not been given specific permission to access this forum but know the forum password, you must enter the password below in order to gain access. Forum Password:); } else { $FPWWording = ""; } print < $HeaderInsert $Header

P R I V A T E S      F O R U M
$BorderTop $FPWWording
$AccessWording

Sie möchten ein privates Forum betreten, bitte identifizieren Sie sich. Die Identifikation ist nur je einmal pro Besuch des privaten Forums notwendig, die Zugriffsbestätigung wird in einem Cookie (vorausgesetzt, Sie erlauben die Annahme von Cookies bei Ihrem Browser) auf Ihrem PC gespeichert.

Benutzername:
Kennwort:
$BorderBottom




Um zur Übersicht der Foren zurückzugelangen, klicken Sie bitte hier.

$Footer CONFIRM } sub GrantAccess { &GetCookieInfo; if ($SetCookies eq "DirectorySpecific") { $ExtraInfo = qq(domain=$TheDomain;path=/$ThePath;); } else { $ExtraInfo = ""; } #get private forum dir @forumarray = &GetForumRecord($in{'forumnumber'}); $PFDir = $forumarray[7]; print< $HeaderInsert $Header

$Footer ForwardHTML } #end GrantAccess sub DisplayPrivate { #verify permission to view #check for private cookies to see if we can proceed immediately &get_cookie; #retrieves all current cookies $PasswordPrivate = "$cookie{PasswordPrivate}"; $UserNamePrivate = "$cookie{UserNamePrivate}"; $NumbersPrivate = "$cookie{ForumNumberPrivate}"; if ($PasswordPrivate ne "") { my @theforum = &GetForumRecord($number); $DIRPW = "$theforum[7]"; &VerifyID; } else { &StandardHTML("Sie können diesen Beitrag erst ansehen, wenn Sie das Forum betreten haben."); exit; } if ($ProceedNow eq "true") { @thisforum = &GetForumRecord($in{'number'}); #open file my @thisfile = &OpenFile("$ForumsPath/Forum$in{'number'}/private-$thisforum[7]/HTML/$in{'topic'}.cgi"); foreach $row(@thisfile) { print "$row"; } exit; } else { &StandardHTML("Sie sind zur Ansicht dieses Themas nicht autorisiert."); exit; } } sub VerifyID { ##check ID using username set as cookie $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("Ihre Identität konnte nicht bestätigt werden."); 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 DisplayArchive { my $ThisArchive = shift; if (-e "$NonCGIPath/Archives/archives.pl") { @archives = &OpenFile("$NonCGIPath/Archives/archives.pl"); foreach $uno(@archives) { if ($uno =~ /^$ThisArchive/) { ($ArchiveNum, $ArchiveName, $ArchiveDescription) = split(/\|\#\|/, $uno); $ArchiveDescription =~ s/"/"/isg; $ArchiveDescription =~ s/|/\|/isg; } } if ($ArchiveName eq "") { &StandardHTML("Das von Ihnen gewählte Archiv konnte nicht gefunden werden. Möglicherweise wurde es gelöscht - bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers."); exit; } } else { &StandardHTML("Keine Archive vorhanden."); exit; } if (-e "$NonCGIPath/Archives/Archive-$ArchiveNum/archives.thread") { @thisarchive2 = &OpenFile("$NonCGIPath/Archives/Archive-$ArchiveNum/archives.thread"); } else { @thisarchive2 = @blank; } @goodarray2 = sort {lc($a) cmp lc($b) } @thisarchive2; $TotalGood2 = @goodarray2; $TotalGood = $TotalGood2 - 1 ; my $ADMax = 50; $Sections = $TotalGood2 / $ADMax; $Sections = "$Sections"; if ($Sections =~ /\./) { ($Whole, $junk) = split(/\./, $Sections); $Sections = $Whole; } else { $Sections = $Sections - 1; } if ($in{'startpoint'} eq "") { $StartPoint = 0; $ArrayStop = $ADMax - 1; if ($TotalGood <= $ArrayStop) { $MoreTopicsWording = ""; $ArrayStop = $TotalGood; } else { for ($Section = 0; $Section <= $Sections; $Section++) { $Starting = $Section * $ADMax; $Block = $Section + 1; if ($Block == 1) { $MoreTopicsWording .= qq($Block ); } else { $MoreTopicsWording .= qq($Block ); } } } } else { $StartPoint = $in{'startpoint'}; $ArrayStop = $StartPoint + $ADMax; $ArrayStop--; if ($TotalGood <= $ArrayStop) { $ArrayStop = $TotalGood; } for ($Section = 0; $Section <= $Sections; $Section++) { $Starting = $Section * $ADMax; $Block = $Section + 1; if ($StartPoint == $Starting) { $MoreTopicsWording .= qq($Block ); } else { $MoreTopicsWording .= qq($Block ); } } } if ($MoreTopicsWording ne "") { $MoreTopicsW = ("Seiten: $MoreTopicsWording"); } @goodarray3 = @goodarray2[$StartPoint... $ArrayStop]; print< $BBName $HeaderInsert $Header

$ArchiveName
$ArchiveDescription

  $BBName
  $ArchiveName

$RegLinkHere Voreinstellungen | Hilfe $SearchOption

Archive werden alphabetisch sortiert angezeigt.
$BorderTop TOP $AltColor = "$AltColumnColor1"; if (@goodarray3) { foreach $one(@goodarray3) { @thisone = split(/\|\#\|/, $one); chomp($thisone[3]); ($theDate, $junk, $junk2) = split(/-/, $thisone[1]); my $ThisYear = substr($theDate, 0, 4); my $ThisMonth = substr($theDate, 4, 2); my $ThisDay = substr($theDate, 6, 2); my $StoredDate = "$ThisMonth-$ThisDay-$ThisYear"; if ($DateFormat eq "US") { $FormatDate = $StoredDate; $DateSize = "$TextSize"; } elsif ($DateFormat eq "Euro") { $FormatDate = &DateFormat("$StoredDate", "Euro"); $DateSize = "$TextSize"; } elsif ($DateFormat eq "USX") { $FormatDate = &DateFormat("$StoredDate", "USExpanded"); $DateSize = "1"; } else { $FormatDate = &DateFormat("$StoredDate", "EuroExpanded"); $DateSize = "1"; } print< GUTS if ($AltColor eq "$AltColumnColor1") { $AltColor = "$AltColumnColor2"; } else { $AltColor = "$AltColumnColor1"; } } } else { print< GUTS } print< $BorderBottom
Themagestartet vonDatum der Archivierung
$thisone[0]$thisone[2]$FormatDate
Dieses Archiv ist zur Zeit leer!

Dies ist ein Archiv. Alle Archive sind nur lesbar - das Erstellen einer Antwort ist nicht möglich.

$MoreTopicsW

Gehe zu:

NearBottom &PageBottomHTML; } exit(0); # comply with SafePerl