netzmeister
15.02.00, 22:37
#!/usr/bin/perl
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 "ubb_library.pl";
require "Styles.file";
require "Date.pl";
};
if ($@) {
print "Fehler beim Aufruf der Datei(en): $@\n";
print "Stellen Sie sicher, daß diese Datei(en) vorhanden ist/sind, die Zugriffsrechte und Systempfade korrekt eingestellt sind.";
exit;
}
if ($BBStatus eq "OFF") {
&StandardHTML("Dieses System ist derzeit aufgrund Service-Arbeiten deaktiviert, versuchen Sie es später nocheinmal. Vielen Dank. Bei Fragen schreiben Sie uns eine eMail an <A HREF=\"mailto:$BBEmail\">$BBEmail</A>.");
exit;
}
&ReadParse;
#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(<table border=0 cellpadding=0 cellspacing=0 width="$TableWidth"><TR><td bgcolor="$TableBorderColor">);
$BorderBottom = qq(</td></tr></table> );
} else {
$TableWidth2 = $TableWidth;
$BorderTop = "";
$BorderBottom = "";
}
@forums = &OpenForumsFile;
if ($in{'action'} eq "intro") {
&Intro;
}
if ($in{'action'} eq "getdaily") {
&GetDaily;
}
if ($in{'action'} eq "introprivate") {
&IntroPrivate;
}
if ($in{'action'} eq "simplesearch") {
if ($AllowSearch eq "FALSE") {
&StandardHTML("Die Such-Funktion ist derzeit deaktiviert.");
exit;
} else {
if ($IndexMethod eq "ONEFILE") {
&SimpleSearch;
} else {
&SimpleSearch2;
}
}
}
if ($in{'action'} eq "simplesearchP") {
if ($AllowSearch eq "FALSE") {
&StandardHTML("Die Such-Funktion ist derzeit deaktiviert.");
exit;
} else {
&SimpleSearchP;
}
}
if ($in{'action'} eq "privateid") {
&PrivateID;
}
sub GetDaily {
&GetDateTime;
if ($AllowSearch eq "FALSE") {
$SearchOption = "";
} else {
$SearchOption = qq(<A HREF="$CGIURL/search.cgi?action=intro"><ACRONYM TITLE="Suchen Sie nach Begriff, Datum oder Benutzername.">Neue Suche</ACRONYM></A> | );
}
if (-e "$NonCGIPath/dailyindex-$LastLoginJulianDATE.file") {
$Daily = "exists";
@daily2 = &OpenFile("$NonCGIPath/dailyindex-$LastLoginJulianDATE.file");
@daily = sort(@daily2);
} else {
$Daily = "";
@daily = @blank;
}
#eliminate duplicates
foreach $check(@daily) {
chomp($check);
(@testit) = split(/\|/, $check);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
@testit2 = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
push(@good, $check);
}
}
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@daily = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@daily = @good[$SP..$EP];
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=getdaily&StartPoint=$NextStart">[Weitere Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Today's Active Topics</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<A HREF="$CGIURL/search.cgi?action=intro"><IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie unsere Foren!" BORDER=0></A></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Aktive Themen von heute:</CENTER></font>
<FONT FACE="$FontFace" SIZE="1">Nur in öffentlichen Foren</FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace">$SearchOption <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">letzte Antwort</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum</FONT>
</TD>
</tr>
TOP
for $eachone(@daily) {
@goodline = split(/\|/, $eachone);
chomp($goodline[5]);
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
if (-e "$NonCGIPath/Forum$goodline[0]/HTML/$goodline[1].html") {
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999
</center>$Footer</FONT>
</body></html>
BOTTOM
} #end GetDaily
sub SimpleSearch {
#get current date in jul. format
&GetDateTime;
$CurrentJDay = $LastLoginJulianDATE;
#delete old temporary search records
&PruneTemps;
#prepare search terms--
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchUserCoded =~ tr/ /+/;
$SearchNumber = @SearchList;
if ($in{'Total'} eq "") {
$Total = 0;
} else {
$Total = $in{'Total'};
}
#make sure search file is still valid
unless (-e "$NonCGIPath/searchlogs/$in{'File'}") {
$in{'File'} = "";
$FileName = "";
}
$SkipSearch = "";
if (($in{'Continue'} eq "False") && ($in{'File'} ne "")) {
if (-e "$NonCGIPath/searchlogs/$in{'File'}") {
@good = &OpenFile("$NonCGIPath/searchlogs/$in{'File'}");
$SkipSearch = "true";
}
} #end if temp file exists to draw on
$ForumChoice = $in{'ForumChoice'};
if ($SkipSearch ne "true") {
@index = @blank;
#get forum/archive file
@foruminfo = &OpenFile("$VariablesPath/forums.cgi");
$TotalForums = @foruminfo;
@theindex = &OpenFile("$NonCGIPath/forumindex.cgi");
#search one forum or all?
if ($ForumChoice ne "ALL") {
if ($ForumChoice !~ /A/) {
@thisforum = &GetForumRecord($ForumChoice);
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = grep(/$ForumChoice\|/, @theindex);
} else {
@thisindex = @blank;
}
} else {
#get archive index
($Junk, $ArchNum) = split(/:/, $ForumChoice);
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
} else {
#if searching all forums/archives...
@thisindex = &OpenFile("$NonCGIPath/forumindex.cgi");
} # end if searching all forums
@index = sort(@thisindex);
#determine start point
if ($in{'StartAt'} ne "") {
$StartAt = $in{'StartAt'};
$StartAt = $StartAt + 0;
@index = @index[$StartAt..$#index];
}
#now we have array to be searched...
# Determine Current Good Array
if ($in{'File'} =~ /temp\S+\.cgi/) {
open(HOLDER, "$NonCGIPath/searchlogs/$in{'File'}");
@good = <HOLDER>;
close(HOLDER);
} else {
@good = @blank;
}
&DoTheSearch; #places matches in @good
#now we have all matches- write temp file
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
} #end skip search check
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($FileName eq "") {
$FileName = "$in{'File'}";
}
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=simplesearch&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&SearchD ate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&File=$FileName&Continue=False">[Nächste Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie unsere Foren!" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse der Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">Neue Suche</A> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum/Archiv</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
if ($goodline[1] =~ /-/) {
#it is an archive
@thisarchive = &OpenFile("$NonCGIPath/Archives/archives.pl");
foreach $uno(@thisarchive) {
if ($uno =~ /^$goodline[0]/) {
($ThisNum, $ForumName, $junk) = split(/\|\#\|/, $uno);
}
}
$TheURL = "$NonCGIURL/Archives/Archive-$goodline[0]/HTML/$goodline[1].html";
} else {
#it is not an archive, but a forum
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$TheURL = "$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html";
}
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
$CheckThisYear = length($ThisYear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$ThisYear = ("19" . "$ThisYear");
} else {
$ThisYear = $ThisYear - 100;
$ThisYear = sprintf ("%2d", $ThisYear);
$ThisYear =~tr/ /0/;
$ThisYear = ("20" . "$ThisYear");
}
$HyphenIt = "$ThisMo-$ThisDay-$ThisYear";
}
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999
</center>$Footer</font>
</body></html>
BOTTOM
} # end SimpleSearch sr
sub Intro {
if ($DisplayRegistration eq "NO") {
$RegLinkHere = "";
} else {
$RegLinkHere = qq(| <A HREF="$CGIURL/Ultimate.cgi?action=agree"><ACRONYM TITLE="Registration ist kostenlos!">Registrieren</ACRONYM></A> | <A HREF="$CGIURL/ubbmisc.cgi?action=editbio"><ACRONYM TITLE="Editieren Sie Ihr Profil.">Profil</ACRONYM></a>);
}
#check for default
if ($in{'default'} ne "") {
$DefaultSelect = $in{'default'};
}
print<<TOP;
<HTML>
<HEAD>
<TITLE>$BBName Such-Funktion</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<FORM ACTION="search.cgi" METHOD="POST">
<center>
<table border=0 width=$TableWidth>
<TR>
<td>
<IMG SRC="$NonCGIURL/searchhead.gif" BORDER=0 ALT="Foren durchsuchen!">
</td>
<TD valign=bottom>
<CENTER><FONT FACE="$FontFace" SIZE="1"><A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> $RegLinkHere | <A HREF="$CGIURL/ubbmisc.cgi?action=setprefs"><ACRONYM TITLE="Verändern Sie Ihre Einstellungen.">Einstellungen</ACRONYM></a></FONT></CENTER>
</td>
</tr>
</table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $AltColumnColor1>
<TD align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchbegriff(e):</FONT>
</TD>
<TD>
<INPUT TYPE="TEXT" NAME="SearchTerms" SIZE=20 MAXLENGTH=25>
<FONT SIZE="1" FACE="$FontFace" COLOR="$LinkColor">
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="YES" CHECKED> Alle Begriffe finden.
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="NO"> Einen oder mehrere der Begriffe finden.
Trennen Sie die Wörter mit Leerzeichen, nicht mit Kommas. </FONT>
</td></tr>
<TR $AltColumnColor2>
<TD valign=top align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im Forum/Archiv:</FONT>
</td>
<td>
<FONT SIZE="1" FACE="$FontFace">
<SELECT NAME="ForumChoice">
TOP
if ($AllowTotalSearch eq "TRUE") {
if ($IndexMethod eq "ONEFILE") {
print qq|<OPTION VALUE="ALL">Suchen in allen öffentlichen Foren (Keine Archive)|;
} else {
print qq|<OPTION VALUE="ALL">Suchen in allen öffentlichen Foren und Archiven|;
}
}
for $forumfacts(@forums) {
@foruminfo = split(/\|/, $forumfacts);
$ForumName = "$foruminfo[1]";
$ForumNumber = "$foruminfo[8]";
$ForumStatus = $foruminfo[3];
chomp($ForumName);
chomp($ForumNumber);
$forumline = ("$ForumName" . "::$ForumNumber");
if (($ForumStatus eq "On") && ($foruminfo[6] ne "private")) {
push (@theforumarray, $forumline);
}
}
@forumarray = sort(@theforumarray);
for $thisone(@forumarray) {
($GetForumName, $GetForumNumber) = split(/::/, $thisone);
if ($GetForumNumber eq "$DefaultSelect") {
print qq(<OPTION VALUE="$GetForumNumber" SELECTED>$GetForumName);
} else {
print qq(<OPTION VALUE="$GetForumNumber">$GetForumName);
}
}
#check for archives
if (-e "$NonCGIPath/Archives/archives.pl") {
@archives = &OpenFile("$NonCGIPath/Archives/archives.pl");
if ($archives[0] ne "") {
foreach $archie(@archives) {
($ArchNumber, $ArchName, $junk) = split(/\|\#\|/, $archie);
$ArchCheck = ("A:" . "$ArchNumber");
if ($ArchCheck eq "$DefaultSelect") {
print qq(<OPTION VALUE="A:$ArchNumber" SELECTED>Archiv: $ArchName);
} else {
print qq(<OPTION VALUE="A:$ArchNumber">Archiv: $ArchName);
}
}
}
}
print<<NEXT;
</select>
</font>
</td></tr>
<tr $AltColumnColor1>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im:</FONT>
</td>
<td>
<SELECT NAME="SearchIn">
<OPTION VALUE="ALL">kompletten Beitrag
<OPTION VALUE="SUBJECT">nur im Betreff
</SELECT>
</td></tr>
<tr $AltColumnColor2>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Datum:</FONT>
</td>
<td>
<SELECT NAME="SearchDate">
<OPTION value="ALL">irgendein Datum
<OPTION VALUE="1">seit gestern
<OPTION VALUE="5">seit der letzten fünf Tage
<OPTION VALUE="10">seit der letzten 10 Tage
<OPTION VALUE="30">seit der letzten 30 Tage
</SELECT>
</td></tr>
<tr $AltColumnColor1>
<td align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suche nach Benutzernamen:</FONT>
</td>
<td valign=top><FONT FACE="$FontFace" color="$LinkColor" size="1">
<INPUT TYPE="TEXT" NAME="SearchUser" SIZE=20 MAXLENGTH=25>
<INPUT TYPE="Radio" NAME="ExactName" VALUE="yes">nach exaktem Namen (Groß-/Kleinschreibung)
<INPUT TYPE="Radio" NAME="ExactName" VALUE="no" CHECKED>irgendeine Übereinstimmung</FONT>
</td></tr>
</table>
$BorderBottom
<FONT size="1" FACE="$FontFace">
Hinweis: wollen Sie in privaten Foren suchen, klicken Sie <A HREF="search.cgi?action=introprivate">hier</A>.
</font>
<INPUT TYPE="HIDDEN" NAME="action" VALUE="simplesearch">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Suchen!">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Felder löschen">
</form>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998-1999
</center>$Footer</FONT>
</body></html>
NEXT
} # end sub Intro
sub IntroPrivate {
print<<TheHTML;
<HTML><HEAD>
<TITLE>
$BBName - Suchen in privaten Foren
</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
<FONT SIZE="$TextSize" FACE="$FontFace" color="$TextColor">
$Header
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie die Foren!" BORDER=0>
<blockquote>
Wollen Sie auch private Foren durchsuchen, müssen Sie sich erst identifizieren, damit wir ermitteln können, für welche Foren Sie eine Berechtigung haben. Ausschließlich Administratoren und Moderatoren können in allen privaten Foren suchen.
</blockquote>
</font>
<CENTER>
<FORM ACTION="search.cgi" NAME="REPLIER" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="privateid">
<table border=0>
<TR>
<TD>
<FONT SIZE="2" FACE="Verdana, Arial">Ihr Benutzername:</FONT>
</td>
<td><INPUT TYPE="TEXT" NAME="UserName" SIZE=25 MAXLENGTH=25>
</td>
<TR>
<td>
<FONT SIZE="2" FACE="Verdana, Arial">Ihr Kennwort:</FONT>
</td>
<td>
<INPUT TYPE="PASSWORD" NAME="Password" SIZE=13 MAXLENGTH=13>
</td></tr>
<tr><TD colspan=2>
</td></tr>
</table>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Identifikation senden">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
< !-- HIDE
var dc = document.cookie;
var testUserName = getCookie("UserName");
var testPassword = getCookie("Password");
if (document.cookie) {
if (testUserName == null) {
document.REPLIER.UserName.focus();
} else {
document.REPLIER.UserName.value = getCookie("UserName");
document.REPLIER.Password.value = getCookie("Password");
}
} else {
document.REPLIER.UserName.focus();
}
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end)); }
}
return null;
}
// STOP HIDING FROM OTHER BROWSERS -->
</SCRIPT>
TheHTML
&PageBottomHTML;
} #end intro private
sub PrivateID {
#check permissions for user
$NameFound = "no";
$ProfileNumber = &GetUserNumber($in{'UserName'});
if ($ProfileNumber ne "") {
$NameFound = "yes";
} else {
$NameFound = "no";
}
if ($NameFound eq "yes") {
@theprofile = &OpenProfile("$ProfileNumber.cgi");
if ($in{'Password'} eq "$theprofile[1]") {
$Permission = "$theprofile[4]";
($GenPerms, $SpecificPerms) = split(/\&/, $Permission);
$Status = $theprofile[8];
&CheckTheStatus;
&CheckPermissions;
@accessarray = split(",", $SpecificPerms);
} else {
&StandardHTML("Das eingegebene Kennwort ist nicht korrekt - versuchen Sie es erneut, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
} else {
&StandardHTML("Der eingegebene Benutzername ist dem System nicht bekannt - versuchen Sie es erneut, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
$ArrayTotal = @accessarray;
if (($AdminPermission ne "true") && ($ModStatus ne "true") && ($ArrayTotal == 0)) {
&StandardHTML("Für diese Funktion sind Sie nicht autorisiert, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
$UserNameCoded = &HTMLIFY($in{'UserName'});
$PasswordCoded = &HTMLIFY($in{'Password'});
if ($DisplayRegistration eq "NO") {
$RegLinkHere = "";
} else {
$RegLinkHere = qq(| <A HREF="$CGIURL/Ultimate.cgi?action=agree"><ACRONYM TITLE="Registration ist kostenlos!">Registrieren</ACRONYM></A> | <A HREF="$CGIURL/ubbmisc.cgi?action=editbio"><ACRONYM TITLE="Editieren Sie Ihr Profil">Profil</ACRONYM></a>);
}
print<<TOP;
<HTML>
<HEAD>
<TITLE>$BBName Suchfunktion</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<FORM ACTION="search.cgi" METHOD="POST">
<center>
<table border=0 width=$TableWidth>
<TR>
<td>
<IMG SRC="$NonCGIURL/searchhead.gif" BORDER=0 ALT="Durchsuchen Sie unsere Foren!">
</td>
<TD valign=bottom>
<CENTER><FONT FACE="$FontFace" SIZE="1"><A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> $RegLinkHere | <A HREF="$CGIURL/ubbmisc.cgi?action=setprefs"><ACRONYM TITLE="Verändern Sie Ihre Einstellungen">Einstellungen</ACRONYM></a></FONT></CENTER>
</td>
</tr>
</table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $AltColumnColor1>
<TD align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchbegriff(e):</FONT>
</TD>
<TD>
<INPUT TYPE="TEXT" NAME="SearchTerms" SIZE=20 MAXLENGTH=25>
<FONT SIZE="1" FACE="$FontFace" COLOR="$LinkColor">
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="YES" CHECKED> alle Begriffe finden.
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="NO"> Einen oder mehrere Begriffe finden.
Trennen Sie Wörter mit Leerzeichen, nicht mit Kommas. </FONT>
</td></tr>
<TR $AltColumnColor2>
<TD valign=top align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suche im Forum:</FONT>
</td>
<td>
<FONT SIZE="1" FACE="$FontFace">
<SELECT NAME="ForumChoice">
<OPTION VALUE="">Wählen Sie ein privates Forum:
TOP
for $forumfacts(@forums) {
@foruminfo = split(/\|/, $forumfacts);
$ForumName = "$foruminfo[1]";
$ForumNumber = "$foruminfo[8]";
$ForumStatus = $foruminfo[3];
chomp($ForumName);
chomp($ForumNumber);
$forumline = ("$ForumName" . "::$ForumNumber");
if ($foruminfo[6] eq "private") {
unless (($AdminPermission eq "true") | | ($ModStatus eq "true")) {
$ThisAllowed = "";
CHECKTHRU: foreach $iota(@accessarray) {
chomp($iota);
if ($iota eq "$ForumNumber") {
$ThisAllowed = "true";
last CHECKTHRU;
}
}
} #end unless...
$Proceed = "";
if (($AdminPermission eq "true") | | ($ModStatus eq "true") | | ($ThisAllowed eq "true")) {
$Proceed = "YES";
}
if (($ForumStatus eq "On") && ($Proceed eq "YES")) {
push (@theforumarray, $forumline);
}
}
}
@forumarray = sort(@theforumarray);
for (@forumarray) {
($GetForumName, $GetForumNumber) = split(/::/, $_);
print ("<OPTION VALUE=\"$GetForumNumber\">$GetForumName");
}
print<<NEXT;
</select>
</font>
</td></tr>
<tr $AltColumnColor1>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im:</FONT>
</td>
<td>
<SELECT NAME="SearchIn">
<OPTION VALUE="ALL">kompletten Beitrag
<OPTION VALUE="SUBJECT">nur im Betreff
</SELECT>
</td></tr>
<tr $AltColumnColor2>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Datum:</FONT>
</td>
<td>
<SELECT NAME="SearchDate">
<OPTION value="ALL">irgendein Datum
<OPTION VALUE="1">seit gestern
<OPTION VALUE="5">seit fünf Tagen
<OPTION VALUE="10">seit 10 Tagen
<OPTION VALUE="30">seit 30 Tagen
</SELECT>
</td></tr>
<tr $AltColumnColor1>
<td align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Benutzernamen:</FONT>
</td>
<td valign=top><FONT FACE="$FontFace" color="$LinkColor" size="1">
<INPUT TYPE="TEXT" NAME="SearchUser" SIZE=20 MAXLENGTH=25>
<INPUT TYPE="Radio" NAME="ExactName" VALUE="yes">nach exaktem Namen (Groß-/Kleinschreibung)
<INPUT TYPE="Radio" NAME="ExactName" VALUE="no" CHECKED>irgendeine Übereinstimmung</FONT>
</td></tr>
</table>
$BorderBottom
<INPUT TYPE="HIDDEN" NAME="UserNameIn" VALUE="$UserNameCoded">
<INPUT TYPE="HIDDEN" NAME="PasswordIn" VALUE="$PasswordCoded">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="simplesearchP">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Suchen!">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Felder löschen">
</form>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998-1999.
</center>$Footer</font>
</body></html>
NEXT
} # end sub private id
sub SimpleSearchP {
if ($in{'ForumChoice'} eq "") {
&StandardHTML("Sie haben kein Forum ausgewählt - nutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut.");
exit;
}
#codify un and pw
$UserNameIn = &UNHTMLIFY($in{'UserNameIn'});
$PasswordIn = &UNHTMLIFY($in{'PasswordIn'});
$UserNameInCoded = $UserNameIn;
$UserNameInCoded =~ tr/ /+/;
$UserNameIncCoded = &HTMLIFY($UserNameInCoded);
$PasswordInCoded = $PasswordIn;
$PasswordInCoded =~ tr/ /+/;
$PasswordIncCoded = &HTMLIFY($PasswordInCoded);
#re-confirm identity
$NameFound = "no";
$ProfileNumber = &GetUserNumber($UserNameIn);
if ($ProfileNumber ne "") {
$NameFound = "yes";
} else {
$NameFound = "no";
}
if ($NameFound eq "yes") {
@theprofile = &OpenProfile("$ProfileNumber.cgi");
if ($PasswordIn eq "$theprofile[1]") {
$Permission = "$theprofile[4]";
($GenPerms, $SpecificPerms) = split(/\&/, $Permission);
$Status = $theprofile[8];
&CheckTheStatus;
&CheckPermissions;
@accessarray = split(",", $SpecificPerms);
} else {
&StandardHTML("Beachten Sie, daß alle Aktivitäten dieses Systems protokolliert werden!");
exit;
}
} else {
&StandardHTML("Beachten Sie, daß alle Aktivitäten dieses Systems protokolliert werden!");
exit;
}
#make sure user has permission for THIS forum
unless (($AdminPermission eq "true") | | ($ModStatus eq "true")) {
$ThisAllowed = "";
CHECKTHRU: foreach $iota(@accessarray) {
chomp($iota);
if ($iota eq "$in{'ForumChoice'}") {
$ThisAllowed = "true";
last CHECKTHRU;
}
}
} #end unless...
$Proceed = "";
if (($AdminPermission eq "true") | | ($ModStatus eq "true") | | ($ThisAllowed eq "true")) {
#get current date in jul. format
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
$mon++;
$year = (1900 + $year);
$CurrentJDay = &jday($mon, $mday, $year);
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchUserCoded =~ tr/ /+/;
$SearchNumber = @SearchList;
$ForumChoice = $in{'ForumChoice'};
open (INDEX, "$MembersPath/pindex/privateforumindex$ForumChoice.cgi");
@index = <INDEX>;
close (INDEX);
#now we have the complete index... just need to search in it
$Total = 0;
SEARCHMATCHES: foreach $line(@index) {
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$Good = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$Good = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$Good = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($Good ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $Year) = split(/-/, $PostDate);
$CheckThisYear = length($Year);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$Year");
} else {
$Year = $Year - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
last SEARCHMATCHES;
}
}
} #end if $Bad
} #end foreach $line
$MatchTotal = @good;
my $MaxDisplay = 30; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = "<A HREF=\"search.cgi?action=simplesearchP&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&Searc hDate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&UserNameIn=$UserNameInCoded&PasswordIn=$PasswordInCoded\">[Next Matches]</A>";
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Search Bulletin Board" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse Ihrer Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="$TextSize">Displaying Matches $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">New Open Search</A> | <A HREF="search.cgi?action=introprivate">New Private Search</a> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Back to Forums</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
chomp($goodline[5]);
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$PrivateMax = $GetForumName[13];
chomp($PrivateMax);
if ($PrivateMax eq "yes") {
$TheURL = "$CGIURL/forumdisplay.cgi?action=displayprivate&number=$goodline[0]&topic=$goodline[1]";
} else {
$TheURL = "$NonCGIURL/Forum$goodline[0]/private-$GetForumName[7]/HTML/$goodline[1].html";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="2" FACE="$FontFace">$goodline[3]</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999
</center>$Footer</FONT>
</body></html>
BOTTOM
} else {
&StandardHTML("Für die Suche in diesem Forum sind Sie nicht autorisiert.");
exit;
}
} # end SimpleSearchP sr
sub DoTheSearch {
$CountIt = 0;
SEARCHMATCHES: foreach $line(@index) {
$CountIt++;
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$GoodOne = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$GoodOne = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$GoodOne = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($GoodOne ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $theyear) = split(/-/, $PostDate);
$CheckThisYear = length($theyear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$theyear");
} else {
$Year = $theyear - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
} else {
$Year = $theyear;
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
$ProcessNext = "false";
$MaxSearch = "true";
}
}
} #end if $Bad
if ($MaxSearch eq "true") {
last SEARCHMATCHES;
}
if ($CountIt > 9999) {
if ($in{'StartAt'} ne "") {
$StartPoint = $in{'StartAt'} + $CountIt;
$StartPoint--;
} else {
$StartPoint = $CountIt;
}
&ContinueSearch($StartPoint, $Total);
exit;
}
} #end foreach $line
}
sub ContinueSearch {
my $ArrayNum = shift;
my $Total = shift;
#check for search directory
unless (-e "$NonCGIPath/searchlogs") {
mkdir ("$NonCGIPath/searchlogs", 0777);
chmod(0777, "$NonCGIPath/searchlogs");
}
#create temp file to hold search results
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
$Totalmatches = @good;
&ForwardSearch("$CGIURL/search.cgi?action=simplesearch&SearchIn=$in{'SearchIn'}&ForumChoice=$in{'ForumChoice'}&SearchTerms=$SearchTermsCoded&BooleanAND=$in{'BooleanAND'}&SearchDate =$in{'SearchDate'}&SearchUser=$SearchUserCoded&ExactName=$in{'ExactName'}&File=$FileName&Total=$Total&StartAt=$ArrayNum", "Bitte warten ... Ihre Suchanfrage wird durchgeführt ...
Treffer bisher: $Totalmatches
HINWEIS: Mehr als 200 Treffer werden nicht angezeigt.
");
exit;
}
sub CreateTempSearchName {
@digit = ("A", "B", "F", "G", "H", "I", "n", "p", "q", "r", "s", "t", "u", "v", "w", "y", "z", "2", "3", "4", "5", "6", "7", "8", "9");
srand(time);
$num1 = rand(@digit);
$num2 = rand(@digit);
$num3 = rand(@digit);
$num4 = rand(@digit);
$Random4 = ("$digit[$num1]" . "$digit[$num2]" . "$digit[$num3]" . "$digit[$num4]");
$SearchFile = ("$SearchJulian" . "-$Random4");
}
sub PruneTemps {
opendir(PRUNE, "$NonCGIPath/searchlogs");
@alltemps = readdir(PRUNE);
closedir(PRUNE);
@temps = grep(/\.cgi/, @alltemps);
foreach $temp(@temps) {
($junk, $JDate, $JTime, $junk) = split(/-/, $temp);
$CompareDate = ($JDate + ($JTime * 0.000001));
$Diff = $LastLoginJulian - $CompareDate;
if ($Diff > 0.015) {
unlink("$NonCGIPath/searchlogs/$temp");
}
}
}
sub ForwardSearch {
my $ForwardURL = shift;
my $ForwardText = shift;
print<<ForwardHTML;
<HTML><HEAD>
<title>$BBName</title>
<meta http-equiv="Refresh" content="0; URL=$ForwardURL">
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
<center>
$BorderTop
<table border=0 cellpadding=4 border=0 cellspacing=1 width=$TableWidth2>
<TR $AltColumnColor1>
<TD>
<FONT SIZE="$TextSize" FACE="$FontFace">
$ForwardText Bitte warten ...
</font>
<FONT SIZE="1" FACE="$FontFace">
<A HREF="$ForwardURL">Klicken Sie hier, um nicht länger zu warten (oder wenn Ihr Browser keine automatische Weiterleitung erlaubt).</A>
</FONT>
</td></tr>
</table>
$BorderBottom
</center>
</body></html>
ForwardHTML
} #end Forward sr
sub SimpleSearch2 {
#get current date in jul. format
&GetDateTime;
$CurrentJDay = $LastLoginJulianDATE;
#delete old temporary search records
&PruneTemps;
#prepare search terms--
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded =~ tr/ /+/;
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchNumber = @SearchList;
if ($in{'Total'} eq "") {
$Total = 0;
} else {
$Total = $in{'Total'};
}
#make sure search file is still valid
unless (-e "$NonCGIPath/searchlogs/$in{'File'}") {
$in{'File'} = "";
$FileName = "";
}
$SkipSearch = "";
if (($in{'Continue'} eq "False") && ($in{'File'} ne "")) {
if (-e "$NonCGIPath/searchlogs/$in{'File'}") {
@good = &OpenFile("$NonCGIPath/searchlogs/$in{'File'}");
$SkipSearch = "true";
}
} #end if temp file exists to draw on
$ForumChoice = $in{'ForumChoice'};
if ($SkipSearch ne "true") {
@index = @blank;
#get forum/archive file
@foruminfo = &OpenFile("$VariablesPath/forums.cgi");
$TotalForums = @foruminfo;
@archives = &OpenFile("$NonCGIPath/Archives/archives.pl");
$TotalArchives = @archives;
$TotalTotal = $TotalForums + $TotalArchives;
#search one forum or all?
if ($ForumChoice ne "ALL") {
if ($ForumChoice !~ /A/) {
GETFORUM: foreach $one(@foruminfo) {
@thisforum = split(/\|/, $one);
$thisnum = $thisforum[8];
if ($thisnum eq "$ForumChoice") {
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisnum.cgi");
} else {
@thisindex = @blank;
}
last GETFORUM;
}
}
} else {
#get archive index
($Junk, $ArchNum) = split(/:/, $ForumChoice);
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
} else {
#if searching all forums/archives...
#assemble forum/archive number list
@searchthru = @blank;
foreach $thisone(@foruminfo) {
@eachone = split(/\|/, $thisone);
push(@searchthru, $eachone[8]);
}
foreach $thisuno(@archives) {
@eacharch = split(/\|\#\|/, $thisuno);
$ArchNum = "A:$eacharch[0]";
push(@searchthru, $ArchNum);
}
#determine starting point
if ($in{'StartAt'} eq "") {
$firstforum = $foruminfo[0];
@thisforum = split(/\|/, $firstforum);
$thisnum = $thisforum[8];
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisnum.cgi");
} else {
@thisindex = @blank;
}
if ($TotalTotal > 1) {
$NextForum = "$searchthru[1]";
chomp($NextForum);
$ProcessNext = "true";
} else {
$ProcessNext = "false";
}
} else {
if ($in{'StartAt'} !~ /A/) {
@thisforum = &GetForumRecord($in{'StartAt'});
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisforum[8].cgi");
} else {
@thisindex = @blank;
}
} else {
#if retrieving an archive...
($Junk, $ArchNum) = split(/:/, $in{'StartAt'});
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
#check for final array line
$ArrayRow = 0;
$TotalArray = $TotalTotal - 1;
CHECKTHIS: foreach $checkfinish(@searchthru) {
chomp($checkfinish);
if ($checkfinish eq "$in{'StartAt'}") {
$ArrayLine = $ArrayRow;
if ($ArrayLine == $TotalArray) {
$ProcessNext = "false";
} else {
$ProcessNext = "true";
$BumpUp = $ArrayRow + 1;
$NextForum = $searchthru[$BumpUp];
chomp($NextForum);
}
last CHECKTHIS;
}
$ArrayRow++;
}
} #end if/else StartAt
} # end if searching all archives
@index = sort(@thisindex);
# Determine Current Good Array
if ($in{'File'} =~ /temp\S+\.cgi/) {
open(HOLDER, "$NonCGIPath/searchlogs/$in{'File'}");
@good = <HOLDER>;
close(HOLDER);
} else {
@good = @blank;
}
&DoTheSearch2; #places matches in @good
#now we have all matches- write temp file
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
} #end skip search check
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($FileName eq "") {
$FileName = "$in{'File'}";
}
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=simplesearch&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&SearchD ate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&File=$FileName&Continue=False">[Weitere Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Search Bulletin Board" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse Ihrer Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">Neue Suche</A> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum/Archiv</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
if ($goodline[1] =~ /-/) {
#it is an archive
@thisarchive = &OpenFile("$NonCGIPath/Archives/archives.pl");
foreach $uno(@thisarchive) {
if ($uno =~ /^$goodline[0]/) {
($ThisNum, $ForumName, $junk) = split(/\|\#\|/, $uno);
}
}
$TheURL = "$NonCGIURL/Archives/Archive-$goodline[0]/HTML/$goodline[1].html";
} else {
#it is not an archive, but a forum
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$TheURL = "$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html";
}
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
$CheckThisYear = length($ThisYear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$ThisYear = ("19" . "$ThisYear");
} else {
$ThisYear = $ThisYear - 100;
$ThisYear = sprintf ("%2d", $ThisYear);
$ThisYear =~tr/ /0/;
$ThisYear = ("20" . "$ThisYear");
}
$HyphenIt = "$ThisMo-$ThisDay-$ThisYear";
}
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999.
</center>$Footer</font>
</body></html>
BOTTOM
} # end SimpleSearch sr
sub DoTheSearch2 {
SEARCHMATCHES: foreach $line(@index) {
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$GoodOne = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$GoodOne = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$GoodOne = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($GoodOne ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $theyear) = split(/-/, $PostDate);
$CheckTheYear = length($theyear);
$CheckThisYear = length($theyear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$theyear");
} else {
$Year = $theyear - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
} else {
$Year = $theyear;
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
$ProcessNext = "false";
$MaxSearch = "true";
}
}
} #end if $Bad
if ($MaxSearch eq "true") {
last SEARCHMATCHES;
}
} #end foreach $line
if ($ProcessNext eq "true") {
&ContinueSearch2($NextForum, $Total);
exit;
}
}
sub ContinueSearch2 {
my $NextForum = shift;
my $Total = shift;
#check for search directory
unless (-e "$NonCGIPath/searchlogs") {
mkdir ("$NonCGIPath/searchlogs", 0777);
chmod(0777, "$NonCGIPath/searchlogs");
}
#create temp file to hold search results
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
$Totalmatches = @good;
if ($NextForum !~ /A/) {
@getname = &GetForumRecord($NextForum);
$ForumName = $getname[1];
$archiee = "";
} else {
foreach $archie(@archives) {
@archie = split(/\|\#\|/, $archie);
if ($NextForum eq "A:$archie[0]") {
$ForumName = "$archie[1]";
$archiee = "(archive)";
}
}
}
&ForwardSearch("$CGIURL/search.cgi?action=simplesearch&SearchIn=$in{'SearchIn'}&ForumChoice=$in{'ForumChoice'}&SearchTerms=$SearchTermsCoded&BooleanAND=$in{'BooleanAND'}&SearchDate =$in{'SearchDate'}&SearchUser=$in{'SearchUser'}&ExactName=$in{'ExactName'}&File=$FileName&Total=$Total&StartAt=$NextForum", "Bitte warten ... Ihre Suche wird durchgeführt ...
Treffer bisher: $Totalmatches
Durchsucht wird das Forum/Archiv: $ForumName $archiee
HINWEIS: Mehr als 200 Treffer werden nicht angezeigt.
");
exit;
}
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 "ubb_library.pl";
require "Styles.file";
require "Date.pl";
};
if ($@) {
print "Fehler beim Aufruf der Datei(en): $@\n";
print "Stellen Sie sicher, daß diese Datei(en) vorhanden ist/sind, die Zugriffsrechte und Systempfade korrekt eingestellt sind.";
exit;
}
if ($BBStatus eq "OFF") {
&StandardHTML("Dieses System ist derzeit aufgrund Service-Arbeiten deaktiviert, versuchen Sie es später nocheinmal. Vielen Dank. Bei Fragen schreiben Sie uns eine eMail an <A HREF=\"mailto:$BBEmail\">$BBEmail</A>.");
exit;
}
&ReadParse;
#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(<table border=0 cellpadding=0 cellspacing=0 width="$TableWidth"><TR><td bgcolor="$TableBorderColor">);
$BorderBottom = qq(</td></tr></table> );
} else {
$TableWidth2 = $TableWidth;
$BorderTop = "";
$BorderBottom = "";
}
@forums = &OpenForumsFile;
if ($in{'action'} eq "intro") {
&Intro;
}
if ($in{'action'} eq "getdaily") {
&GetDaily;
}
if ($in{'action'} eq "introprivate") {
&IntroPrivate;
}
if ($in{'action'} eq "simplesearch") {
if ($AllowSearch eq "FALSE") {
&StandardHTML("Die Such-Funktion ist derzeit deaktiviert.");
exit;
} else {
if ($IndexMethod eq "ONEFILE") {
&SimpleSearch;
} else {
&SimpleSearch2;
}
}
}
if ($in{'action'} eq "simplesearchP") {
if ($AllowSearch eq "FALSE") {
&StandardHTML("Die Such-Funktion ist derzeit deaktiviert.");
exit;
} else {
&SimpleSearchP;
}
}
if ($in{'action'} eq "privateid") {
&PrivateID;
}
sub GetDaily {
&GetDateTime;
if ($AllowSearch eq "FALSE") {
$SearchOption = "";
} else {
$SearchOption = qq(<A HREF="$CGIURL/search.cgi?action=intro"><ACRONYM TITLE="Suchen Sie nach Begriff, Datum oder Benutzername.">Neue Suche</ACRONYM></A> | );
}
if (-e "$NonCGIPath/dailyindex-$LastLoginJulianDATE.file") {
$Daily = "exists";
@daily2 = &OpenFile("$NonCGIPath/dailyindex-$LastLoginJulianDATE.file");
@daily = sort(@daily2);
} else {
$Daily = "";
@daily = @blank;
}
#eliminate duplicates
foreach $check(@daily) {
chomp($check);
(@testit) = split(/\|/, $check);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
@testit2 = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
push(@good, $check);
}
}
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@daily = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@daily = @good[$SP..$EP];
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=getdaily&StartPoint=$NextStart">[Weitere Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Today's Active Topics</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<A HREF="$CGIURL/search.cgi?action=intro"><IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie unsere Foren!" BORDER=0></A></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Aktive Themen von heute:</CENTER></font>
<FONT FACE="$FontFace" SIZE="1">Nur in öffentlichen Foren</FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace">$SearchOption <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">letzte Antwort</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum</FONT>
</TD>
</tr>
TOP
for $eachone(@daily) {
@goodline = split(/\|/, $eachone);
chomp($goodline[5]);
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
if (-e "$NonCGIPath/Forum$goodline[0]/HTML/$goodline[1].html") {
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999
</center>$Footer</FONT>
</body></html>
BOTTOM
} #end GetDaily
sub SimpleSearch {
#get current date in jul. format
&GetDateTime;
$CurrentJDay = $LastLoginJulianDATE;
#delete old temporary search records
&PruneTemps;
#prepare search terms--
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchUserCoded =~ tr/ /+/;
$SearchNumber = @SearchList;
if ($in{'Total'} eq "") {
$Total = 0;
} else {
$Total = $in{'Total'};
}
#make sure search file is still valid
unless (-e "$NonCGIPath/searchlogs/$in{'File'}") {
$in{'File'} = "";
$FileName = "";
}
$SkipSearch = "";
if (($in{'Continue'} eq "False") && ($in{'File'} ne "")) {
if (-e "$NonCGIPath/searchlogs/$in{'File'}") {
@good = &OpenFile("$NonCGIPath/searchlogs/$in{'File'}");
$SkipSearch = "true";
}
} #end if temp file exists to draw on
$ForumChoice = $in{'ForumChoice'};
if ($SkipSearch ne "true") {
@index = @blank;
#get forum/archive file
@foruminfo = &OpenFile("$VariablesPath/forums.cgi");
$TotalForums = @foruminfo;
@theindex = &OpenFile("$NonCGIPath/forumindex.cgi");
#search one forum or all?
if ($ForumChoice ne "ALL") {
if ($ForumChoice !~ /A/) {
@thisforum = &GetForumRecord($ForumChoice);
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = grep(/$ForumChoice\|/, @theindex);
} else {
@thisindex = @blank;
}
} else {
#get archive index
($Junk, $ArchNum) = split(/:/, $ForumChoice);
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
} else {
#if searching all forums/archives...
@thisindex = &OpenFile("$NonCGIPath/forumindex.cgi");
} # end if searching all forums
@index = sort(@thisindex);
#determine start point
if ($in{'StartAt'} ne "") {
$StartAt = $in{'StartAt'};
$StartAt = $StartAt + 0;
@index = @index[$StartAt..$#index];
}
#now we have array to be searched...
# Determine Current Good Array
if ($in{'File'} =~ /temp\S+\.cgi/) {
open(HOLDER, "$NonCGIPath/searchlogs/$in{'File'}");
@good = <HOLDER>;
close(HOLDER);
} else {
@good = @blank;
}
&DoTheSearch; #places matches in @good
#now we have all matches- write temp file
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
} #end skip search check
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($FileName eq "") {
$FileName = "$in{'File'}";
}
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=simplesearch&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&SearchD ate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&File=$FileName&Continue=False">[Nächste Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie unsere Foren!" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse der Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">Neue Suche</A> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum/Archiv</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
if ($goodline[1] =~ /-/) {
#it is an archive
@thisarchive = &OpenFile("$NonCGIPath/Archives/archives.pl");
foreach $uno(@thisarchive) {
if ($uno =~ /^$goodline[0]/) {
($ThisNum, $ForumName, $junk) = split(/\|\#\|/, $uno);
}
}
$TheURL = "$NonCGIURL/Archives/Archive-$goodline[0]/HTML/$goodline[1].html";
} else {
#it is not an archive, but a forum
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$TheURL = "$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html";
}
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
$CheckThisYear = length($ThisYear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$ThisYear = ("19" . "$ThisYear");
} else {
$ThisYear = $ThisYear - 100;
$ThisYear = sprintf ("%2d", $ThisYear);
$ThisYear =~tr/ /0/;
$ThisYear = ("20" . "$ThisYear");
}
$HyphenIt = "$ThisMo-$ThisDay-$ThisYear";
}
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999
</center>$Footer</font>
</body></html>
BOTTOM
} # end SimpleSearch sr
sub Intro {
if ($DisplayRegistration eq "NO") {
$RegLinkHere = "";
} else {
$RegLinkHere = qq(| <A HREF="$CGIURL/Ultimate.cgi?action=agree"><ACRONYM TITLE="Registration ist kostenlos!">Registrieren</ACRONYM></A> | <A HREF="$CGIURL/ubbmisc.cgi?action=editbio"><ACRONYM TITLE="Editieren Sie Ihr Profil.">Profil</ACRONYM></a>);
}
#check for default
if ($in{'default'} ne "") {
$DefaultSelect = $in{'default'};
}
print<<TOP;
<HTML>
<HEAD>
<TITLE>$BBName Such-Funktion</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<FORM ACTION="search.cgi" METHOD="POST">
<center>
<table border=0 width=$TableWidth>
<TR>
<td>
<IMG SRC="$NonCGIURL/searchhead.gif" BORDER=0 ALT="Foren durchsuchen!">
</td>
<TD valign=bottom>
<CENTER><FONT FACE="$FontFace" SIZE="1"><A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> $RegLinkHere | <A HREF="$CGIURL/ubbmisc.cgi?action=setprefs"><ACRONYM TITLE="Verändern Sie Ihre Einstellungen.">Einstellungen</ACRONYM></a></FONT></CENTER>
</td>
</tr>
</table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $AltColumnColor1>
<TD align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchbegriff(e):</FONT>
</TD>
<TD>
<INPUT TYPE="TEXT" NAME="SearchTerms" SIZE=20 MAXLENGTH=25>
<FONT SIZE="1" FACE="$FontFace" COLOR="$LinkColor">
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="YES" CHECKED> Alle Begriffe finden.
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="NO"> Einen oder mehrere der Begriffe finden.
Trennen Sie die Wörter mit Leerzeichen, nicht mit Kommas. </FONT>
</td></tr>
<TR $AltColumnColor2>
<TD valign=top align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im Forum/Archiv:</FONT>
</td>
<td>
<FONT SIZE="1" FACE="$FontFace">
<SELECT NAME="ForumChoice">
TOP
if ($AllowTotalSearch eq "TRUE") {
if ($IndexMethod eq "ONEFILE") {
print qq|<OPTION VALUE="ALL">Suchen in allen öffentlichen Foren (Keine Archive)|;
} else {
print qq|<OPTION VALUE="ALL">Suchen in allen öffentlichen Foren und Archiven|;
}
}
for $forumfacts(@forums) {
@foruminfo = split(/\|/, $forumfacts);
$ForumName = "$foruminfo[1]";
$ForumNumber = "$foruminfo[8]";
$ForumStatus = $foruminfo[3];
chomp($ForumName);
chomp($ForumNumber);
$forumline = ("$ForumName" . "::$ForumNumber");
if (($ForumStatus eq "On") && ($foruminfo[6] ne "private")) {
push (@theforumarray, $forumline);
}
}
@forumarray = sort(@theforumarray);
for $thisone(@forumarray) {
($GetForumName, $GetForumNumber) = split(/::/, $thisone);
if ($GetForumNumber eq "$DefaultSelect") {
print qq(<OPTION VALUE="$GetForumNumber" SELECTED>$GetForumName);
} else {
print qq(<OPTION VALUE="$GetForumNumber">$GetForumName);
}
}
#check for archives
if (-e "$NonCGIPath/Archives/archives.pl") {
@archives = &OpenFile("$NonCGIPath/Archives/archives.pl");
if ($archives[0] ne "") {
foreach $archie(@archives) {
($ArchNumber, $ArchName, $junk) = split(/\|\#\|/, $archie);
$ArchCheck = ("A:" . "$ArchNumber");
if ($ArchCheck eq "$DefaultSelect") {
print qq(<OPTION VALUE="A:$ArchNumber" SELECTED>Archiv: $ArchName);
} else {
print qq(<OPTION VALUE="A:$ArchNumber">Archiv: $ArchName);
}
}
}
}
print<<NEXT;
</select>
</font>
</td></tr>
<tr $AltColumnColor1>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im:</FONT>
</td>
<td>
<SELECT NAME="SearchIn">
<OPTION VALUE="ALL">kompletten Beitrag
<OPTION VALUE="SUBJECT">nur im Betreff
</SELECT>
</td></tr>
<tr $AltColumnColor2>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Datum:</FONT>
</td>
<td>
<SELECT NAME="SearchDate">
<OPTION value="ALL">irgendein Datum
<OPTION VALUE="1">seit gestern
<OPTION VALUE="5">seit der letzten fünf Tage
<OPTION VALUE="10">seit der letzten 10 Tage
<OPTION VALUE="30">seit der letzten 30 Tage
</SELECT>
</td></tr>
<tr $AltColumnColor1>
<td align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suche nach Benutzernamen:</FONT>
</td>
<td valign=top><FONT FACE="$FontFace" color="$LinkColor" size="1">
<INPUT TYPE="TEXT" NAME="SearchUser" SIZE=20 MAXLENGTH=25>
<INPUT TYPE="Radio" NAME="ExactName" VALUE="yes">nach exaktem Namen (Groß-/Kleinschreibung)
<INPUT TYPE="Radio" NAME="ExactName" VALUE="no" CHECKED>irgendeine Übereinstimmung</FONT>
</td></tr>
</table>
$BorderBottom
<FONT size="1" FACE="$FontFace">
Hinweis: wollen Sie in privaten Foren suchen, klicken Sie <A HREF="search.cgi?action=introprivate">hier</A>.
</font>
<INPUT TYPE="HIDDEN" NAME="action" VALUE="simplesearch">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Suchen!">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Felder löschen">
</form>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998-1999
</center>$Footer</FONT>
</body></html>
NEXT
} # end sub Intro
sub IntroPrivate {
print<<TheHTML;
<HTML><HEAD>
<TITLE>
$BBName - Suchen in privaten Foren
</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
<FONT SIZE="$TextSize" FACE="$FontFace" color="$TextColor">
$Header
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Durchsuchen Sie die Foren!" BORDER=0>
<blockquote>
Wollen Sie auch private Foren durchsuchen, müssen Sie sich erst identifizieren, damit wir ermitteln können, für welche Foren Sie eine Berechtigung haben. Ausschließlich Administratoren und Moderatoren können in allen privaten Foren suchen.
</blockquote>
</font>
<CENTER>
<FORM ACTION="search.cgi" NAME="REPLIER" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="privateid">
<table border=0>
<TR>
<TD>
<FONT SIZE="2" FACE="Verdana, Arial">Ihr Benutzername:</FONT>
</td>
<td><INPUT TYPE="TEXT" NAME="UserName" SIZE=25 MAXLENGTH=25>
</td>
<TR>
<td>
<FONT SIZE="2" FACE="Verdana, Arial">Ihr Kennwort:</FONT>
</td>
<td>
<INPUT TYPE="PASSWORD" NAME="Password" SIZE=13 MAXLENGTH=13>
</td></tr>
<tr><TD colspan=2>
</td></tr>
</table>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Identifikation senden">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
< !-- HIDE
var dc = document.cookie;
var testUserName = getCookie("UserName");
var testPassword = getCookie("Password");
if (document.cookie) {
if (testUserName == null) {
document.REPLIER.UserName.focus();
} else {
document.REPLIER.UserName.value = getCookie("UserName");
document.REPLIER.Password.value = getCookie("Password");
}
} else {
document.REPLIER.UserName.focus();
}
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end)); }
}
return null;
}
// STOP HIDING FROM OTHER BROWSERS -->
</SCRIPT>
TheHTML
&PageBottomHTML;
} #end intro private
sub PrivateID {
#check permissions for user
$NameFound = "no";
$ProfileNumber = &GetUserNumber($in{'UserName'});
if ($ProfileNumber ne "") {
$NameFound = "yes";
} else {
$NameFound = "no";
}
if ($NameFound eq "yes") {
@theprofile = &OpenProfile("$ProfileNumber.cgi");
if ($in{'Password'} eq "$theprofile[1]") {
$Permission = "$theprofile[4]";
($GenPerms, $SpecificPerms) = split(/\&/, $Permission);
$Status = $theprofile[8];
&CheckTheStatus;
&CheckPermissions;
@accessarray = split(",", $SpecificPerms);
} else {
&StandardHTML("Das eingegebene Kennwort ist nicht korrekt - versuchen Sie es erneut, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
} else {
&StandardHTML("Der eingegebene Benutzername ist dem System nicht bekannt - versuchen Sie es erneut, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
$ArrayTotal = @accessarray;
if (($AdminPermission ne "true") && ($ModStatus ne "true") && ($ArrayTotal == 0)) {
&StandardHTML("Für diese Funktion sind Sie nicht autorisiert, bitte nutzen Sie die Zurück-Funktion Ihres Browsers.");
exit;
}
$UserNameCoded = &HTMLIFY($in{'UserName'});
$PasswordCoded = &HTMLIFY($in{'Password'});
if ($DisplayRegistration eq "NO") {
$RegLinkHere = "";
} else {
$RegLinkHere = qq(| <A HREF="$CGIURL/Ultimate.cgi?action=agree"><ACRONYM TITLE="Registration ist kostenlos!">Registrieren</ACRONYM></A> | <A HREF="$CGIURL/ubbmisc.cgi?action=editbio"><ACRONYM TITLE="Editieren Sie Ihr Profil">Profil</ACRONYM></a>);
}
print<<TOP;
<HTML>
<HEAD>
<TITLE>$BBName Suchfunktion</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<FORM ACTION="search.cgi" METHOD="POST">
<center>
<table border=0 width=$TableWidth>
<TR>
<td>
<IMG SRC="$NonCGIURL/searchhead.gif" BORDER=0 ALT="Durchsuchen Sie unsere Foren!">
</td>
<TD valign=bottom>
<CENTER><FONT FACE="$FontFace" SIZE="1"><A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Zurück zu den Foren</A> $RegLinkHere | <A HREF="$CGIURL/ubbmisc.cgi?action=setprefs"><ACRONYM TITLE="Verändern Sie Ihre Einstellungen">Einstellungen</ACRONYM></a></FONT></CENTER>
</td>
</tr>
</table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $AltColumnColor1>
<TD align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchbegriff(e):</FONT>
</TD>
<TD>
<INPUT TYPE="TEXT" NAME="SearchTerms" SIZE=20 MAXLENGTH=25>
<FONT SIZE="1" FACE="$FontFace" COLOR="$LinkColor">
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="YES" CHECKED> alle Begriffe finden.
<INPUT TYPE="RADIO" NAME="BooleanAND" VALUE="NO"> Einen oder mehrere Begriffe finden.
Trennen Sie Wörter mit Leerzeichen, nicht mit Kommas. </FONT>
</td></tr>
<TR $AltColumnColor2>
<TD valign=top align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suche im Forum:</FONT>
</td>
<td>
<FONT SIZE="1" FACE="$FontFace">
<SELECT NAME="ForumChoice">
<OPTION VALUE="">Wählen Sie ein privates Forum:
TOP
for $forumfacts(@forums) {
@foruminfo = split(/\|/, $forumfacts);
$ForumName = "$foruminfo[1]";
$ForumNumber = "$foruminfo[8]";
$ForumStatus = $foruminfo[3];
chomp($ForumName);
chomp($ForumNumber);
$forumline = ("$ForumName" . "::$ForumNumber");
if ($foruminfo[6] eq "private") {
unless (($AdminPermission eq "true") | | ($ModStatus eq "true")) {
$ThisAllowed = "";
CHECKTHRU: foreach $iota(@accessarray) {
chomp($iota);
if ($iota eq "$ForumNumber") {
$ThisAllowed = "true";
last CHECKTHRU;
}
}
} #end unless...
$Proceed = "";
if (($AdminPermission eq "true") | | ($ModStatus eq "true") | | ($ThisAllowed eq "true")) {
$Proceed = "YES";
}
if (($ForumStatus eq "On") && ($Proceed eq "YES")) {
push (@theforumarray, $forumline);
}
}
}
@forumarray = sort(@theforumarray);
for (@forumarray) {
($GetForumName, $GetForumNumber) = split(/::/, $_);
print ("<OPTION VALUE=\"$GetForumNumber\">$GetForumName");
}
print<<NEXT;
</select>
</font>
</td></tr>
<tr $AltColumnColor1>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen im:</FONT>
</td>
<td>
<SELECT NAME="SearchIn">
<OPTION VALUE="ALL">kompletten Beitrag
<OPTION VALUE="SUBJECT">nur im Betreff
</SELECT>
</td></tr>
<tr $AltColumnColor2>
<td align=right>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Datum:</FONT>
</td>
<td>
<SELECT NAME="SearchDate">
<OPTION value="ALL">irgendein Datum
<OPTION VALUE="1">seit gestern
<OPTION VALUE="5">seit fünf Tagen
<OPTION VALUE="10">seit 10 Tagen
<OPTION VALUE="30">seit 30 Tagen
</SELECT>
</td></tr>
<tr $AltColumnColor1>
<td align=right valign=top>
<FONT SIZE="$TextSize" FACE="$FontFace">Suchen nach Benutzernamen:</FONT>
</td>
<td valign=top><FONT FACE="$FontFace" color="$LinkColor" size="1">
<INPUT TYPE="TEXT" NAME="SearchUser" SIZE=20 MAXLENGTH=25>
<INPUT TYPE="Radio" NAME="ExactName" VALUE="yes">nach exaktem Namen (Groß-/Kleinschreibung)
<INPUT TYPE="Radio" NAME="ExactName" VALUE="no" CHECKED>irgendeine Übereinstimmung</FONT>
</td></tr>
</table>
$BorderBottom
<INPUT TYPE="HIDDEN" NAME="UserNameIn" VALUE="$UserNameCoded">
<INPUT TYPE="HIDDEN" NAME="PasswordIn" VALUE="$PasswordCoded">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="simplesearchP">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Suchen!">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Felder löschen">
</form>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998-1999.
</center>$Footer</font>
</body></html>
NEXT
} # end sub private id
sub SimpleSearchP {
if ($in{'ForumChoice'} eq "") {
&StandardHTML("Sie haben kein Forum ausgewählt - nutzen Sie die ZURÜCK-Funktion Ihres Browsers und versuchen Sie es erneut.");
exit;
}
#codify un and pw
$UserNameIn = &UNHTMLIFY($in{'UserNameIn'});
$PasswordIn = &UNHTMLIFY($in{'PasswordIn'});
$UserNameInCoded = $UserNameIn;
$UserNameInCoded =~ tr/ /+/;
$UserNameIncCoded = &HTMLIFY($UserNameInCoded);
$PasswordInCoded = $PasswordIn;
$PasswordInCoded =~ tr/ /+/;
$PasswordIncCoded = &HTMLIFY($PasswordInCoded);
#re-confirm identity
$NameFound = "no";
$ProfileNumber = &GetUserNumber($UserNameIn);
if ($ProfileNumber ne "") {
$NameFound = "yes";
} else {
$NameFound = "no";
}
if ($NameFound eq "yes") {
@theprofile = &OpenProfile("$ProfileNumber.cgi");
if ($PasswordIn eq "$theprofile[1]") {
$Permission = "$theprofile[4]";
($GenPerms, $SpecificPerms) = split(/\&/, $Permission);
$Status = $theprofile[8];
&CheckTheStatus;
&CheckPermissions;
@accessarray = split(",", $SpecificPerms);
} else {
&StandardHTML("Beachten Sie, daß alle Aktivitäten dieses Systems protokolliert werden!");
exit;
}
} else {
&StandardHTML("Beachten Sie, daß alle Aktivitäten dieses Systems protokolliert werden!");
exit;
}
#make sure user has permission for THIS forum
unless (($AdminPermission eq "true") | | ($ModStatus eq "true")) {
$ThisAllowed = "";
CHECKTHRU: foreach $iota(@accessarray) {
chomp($iota);
if ($iota eq "$in{'ForumChoice'}") {
$ThisAllowed = "true";
last CHECKTHRU;
}
}
} #end unless...
$Proceed = "";
if (($AdminPermission eq "true") | | ($ModStatus eq "true") | | ($ThisAllowed eq "true")) {
#get current date in jul. format
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
$mon++;
$year = (1900 + $year);
$CurrentJDay = &jday($mon, $mday, $year);
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchUserCoded =~ tr/ /+/;
$SearchNumber = @SearchList;
$ForumChoice = $in{'ForumChoice'};
open (INDEX, "$MembersPath/pindex/privateforumindex$ForumChoice.cgi");
@index = <INDEX>;
close (INDEX);
#now we have the complete index... just need to search in it
$Total = 0;
SEARCHMATCHES: foreach $line(@index) {
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$Good = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$Good = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$Good = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($Good ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $Year) = split(/-/, $PostDate);
$CheckThisYear = length($Year);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$Year");
} else {
$Year = $Year - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
last SEARCHMATCHES;
}
}
} #end if $Bad
} #end foreach $line
$MatchTotal = @good;
my $MaxDisplay = 30; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = "<A HREF=\"search.cgi?action=simplesearchP&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&Searc hDate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&UserNameIn=$UserNameInCoded&PasswordIn=$PasswordInCoded\">[Next Matches]</A>";
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Search Bulletin Board" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse Ihrer Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="$TextSize">Displaying Matches $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">New Open Search</A> | <A HREF="search.cgi?action=introprivate">New Private Search</a> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">Back to Forums</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
chomp($goodline[5]);
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$PrivateMax = $GetForumName[13];
chomp($PrivateMax);
if ($PrivateMax eq "yes") {
$TheURL = "$CGIURL/forumdisplay.cgi?action=displayprivate&number=$goodline[0]&topic=$goodline[1]";
} else {
$TheURL = "$NonCGIURL/Forum$goodline[0]/private-$GetForumName[7]/HTML/$goodline[1].html";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="2" FACE="$FontFace">$goodline[3]</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999
</center>$Footer</FONT>
</body></html>
BOTTOM
} else {
&StandardHTML("Für die Suche in diesem Forum sind Sie nicht autorisiert.");
exit;
}
} # end SimpleSearchP sr
sub DoTheSearch {
$CountIt = 0;
SEARCHMATCHES: foreach $line(@index) {
$CountIt++;
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$GoodOne = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$GoodOne = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$GoodOne = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($GoodOne ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $theyear) = split(/-/, $PostDate);
$CheckThisYear = length($theyear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$theyear");
} else {
$Year = $theyear - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
} else {
$Year = $theyear;
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
$ProcessNext = "false";
$MaxSearch = "true";
}
}
} #end if $Bad
if ($MaxSearch eq "true") {
last SEARCHMATCHES;
}
if ($CountIt > 9999) {
if ($in{'StartAt'} ne "") {
$StartPoint = $in{'StartAt'} + $CountIt;
$StartPoint--;
} else {
$StartPoint = $CountIt;
}
&ContinueSearch($StartPoint, $Total);
exit;
}
} #end foreach $line
}
sub ContinueSearch {
my $ArrayNum = shift;
my $Total = shift;
#check for search directory
unless (-e "$NonCGIPath/searchlogs") {
mkdir ("$NonCGIPath/searchlogs", 0777);
chmod(0777, "$NonCGIPath/searchlogs");
}
#create temp file to hold search results
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
$Totalmatches = @good;
&ForwardSearch("$CGIURL/search.cgi?action=simplesearch&SearchIn=$in{'SearchIn'}&ForumChoice=$in{'ForumChoice'}&SearchTerms=$SearchTermsCoded&BooleanAND=$in{'BooleanAND'}&SearchDate =$in{'SearchDate'}&SearchUser=$SearchUserCoded&ExactName=$in{'ExactName'}&File=$FileName&Total=$Total&StartAt=$ArrayNum", "Bitte warten ... Ihre Suchanfrage wird durchgeführt ...
Treffer bisher: $Totalmatches
HINWEIS: Mehr als 200 Treffer werden nicht angezeigt.
");
exit;
}
sub CreateTempSearchName {
@digit = ("A", "B", "F", "G", "H", "I", "n", "p", "q", "r", "s", "t", "u", "v", "w", "y", "z", "2", "3", "4", "5", "6", "7", "8", "9");
srand(time);
$num1 = rand(@digit);
$num2 = rand(@digit);
$num3 = rand(@digit);
$num4 = rand(@digit);
$Random4 = ("$digit[$num1]" . "$digit[$num2]" . "$digit[$num3]" . "$digit[$num4]");
$SearchFile = ("$SearchJulian" . "-$Random4");
}
sub PruneTemps {
opendir(PRUNE, "$NonCGIPath/searchlogs");
@alltemps = readdir(PRUNE);
closedir(PRUNE);
@temps = grep(/\.cgi/, @alltemps);
foreach $temp(@temps) {
($junk, $JDate, $JTime, $junk) = split(/-/, $temp);
$CompareDate = ($JDate + ($JTime * 0.000001));
$Diff = $LastLoginJulian - $CompareDate;
if ($Diff > 0.015) {
unlink("$NonCGIPath/searchlogs/$temp");
}
}
}
sub ForwardSearch {
my $ForwardURL = shift;
my $ForwardText = shift;
print<<ForwardHTML;
<HTML><HEAD>
<title>$BBName</title>
<meta http-equiv="Refresh" content="0; URL=$ForwardURL">
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
<center>
$BorderTop
<table border=0 cellpadding=4 border=0 cellspacing=1 width=$TableWidth2>
<TR $AltColumnColor1>
<TD>
<FONT SIZE="$TextSize" FACE="$FontFace">
$ForwardText Bitte warten ...
</font>
<FONT SIZE="1" FACE="$FontFace">
<A HREF="$ForwardURL">Klicken Sie hier, um nicht länger zu warten (oder wenn Ihr Browser keine automatische Weiterleitung erlaubt).</A>
</FONT>
</td></tr>
</table>
$BorderBottom
</center>
</body></html>
ForwardHTML
} #end Forward sr
sub SimpleSearch2 {
#get current date in jul. format
&GetDateTime;
$CurrentJDay = $LastLoginJulianDATE;
#delete old temporary search records
&PruneTemps;
#prepare search terms--
&decodeURL($in{'SearchTerms'});
chomp($in{'SearchTerms'});
$SearchWords = $in{'SearchTerms'};
$SearchTermsCoded = $SearchWords;
$SearchTermsCoded =~ tr/ /+/;
$SearchWords =~ s/\n//sg;
$SearchWords =~ s/\r//sg;
$SearchWords =~ s/\@/\\@/sg;
if ($SearchWords =~ / /) {
@SearchList = split(/ /, $SearchWords);
} else {
@SearchList = $SearchWords;
}
$SearchUser = $in{'SearchUser'};
$SearchUser = &UNHTMLIFY($SearchUser);
$SearchUserCoded = $in{'SearchUser'};
$SearchUserCoded =~ tr/ /+/;
$SearchUserCoded = &HTMLIFY($SearchUserCoded);
$SearchNumber = @SearchList;
if ($in{'Total'} eq "") {
$Total = 0;
} else {
$Total = $in{'Total'};
}
#make sure search file is still valid
unless (-e "$NonCGIPath/searchlogs/$in{'File'}") {
$in{'File'} = "";
$FileName = "";
}
$SkipSearch = "";
if (($in{'Continue'} eq "False") && ($in{'File'} ne "")) {
if (-e "$NonCGIPath/searchlogs/$in{'File'}") {
@good = &OpenFile("$NonCGIPath/searchlogs/$in{'File'}");
$SkipSearch = "true";
}
} #end if temp file exists to draw on
$ForumChoice = $in{'ForumChoice'};
if ($SkipSearch ne "true") {
@index = @blank;
#get forum/archive file
@foruminfo = &OpenFile("$VariablesPath/forums.cgi");
$TotalForums = @foruminfo;
@archives = &OpenFile("$NonCGIPath/Archives/archives.pl");
$TotalArchives = @archives;
$TotalTotal = $TotalForums + $TotalArchives;
#search one forum or all?
if ($ForumChoice ne "ALL") {
if ($ForumChoice !~ /A/) {
GETFORUM: foreach $one(@foruminfo) {
@thisforum = split(/\|/, $one);
$thisnum = $thisforum[8];
if ($thisnum eq "$ForumChoice") {
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisnum.cgi");
} else {
@thisindex = @blank;
}
last GETFORUM;
}
}
} else {
#get archive index
($Junk, $ArchNum) = split(/:/, $ForumChoice);
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
} else {
#if searching all forums/archives...
#assemble forum/archive number list
@searchthru = @blank;
foreach $thisone(@foruminfo) {
@eachone = split(/\|/, $thisone);
push(@searchthru, $eachone[8]);
}
foreach $thisuno(@archives) {
@eacharch = split(/\|\#\|/, $thisuno);
$ArchNum = "A:$eacharch[0]";
push(@searchthru, $ArchNum);
}
#determine starting point
if ($in{'StartAt'} eq "") {
$firstforum = $foruminfo[0];
@thisforum = split(/\|/, $firstforum);
$thisnum = $thisforum[8];
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisnum.cgi");
} else {
@thisindex = @blank;
}
if ($TotalTotal > 1) {
$NextForum = "$searchthru[1]";
chomp($NextForum);
$ProcessNext = "true";
} else {
$ProcessNext = "false";
}
} else {
if ($in{'StartAt'} !~ /A/) {
@thisforum = &GetForumRecord($in{'StartAt'});
if ( ($thisforum[3] eq "On") && ($thisforum[6] ne "private") ) {
@thisindex = &OpenFile("$NonCGIPath/forumindex$thisforum[8].cgi");
} else {
@thisindex = @blank;
}
} else {
#if retrieving an archive...
($Junk, $ArchNum) = split(/:/, $in{'StartAt'});
@thisindex = &OpenFile("$NonCGIPath/Archives/archiveindex-$ArchNum.pl");
}
#check for final array line
$ArrayRow = 0;
$TotalArray = $TotalTotal - 1;
CHECKTHIS: foreach $checkfinish(@searchthru) {
chomp($checkfinish);
if ($checkfinish eq "$in{'StartAt'}") {
$ArrayLine = $ArrayRow;
if ($ArrayLine == $TotalArray) {
$ProcessNext = "false";
} else {
$ProcessNext = "true";
$BumpUp = $ArrayRow + 1;
$NextForum = $searchthru[$BumpUp];
chomp($NextForum);
}
last CHECKTHIS;
}
$ArrayRow++;
}
} #end if/else StartAt
} # end if searching all archives
@index = sort(@thisindex);
# Determine Current Good Array
if ($in{'File'} =~ /temp\S+\.cgi/) {
open(HOLDER, "$NonCGIPath/searchlogs/$in{'File'}");
@good = <HOLDER>;
close(HOLDER);
} else {
@good = @blank;
}
&DoTheSearch2; #places matches in @good
#now we have all matches- write temp file
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
} #end skip search check
$MatchTotal = @good;
my $MaxDisplay = 40; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@good = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@good = @good[$SP..$EP];
if ($FileName eq "") {
$FileName = "$in{'File'}";
}
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq(<A HREF="search.cgi?action=simplesearch&StartPoint=$NextStart&SearchTerms=$SearchTermsCoded&SearchUser=$SearchUserCoded&ForumChoice=$in{'ForumChoice'}&SearchIn=$in{'SearchIn'}&SearchD ate=$in{'SearchDate'}&ExactName=$in{'ExactName'}&BooleanAND=$in{'BooleanAND'}&File=$FileName&Continue=False">[Weitere Themen]</A>);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<<TOP;
<HTML>
<HEAD><TITLE>$BBName - Ergebnisse Ihrer Suche</TITLE>
$HeaderInsert
</HEAD>
<BODY $BGColor $PageBackground text="$TextColor" link="$LinkColor" alink="$ActiveLinkColor" vlink="$VisitedLinkColor" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0>
$Header
<table border=0 width=$TableWidth>
<TR><TD align=left>
<IMG SRC="$NonCGIURL/searchhead.gif" ALT="Search Bulletin Board" BORDER=0></td>
<TD align=right valign=bottom>
<FONT SIZE="5" FACE="Courier New"><CENTER>Ergebnisse Ihrer Suche:</CENTER></FONT>
</td></tr></table>
<table border=0 width=$TableWidth>
<TR><TD align=left>
<FONT FACE="$FontFace" SIZE="1">Zeige Treffer $StartPoint - $EndPoint ($MatchTotal total) $NextWording</FONT></td><td align=right>
<FONT SIZE="1" FACE="$FontFace"><A HREF="search.cgi?action=intro">Neue Suche</A> | <A HREF="Ultimate.cgi?action=intro&BypassCookie=true">zurück zu den Foren</A> </FONT>
</td></tr></table>
$BorderTop
<table border=0 cellspacing=1 cellpadding=4 width=$TableWidth2>
<TR $TableColorStrip>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Thema</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Name</FONT>
</TD>
<TD NOWRAP>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Datum</FONT>
</TD>
<TD>
<FONT SIZE="1" FACE="$FontFace" COLOR="$TableStripTextColor">Forum/Archiv</FONT>
</TD>
</tr>
TOP
for $eachone(@good) {
@goodline = split(/\|/, $eachone);
if ($goodline[1] =~ /-/) {
#it is an archive
@thisarchive = &OpenFile("$NonCGIPath/Archives/archives.pl");
foreach $uno(@thisarchive) {
if ($uno =~ /^$goodline[0]/) {
($ThisNum, $ForumName, $junk) = split(/\|\#\|/, $uno);
}
}
$TheURL = "$NonCGIURL/Archives/Archive-$goodline[0]/HTML/$goodline[1].html";
} else {
#it is not an archive, but a forum
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$TheURL = "$NonCGIURL/Forum$goodline[0]/HTML/$goodline[1].html";
}
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
$CheckThisYear = length($ThisYear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$ThisYear = ("19" . "$ThisYear");
} else {
$ThisYear = $ThisYear - 100;
$ThisYear = sprintf ("%2d", $ThisYear);
$ThisYear =~tr/ /0/;
$ThisYear = ("20" . "$ThisYear");
}
$HyphenIt = "$ThisMo-$ThisDay-$ThisYear";
}
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
print<<ROW;
<TR>
<TD $AltColumnColor1>
<FONT SIZE="2" FACE="$FontFace"><A HREF="$TheURL">$goodline[4]</A>
</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$goodline[2]</FONT>
</TD>
<TD $AltColumnColor1 NOWRAP>
<FONT SIZE="$DateSize" FACE="$FontFace">$TheDate</FONT>
</TD>
<TD $AltColumnColor2>
<FONT SIZE="2" FACE="$FontFace">$ForumName</FONT>
</TD>
</tr>
ROW
}
print<<BOTTOM;
</table>
$BorderBottom
<FONT SIZE="$TextSize" FACE="$FontFace">
<p align=right>$NextWording</p>
<CENTER>
</FONT>
<FONT COLOR="$CopyrightTextColor" size="1" FACE="$FontFace">$YourCopyrightNotice
Powered by:
Ultimate Bulletin Board
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 -1999.
</center>$Footer</font>
</body></html>
BOTTOM
} # end SimpleSearch sr
sub DoTheSearch2 {
SEARCHMATCHES: foreach $line(@index) {
$Bad = "no";
@indie = split(/\|/, $line);
# Username Search Routine---
if ($SearchUser ne "") {
if ($in{'ExactName'} eq "no") {
unless ($indie[2] =~ m/$in{'SearchUser'}/i) {
$Bad = "yes";
}
} else {
unless ($indie[2] eq "$SearchUser") {
$Bad = "yes";
}
}
}
# Keyword Search Routine---
$GoodOne = "";
if (($SearchWords ne "") && ($Bad ne "yes")) {
foreach $word(@SearchList) {
if ($in{'BooleanAND'} eq "YES") {
if ($in{'SearchIn'} eq "SUBJECT") {
unless ($indie[4] =~ m/$word/i) {
$Bad = "yes";
}
} else {
unless (($indie[5] =~ m/$word/i) | | ($indie[4] =~ m/$word/i)) {
$Bad = "yes";
}
}
} else {
if ($in{'SearchIn'} eq "SUBJECT") {
if ($indie[4] =~ m/$word/i) {
$GoodOne = "yes";
}
} else {
if (($indie[4] =~ m/$word/i) | | ($indie[5] =~ m/$word/i)) {
$GoodOne = "yes";
}
}
}
}
}
if (($in{'BooleanAND'} eq "NO") && ($GoodOne ne "yes")) {
$Bad = "yes";
}
# Date Search
if (($in{'SearchDate'} ne "ALL") && ($Bad ne "yes")) {
$PostDate = $indie[3];
chomp($PostDate);
($month, $day, $theyear) = split(/-/, $PostDate);
$CheckTheYear = length($theyear);
$CheckThisYear = length($theyear);
if ($CheckThisYear < 4) {
if ($CheckThisYear == 2) {
$Year = ("19" . "$theyear");
} else {
$Year = $theyear - 100;
$Year = sprintf ("%2d", $Year);
$Year =~tr/ /0/;
$Year = ("20" . "$Year");
}
} else {
$Year = $theyear;
}
$PostJDay = &jday($month, $day, $Year);
#current jday is $CurrentJDay
if ($in{'SearchDate'} eq "0") {
$CutOff = ($CurrentJDay - 0);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "1") {
$CutOff = ($CurrentJDay - 1);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "5") {
$CutOff = ($CurrentJDay - 5);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "10") {
$CutOff = ($CurrentJDay - 10);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
if ($in{'SearchDate'} eq "30") {
$CutOff = ($CurrentJDay - 30);
unless ($PostJDay >= $CutOff) {
$Bad = "yes";
}
}
}
if ($Bad ne "yes") {
(@testit) = split(/\|/, $line);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
(@testit2) = split(/\|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
$Total++;
push(@good, $line);
if ($Total >= 200) {
$ProcessNext = "false";
$MaxSearch = "true";
}
}
} #end if $Bad
if ($MaxSearch eq "true") {
last SEARCHMATCHES;
}
} #end foreach $line
if ($ProcessNext eq "true") {
&ContinueSearch2($NextForum, $Total);
exit;
}
}
sub ContinueSearch2 {
my $NextForum = shift;
my $Total = shift;
#check for search directory
unless (-e "$NonCGIPath/searchlogs") {
mkdir ("$NonCGIPath/searchlogs", 0777);
chmod(0777, "$NonCGIPath/searchlogs");
}
#create temp file to hold search results
if ($in{'File'} eq "") {
&CreateTempSearchName;
$FileName = "temp-$SearchFile.cgi";
} else {
$FileName = "$in{'File'}";
}
open(HOLD, ">$NonCGIPath/searchlogs/$FileName");
foreach $one(@good) {
chomp($one);
print HOLD "$one\n";
}
close(HOLD);
chmod(0666, "$NonCGIPath/searchlogs/$FileName");
$Totalmatches = @good;
if ($NextForum !~ /A/) {
@getname = &GetForumRecord($NextForum);
$ForumName = $getname[1];
$archiee = "";
} else {
foreach $archie(@archives) {
@archie = split(/\|\#\|/, $archie);
if ($NextForum eq "A:$archie[0]") {
$ForumName = "$archie[1]";
$archiee = "(archive)";
}
}
}
&ForwardSearch("$CGIURL/search.cgi?action=simplesearch&SearchIn=$in{'SearchIn'}&ForumChoice=$in{'ForumChoice'}&SearchTerms=$SearchTermsCoded&BooleanAND=$in{'BooleanAND'}&SearchDate =$in{'SearchDate'}&SearchUser=$in{'SearchUser'}&ExactName=$in{'ExactName'}&File=$FileName&Total=$Total&StartAt=$NextForum", "Bitte warten ... Ihre Suche wird durchgeführt ...
Treffer bisher: $Totalmatches
Durchsucht wird das Forum/Archiv: $ForumName $archiee
HINWEIS: Mehr als 200 Treffer werden nicht angezeigt.
");
exit;
}