Avatar billede Slettet bruger
30. september 2007 - 23:45 Der er 29 kommentarer og
2 løsninger

Spam frit forum?

Hej!

Er der nogen der kan lave dette forum spamfrit. Noget med nogle random tal der skal skrives. Bare noget der holder spambote ude.


#!/usr/bin/perl
##########################################################
# ForumScript.co.uk 04/12/2004
# © 1999-2004 ForumScript.co.uk
# Script Updated for ForumScript.co.uk by Babelnotes.be
##########################################################
# Instructions: http://www.ForumScript.co.uk/instructions/
# FAQ:          http://www.ForumScript.co.uk/faq/
##########################################################
my $ScriptName          = "forum.pl";
my $Password            = "fjernet";
my $ForumData          = 'forum.txt';
my $template            = 'template.htm';
my $token              = '@#@#@';
##########################################################
# Table Settings
my $TableBorder          = 'silver';
my $TableHeadColor        = 'silver';
my $MessageViewTableWidth = '100%';
my $CellSpacing          = '1';
my $CellPadding          = '2';
my $MessTitleFont        = "Verdana";
my $MessTitleFontsize    = 1;
my $MessTitleFontcolor    = "#52526B";
##########################################################
# Font Settings
my $MessFont              = "Verdana";
my $MessFontsize          = 1;
my $MessThreadFontSize    = 1;
my $MessFontcolor        = "#000000";
##########################################################
# Cell Colours
my $MainPageColorDark    = '#ffffff';
my $MainPageColorLight    = '#ffffff';
my $ThreadPageColorDark  = '#ffffff';
my $ThreadPageColorLight  = '#ffffff';
##########################################################
# Reply and Thread link Format
my $BottomFont            = "Verdana";
my $BottomFontSize        = "1";
my $BottomFontColor      = "#000000";
##########################################################
# Message Form Settings
my $MaxLengthMessage      = 3000;
my $ROWS                  = 10;
my $COLS                  = 40;
my $MaxNameChars          = 10;
my $MaxSubjectChars      = 58;
##########################################################
# Miscellaneous Settings
my $language              = "DA";
my $MaxMessagesPerThread  = 100;
my $WrapIE                ='SOFT';
my $Wrap                  = 0;
##################################################################################
# ForumScript.co.uk © 1999 - 2004 Copyright                                      #
# The scripts are available for private and commercial use.                      #
# You can use the scripts in any website you build.                              #
# It is prohibited to sell the scripts in any format to anybody.                #
# The scripts may only be distributed by ForumScript.co.uk                      #
# The redistribution of modified versions of the scripts is prohibited.          #
# ForumScript.co.uk accepts no responsibility or liability                      #
# whatsoever for any damages however caused when using our services or scripts.  #
# By downloading and using this script you agree to the terms and conditions.    #
##################################################################################

$DefaulPassword="";
open (TEMPLATE, "< $template") or die print "$MESS{'IO_ERROR'} ($template)";
@templ = <TEMPLATE>;
close (TEMPLATE);
$token_len = length($token);
$tmpl_cont = join('', @templ);  $tmpl_len = length($tmpl_cont);
$forpos = index($tmpl_cont, $token);
$header = substr($tmpl_cont, 0, $forpos);
$footer = substr($tmpl_cont, $forpos+$token_len , $tmpl_len - $forpos -1);

#######################################################################

language();

if ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'} }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}) }

$delimiter = '\|';
@querylist = split(m'&', $buffer);
for $i (@querylist) {
    ($key,$value) = split(/=/, $i);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $value =~ s/\</\&lt\;/gi;
    $value =~ s/\>/\&gt\;/gi;
        $value =~ s/<!--(.|\n)*-->//g;
    $value =~ s/<([^>]|\n)*>//g;
        $value =~ s/\r//g; 
    $value =~ s/$delimiter/I/g;  # changed.  check for problems

    if ($key eq "onderwerp") {$value =~ s/[%=&\"\'\+\*\^\$\(\)\[\]\{\}\|\\\#]/_/eg }
    $in{$key} = $value;
}

print "Content-type: text/html\n\n";

if ($in{'todo'} eq "Preview") { Preview() }
if ($in{'admin'} eq "1") { &Pass }
elsif ($in{'todo'} eq "NieuwOnderwerp") { NieuwOnderwerp() }
elsif ($in{'todo'} eq "PostingPlaatsen") { PostingPlaatsen() }
elsif ($in{'todo'} eq "BekijkOnderwerp") { BekijkOnderwerp() }
elsif ($in{'todo'} eq "Bijdrage") { Bijdrage() }
elsif ($in{'todo'} eq "EditBijdrage") { EditBijdrage() }
elsif ($in{'todo'} eq "EditBijdrageOK") { if ($Password eq $in{'TheWord'}) { &EditBijdrageOK } }
elsif ($in{'todo'} eq "EditBijdrageSave") { EditBijdrageSave() }
elsif ($in{'todo'} eq "DeleteBijdrage") { DeleteBijdrage() }
elsif ($in{'todo'} eq "DeleteBijdrageOK") { if ($Password eq $in{'TheWord'}) { &DeleteBijdrageOK } }
elsif ($in{'todo'} eq "VerwijderDiscussie") { &VerwijderDiscussie}
elsif ($in{'todo'} eq "VerwijderDiscussieOK") { if ($Password eq $in{'TheWord'}) { &VerwijderDiscussieOK } }
else { PrintOnderwerpen() }

############################## HELPER SUBS ############################

sub WrapLongLines
{
  ($input) = @_;

  if ($Wrap)
  {
    my @ber = split(/<br>/, $input);
    my $line;
    my $part;
    my @bericht;
    foreach $line(@ber)
    {
        while (length($line) > $COLS+2)
        {
          $part = substr($line, 0, $COLS+2);
          $part .= '<BR>';
          push(@bericht, $part);
          $line = substr($line, $COLS+2);
        }
        $line .= '<BR>';
        push (@bericht, $line);
    }
    $message = join('', @bericht);
  }
  else
  {
    $message = $input;
  }
 
  return $message;
}

#######################################################################


sub Preview {

        $NumPreviews = 6;
    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=reverse<DBASE>;
    close (DBASE);
                                                         
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
        if (length($ONDERWERP) > 2) {
            if ($telhes{$ONDERWERP}) {    $telhes{$ONDERWERP} += 1 }
            if (!$telhes{$ONDERWERP}) { $telhes{$ONDERWERP} = 1 }
        }
    }

    print <<EOF;
        <table cellspacing=\"$CellSpacing\" cellpadding=\"$CellPadding\">
                <tr>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Thread'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'LastBy'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Messages'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Date'}</td>
        </tr>
EOF
        my $raster = $ThreadPageColorLight;
    foreach $_ (@DBASE)
        {
      ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
      if (length($ONDERWERP) > 2 && !$donehes{$ONDERWERP} && $tel<$NumPreviews)
          {
        $tel++;
        if ($raster eq "$ThreadPageColorLight") { $raster = "$ThreadPageColorDark" }
            else {$raster = "$ThreadPageColorLight";}

          $LinkONDERWERP = $ONDERWERP;
        $LinkONDERWERP =~ s/ /\%20/ig;
            print <<EOF;
          <tr>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=BekijkOnderwerp">
              <font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">$ONDERWERP</a>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;<B>$NAAM</B>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;<B>$telhes{$ONDERWERP}</B>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;$DATUM&nbsp;</td>
          </tr>
EOF
            $donehes{$ONDERWERP} = 1;
          }
    }
    exit;
}


sub VerwijderDiscussie {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'RemoveThread'}: "$in{'onderwerp'}"</H4>
        $MESS{'Password'}:
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Slet" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';">
        <input type="hidden" name="todo" value="VerwijderDiscussieOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        </FORM>
EOF
    PrintStaart();
}

#######################################################################

sub VerwijderDiscussieOK {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
        if ($in{'onderwerp'} eq $ONDERWERP) { }
            else {    print DBASE $_; }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
          <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName\">
      </head></html>
EOF

}
#######################################################################
sub EditBijdrage {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'Password'}</H4>
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Ændre" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';">
        <input type="hidden" name="todo" value="EditBijdrageOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        <input type="hidden" name="datum" value="$in{'datum'}">
                <input type="hidden" name="instance" value="$in{'instance'}">
        </FORM>
EOF
    PrintStaart();
}

#######################################################################

sub EditBijdrageOK {

    PrintKop();

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances;
        my $key;

    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
        if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key})) {
            $BERICHT =~ s/<BR>/\n/gi;

            print <<EOF;

            <FORM METHOD=POST>
            <TABLE  border=0 cellpadding=$CellPadding style="background:$ColorDark">
            <TR><TD colspan=2>
            <input type="text" name="naam" value="$NAAM">
            </TD></TR>
            <TR><TD colspan=2>
            <TEXTAREA NAME="bericht" ROWS="$ROWS" COLS="$COLS" WRAP="$WrapIE">$BERICHT</TEXTAREA>
            <BR>
            &nbsp;<input type="submit" value="$MESS{'SavePage'}">

            <INPUT TYPE="hidden" name="todo" value="EditBijdrageSave">
            <INPUT TYPE="hidden" name="onderwerp" value="$in{'onderwerp'}">
            <INPUT TYPE="hidden" name="datum" value="$in{'datum'}">
                        <INPUT TYPE="hidden" name="instance" value="$in{'instance'}">
            <BR>
            &nbsp;
           
            </TD></TR>
            </TABLE>
            </FORM>
EOF
        }
    }
    PrintStaart();

}

#######################################################################

sub EditBijdrageSave {

    $in{'bericht'} =~ s/\r//gi;
    $in{'bericht'} =~ s/\n/<BR>/gi;

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances;
        my $key;

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
        if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key}))
                {
                  # wrap long lines

                  my $message = WrapLongLines($in{'bericht'});

                  # print to database
          print DBASE "$ONDERWERP|$DATUM|$in{'naam'}|$message\n";
        }
        else {   
            print DBASE $_;
        }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF
}

#######################################################################

sub DeleteBijdrage {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'Remove'}: "$in{'onderwerp'}" af "$in{'naam'}"</H4>
        $MESS{'Password'}:
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Ændre" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';">
        <input type="hidden" name="todo" value="DeleteBijdrageOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        <input type="hidden" name="datum" value="$in{'datum'}">
        <input type="hidden" name="lengte" value="$in{'lengte'}">
                <input type="hidden" name="instance" value="$in{'instance'}">
        </FORM>
EOF
    PrintStaart();
}

#######################################################################

sub DeleteBijdrageOK {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances; # See how sub BekijkOnderwerp works.
        my $key;

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);

                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
       
                if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key})) { }
            else {    print DBASE $_; }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF
}
#######################################################################
sub PrintOnderwerpen {
    PrintKop();

    open (DBASE, "< $ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=reverse<DBASE>;
    close (DBASE);

    print <<EOF;
                <table style=\"background-color: $TableBorder; width: $MessageViewTableWidth\" cellspacing=$CellSpacing cellpadding=$CellPadding>
        <tr bgcolor=$TableHeadColor>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Thread'}</td></b>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'LastBy'}</td></b>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Messages'}</td></b>
                <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">&nbsp;</td></b>
        </tr>
EOF
                                                     
#eerst tellen                                         
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split($delimiter);
        if (length($ONDERWERP) > 2) {
            if ($telhes{$ONDERWERP}) {    $telhes{$ONDERWERP} += 1 }
            if (!$telhes{$ONDERWERP}) { $telhes{$ONDERWERP} = 1 }
        }
    }

#print uniek
        my $raster = $MainPageColorLight;
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split($delimiter);
        if (length($ONDERWERP) > 2 && !$donehes{$ONDERWERP}) {
            if ($raster eq "$MainPageColorLight") { $raster = "$MainPageColorDark" }
            else {$raster = "$MainPageColorLight";}
            $LinkONDERWERP = $ONDERWERP;
            $LinkONDERWERP =~ s/ /\%20/ig;
            print <<EOF;
                <tr>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=BekijkOnderwerp">
                <font face="$MessFont" size="$MessFontsize"><b>$ONDERWERP</b>
                </a>&nbsp;</td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><B>$NAAM</B>&nbsp;</td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><B>$telhes{$ONDERWERP}</B></td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=VerwijderDiscussie" Title="$MESS{'RemoveThread'}"><font size="$MessFontsize"><B>x</B></font></A>&nbsp;</td>
            </tr>
EOF
            $donehes{$ONDERWERP} = 1;
        }
    }

    print <<EOF;
        </td></tr></table>
        <BR>
        <form method="get" action="$ScriptName">
        <input type="hidden" name="todo" value="NieuwOnderwerp">
        <input style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';" type="submit" value="$MESS{'NewThread'}">
        </form>

EOF
    PrintStaart();
}

#######################################################################
sub BekijkOnderwerp {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

    PrintKop();
    $teller = 1;

        my %instances;  # keeps a count of messages with same title and user name (see also sub DeleteBijdrage)
        my $key;        # concat of title and user name, will be the key to the instances hash.

    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
   
        if ($in{'onderwerp'} eq $ONDERWERP) {
           
            $teller += 1;
            $BERICHT =~ s/\&lt\;br\&gt\;/\<BR\>/gi;
            $LinkONDERWERP = $ONDERWERP;
            $LinkONDERWERP =~ s/ /\%20/ig;
            $LinkDATUM = $DATUM;
            $LinkDATUM =~ s/ /\%20/ig;
            if ($teller > 2) { $ONDERWERP = "Re : $ONDERWERP" }

                        $key = $LinkONDERWERP.$NAAM;
                        $instance{$key} += 1;

            $AantalBerichten += 1;
            print <<EOF;
                <table style="background-color: $TableBorder; width: $MessageViewTableWidth" border="0" cellspacing=$CellSpacing cellpadding=$CellPadding>
                    <tr>
                    <td bgcolor=$TableHeadColor><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor"><B>$ONDERWERP - </B>($NAAM)</td>
                    <td bgcolor=$TableHeadColor>
                      <div align="right"><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$DATUM &nbsp;<a href="$ScriptName?onderwerp=$LinkONDERWERP&naam=$NAAM&datum=$LinkDATUM&todo=DeleteBijdrage&instance=$instance{$key}" Title="$MESS{'RemoveMessage'}"><B>x</B></A>
                        &nbsp;<a href="$ScriptName?onderwerp=$LinkONDERWERP&naam=$NAAM&datum=$LinkDATUM&todo=EditBijdrage&instance=$instance{$key}" Title="$MESS{'EditMessage'}"><B>e</B></A>&nbsp;</font></div>
                    </td>
                  </tr>

                  <tr>
                    <td colspan="2" bgcolor="$ThreadPageColorLight"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$BERICHT</td>
                  </tr>
                  <tr>
                    <td colspan="2" align="right" bgcolor="$ThreadPageColorDark">
                      <font face="$BottomFont" size="$BottomFontSize" color="$BottomFontColor">
                        <a href="#reply">$MESS{'Reply'}</a> -
                        <a href="$ScriptName">$MESS{'AllThreads'}</a>
                        </font>
                    </td>
                  </tr>
                </table>
                                <br>
EOF
        }
    }

    print <<EOF;
       
        <a name="reply"></a>
        <font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Reply'}
EOF
   
    if ($AantalBerichten < $MaxMessagesPerThread) {
      print <<EOF;
          <form name="form1" method="post" action="$ScriptName">
            <input type="hidden" name="todo" value="Bijdrage">
          <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
          <TABLE border=0>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Name'}:</TD>
            <TD><input type="text" name="naam" value="" size="$MaxNameChars" maxlength="$MaxNameChars"></TD>
          </TR>
          <TR>
            <td valign="TOP"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Message'}: </TD>
            <TD><textarea name="bericht" cols=$COLS rows=$ROWS wrap=$WrapIE></textarea></TD>
          </TR>
          <TR>
            <TD></TD>
            <TD> <input type="submit" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';" name="Submit" value=" $MESS{'PostMessage'} "></TD>
          </TR>
          </TABLE>
          </form>
EOF
    }
    else { print  $MESS{'NoMore'} }

   
    PrintStaart();
}


#######################################################################
sub Bijdrage {

    if (length($in{'bericht'}) > $MaxLengthMessage) {
        PrintKop();
        print <<EOF;
        $MESS{'MessTooLarge'}<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
        exit;
    }

    $in{'bericht'} =~ s/\r//gi;
    $in{'bericht'} =~ s/\n/<br>/gi;

    MaakDatum();


    if ($in{'onderwerp'} && $in{'naam'} && $in{'bericht'})
        {         
          my $message = WrapLongLines($in{'bericht'});

      open (OUT, ">>$ForumData");
      print OUT ("$in{'onderwerp'}|$Datum|$in{'naam'}|$message|IP $ENV{'REMOTE_ADDR'}\n");
      close OUT;
    }

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF

}
#######################################################################
sub NieuwOnderwerp {
    PrintKop();
    print <<EOF;
        <form method="post" action="$ScriptName">
          <table width="60%" border="0" cellspacing=$CellSpacing cellpadding=$CellPadding>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Name'}:</TD>
            <TD><input type="text" name="naam" value="" size="$MaxNameChars" maxlength="$MaxNameChars"></TD>
          </TR>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Subject'}:</TD>
            <TD><input type="text" name="onderwerp" value="" size="$MaxSubjectChars" maxlength="$MaxSubjectChars"></TD>
          </TR>
          <TR>
            <td valign="TOP"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Message'}:</TD>
            <TD><textarea name="bericht" cols="$COLS" rows="$ROWS" WRAP="$WrapIE"></textarea></TD>
          </TR>
          <TR>
            <TD></TD>
            <TD> <input type="submit" class="mybutton" name="Submit" value=" $MESS{'StartThread'} "></TD>
          </table>
        <input type="hidden" name="todo" value="PostingPlaatsen">
        </form>

EOF
    PrintStaart();
}

#######################################################################
sub PostingPlaatsen {

    # even een string met bestaande onderwerpen maken
        $onderwerpen = $delimiter;
        open (DBASE,$ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
            @DBASE=<DBASE>;
        close (DBASE);
        foreach $_ (@DBASE) {
            ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                        my $temp = $delimiter.$ONDERWERP.$delimiter;
            if ($onderwerpen !~ /$temp/) { $onderwerpen = $onderwerpen.$ONDERWERP.$delimiter }
        }

        my $temp = $delimiter.$in{'onderwerp'}.$delimiter;
    if ($onderwerpen =~ /$temp/) {
        PrintKop();
        print <<EOF;
        $MESS{'Thread'} "$in{'onderwerp'}" $MESS{'alreadyexists'}.<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
    }

    if (length($in{'bericht'}) > $MaxLengthMessage) {
        PrintKop();
        print <<EOF;
        $MESS{'MessTooLarge'}<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
    }
   
    else {
        $in{'bericht'} =~ s/\r//gi;
        $in{'bericht'} =~ s/\n/<br>/gi;

        MaakDatum();

        if ($in{'onderwerp'} && $in{'naam'} && $in{'bericht'})
                {
                  # wrap long lines
                  my $message = WrapLongLines($in{'bericht'});
          # write to database   
                  open (OUT, ">>$ForumData");
              print OUT ("$in{'onderwerp'}|$Datum|$in{'naam'}|$message|IP $ENV{'REMOTE_ADDR'}\n");
          close OUT;
        }

                print <<EOF;
        <html><head>
        <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName\">
        </head></html>
EOF
    }
}

#######################################################################
sub MaakDatum {

    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
    if ($sec < 10)  { $sec = "0$sec";  }
    if ($min < 10)  { $min = "0$min";  }
    if ($hour < 10) { $hour = "0$hour"; }
    if ($mday < 10) { $mday = "0$mday"; }
    $year = $year + 1900;
    $mon = $mon + 1;
    if ($mon < 10)  { $mon = "0$mon";  }
    $Datum = "$mday-$mon-$year $hour\:$min";
}

#######################################################################
sub PrintKop {
    print $header;
}

#######################################################################
sub PrintStaart {
    print $footer;
}

#######################################################################

sub language() {
  if ($language eq 'DA') {
    %MESS = (
        'AllThreads' => 'Alle tråde',
        'alreadyexists' => 'eksisterer allerede',
        'Date' => 'Dato',
        'EditMessage' => 'Ændre besked',
        'GoBack' => 'Gå tilbage',
        'LastBy' => 'Sidste',
        'Message' => 'Besked',
        'Messages' => 'Beskeder',
        'MessTooLarge' => 'Din besked er for lang.<BR>',
        'MIO_ERROR' => 'FEJL - Kunne ikke åbne mappe eller fil',
        'Name' => 'Navn',
        'NewThread' => 'Ny tråd',
        'NoMore' => 'Maksimum antal beskeder nået<BR>',
        'Password' => 'Adgangskode',
        'PostMessage' => 'Send besked',
        'Remove' => 'Fjern',
        'RemoveMessage' => 'Fjern besked',
        'RemoveThread' => 'Fjern tråd',
        'RemoveThread' => 'Fjern tråd',
        'Reply' => 'Besvar',
        'SavePage' => 'Gem side',
        'StartThread' => 'Start tråd',
        'Subject' => 'Overskrift',
        'Thread' => 'Tråd',
    );
  }
  else { # defaults to English
    %MESS = ('MIO_ERROR' => 'ERROR - Can\'t open directory or file',
        'AllThreads' => 'All threads',
        'alreadyexists' => 'already exists',
        'Date' => 'Date',
        'EditMessage' => 'Edit Message',
        'GoBack' => 'Go back',
        'LastBy' => 'Last',
        'Message' => 'Message',
        'Messages' => 'Messages',
        'MessTooLarge' => 'Your posting is too large.<BR>',
        'MIO_ERROR' => 'ERROR - Can\'t open directory or file',
        'Name' => 'Name',
        'NewThread' => 'New Thread',
        'NoMore' => 'Maximum  number of messages reached.<BR>',
        'Password' => 'Password',
        'PostMessage' => 'Post Message',
        'Remove' => 'Remove',
        'RemoveMessage' => 'Remove Message',
        'RemoveThread' => 'Remove Thread',
        'RemoveThread' => 'Remove Thread',
        'Reply' => 'Reply',
        'SavePage' => 'SavePage',
        'StartThread' => 'StartThread',
        'Subject' => 'Subject',
        'Thread' => 'Thread',
    );
  }
}
##################################################################################
# ForumScript.co.uk © 1999 - 2004 Copyright                                      #
# The scripts are available for private and commercial use.                      #
# You can use the scripts in any website you build.                              #
# It is prohibited to sell the scripts in any format to anybody.                #
# The scripts may only be distributed by ForumScript.co.uk                      #
# The redistribution of modified versions of the scripts is prohibited.          #
# ForumScript.co.uk accepts no responsibility or liability                      #
# whatsoever for any damages however caused when using our services or scripts.  #
# By downloading and using this script you agree to the terms and conditions.    #
##################################################################################


T2C
Avatar billede pbj_dk Nybegynder
01. oktober 2007 - 07:49 #1
Tror det du mangler er en CHAPTA funktion i din bruger registrering. Altså en billed password generator: - se den her, den er nem at indføre selv, hvor du nu synes den passer.

http://www.bumblebeeware.com/captcha/

/Peter Brøsted Jensen
Avatar billede nielle Nybegynder
01. oktober 2007 - 08:29 #2
Nogle flere her:

http://search.cpan.org/search?query=CAPTCHA&mode=all

Jeg kan fortælle at en captcha ikke giver en 100 % garanti - det er der desværre intet der gør. Men 99 % af spammen filtreret bort er jo også noget værd :^)

Desuden er det efterhånden ved at være en stakket frist for flere og flere spam-bot'er er begyndt at have tekst-genkendelse indbygget, og de bliver stille og roligt mere og mere avancerede.
Avatar billede pbj_dk Nybegynder
01. oktober 2007 - 08:41 #3
.. sådan er det jo ;-) ... vi er altid et ½-1 skrit bagud, eftersom det er dem der kommer med udspillet først *TUDE* ... men som du nævner, det tager en del stadigvæk og er da værd at lægge ind endnu.
Derfor er CHAPTA blevet mere sufistikeret ( mere sløret ) i "anden generation" - se mere her: http://en.wikipedia.org/wiki/Captcha

Har også læst, at nu skifter flere til "svar på en gåde" i stedet for.
Avatar billede Slettet bruger
01. oktober 2007 - 11:00 #4
Tak for jeres svar. Problemmet er at det er et åbent forum så der er ikke nogen registrering jeg kan lægge det. Jeg havde mere håbet på noget som på gæstebogen på http://www.nordjyllandscan.dk der bliver lavet et nummer man skal skrive.

T2C
Avatar billede pbj_dk Nybegynder
01. oktober 2007 - 12:06 #5
Jamen - var det så ikke oplagt, at skrive til webmasteren der? :-D Normalt er de, pga faglig stolthed, mere end villig til at forklare det - specielt hvis du smøre lidt tykt på i roserne af hans side.
Avatar billede breum Nybegynder
02. oktober 2007 - 00:06 #6
Jeg har lige på mit eget åbne forum lavet en yderst simpel beskyttelse mod spambots, det ser ud til at virke. Det kan ses på www.dansk-rejseledsager.dk som tidligere har været meget plaget af spambots.

Jeg beder på dansk mine brugere om at skrive ordet "MENNESKE" i en textbox på preview-siden. Det kan botsene ikke finde ud af (endnu).
Avatar billede breum Nybegynder
02. oktober 2007 - 00:08 #7
Jeg har følgende kode lige over submitknappen:
print "<input type=\"text\" name=\"spamtest\" maxlength=\"50\"> Skriv ordet <b>MENNESKE</b> i dette felt og klik på 'post' hvis du vil offentliggøre indlægget.\n";
Avatar billede breum Nybegynder
02. oktober 2007 - 00:10 #8
Og i scriptet der modtager input har jeg

if ($input{spamtest} ne "MENNESKE")
{&subrutinederfortællerbrugerenathanharglemtatskrivemenneske;}
Avatar billede breum Nybegynder
02. oktober 2007 - 00:20 #9
selvfølgelig er det bedre med ny text hver gang, men ovenstående virker for mig og tog få minutter.

Hvis du dropper et link til den side, hvor beskyttelsen skal bruges, kan vi andre sikkert fortælle i hvilke afsnit du skal indsætte koden, men mit hollandske er lidt rustent ;-) og jeg kan ikke lige hurtigt se hvad der er preview-siden og hvad der er submit-siden.
Avatar billede Slettet bruger
02. oktober 2007 - 02:39 #10
pbj_dk>>Jamen det er sørme bare mig selv der er webmaster på nordjyllandscan, problemmet er at forumet er i cgi og GBen er i php og så god er jeg ikke til at lægge det sammen.

breum>>Ellers en god løsning du foreslår, det er fint nok med en simpel løsning så længe den virker mod spassere hov spammere :-) . Siden hedder http://www.mcinfo.dk
Avatar billede showsource Seniormester
02. oktober 2007 - 04:39 #11
Du kan bruge sessions, og lave et random navn til et hiddenfelt. + lidt javascript
( php )

<?php
session_start();

$_SESSION["hidden_name"] = "t2c_". rand(); // ikke et tal som første tegn!!!

?><hml>................

<form>
<input type="hidden" name="<?php echo $_SESSION["hidden_name"]; ?>" value="<?php echo md5(time()); ?>">


Og på din submit bruge onclick og onkeydown
<input type="submit" value="Post" onclick="this.form.<?php echo $_SESSION["hidden_name"]; ?>.value='';" onkeydown="this.form.<?php echo $_SESSION["hidden_name"]; ?>.value='';">

Ved post tjekker du at
1. $_SESSION["hidden_name"] er sat
2. $_POST[$_SESSION["hidden_name"]] er sat, og er tom

hvis de to ting er opfyldt, gem post
Avatar billede pbj_dk Nybegynder
02. oktober 2007 - 07:03 #12
-> t2c: "Jamen det er sørme bare mig selv der er webmaster på nordjylland".:-D Ha,ha - snydt der! Jeg holder op med at blande mig, eftersom breum og showsource ser ud til at have fat i noget brugbart.
Avatar billede breum Nybegynder
02. oktober 2007 - 11:20 #13
I stedet for linjen:
<TD> <input type="submit" class="mybutton" name="Submit" value=" $MESS{'StartThread'} "></TD>
Skal du skrive:
<TD> <input type="text" name="spamtest" maxlength="50"> Skriv ordet <b>MC</b> i dette felt og klik på 'post' hvis du vil offentliggøre indlægget.<input type="submit" class="mybutton" name="Submit" value=" $MESS{'StartThread'} "></TD>

OG

I stedet for linjen:
            <TD> <input type="submit" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';" name="Submit" value=" $MESS{'PostMessage'} "></TD>
skal du skrive:
            <TD>  <input type="text" name="spamtest" maxlength="50"> Skriv ordet <b>MC</b> i dette felt og klik på 'post' hvis du vil offentliggøre indlægget.<input type="submit" style="margin-top: 10px;color: #52526B; font-family: Verdana; font-size: 10px; font-weight: bold; background: '35FC03';" name="Submit" value=" $MESS{'PostMessage'} "></TD>

Ovenstående sætter en ekstra textbox på hver af de typer sider man kan submitte fra.

Denne linie:
elsif ($in{'todo'} eq "Bijdrage") { Bijdrage() }
Skal rettes til:
elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} eq "MC" ) { Bijdrage() }

Denne linie:
elsif ($in{'todo'} eq "PostingPlaatsen") { PostingPlaatsen() }
skal rettes til:
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} eq "MC" ) { PostingPlaatsen() }

De sidste 2 rettelser sørger for at der bliver kontrolleret at textboksen er udfyldt korrekt.

Husk at tage backup, for jeg kan sagtens have lavet fejl.
Avatar billede breum Nybegynder
02. oktober 2007 - 11:46 #14
Jeg kan se du har implementeret min kode nu - det ser ud til at virke.

Du bør nok lave en fejlmeddelelse til dem der skriver forkert eller glemmer at udfylde boksen.

F.eks :"Du skal skrive "MC" med store bogstaver ellers kan dit indlæg ikke offentliggøres. Klik på "tilbagenkappen" for at fortsætte.
Avatar billede breum Nybegynder
02. oktober 2007 - 11:48 #15
Det bliver så:
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse; }

elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse;}
Avatar billede breum Nybegynder
02. oktober 2007 - 11:48 #16
ovenstående 2 linier skal blot indsættes sammen med de linier der ligner - ikke istedet for.
Avatar billede Slettet bruger
02. oktober 2007 - 11:50 #17
Ja jeg er ved at tilpasse det lige nu. 2 sec eller lidt mere :-) og jeg vender tilbage.

T2C
Avatar billede breum Nybegynder
02. oktober 2007 - 11:51 #18
her er subrutinen til fejlmeddelelse:
sub rutinemedfejlmeddelelse {
PrintKop();
print <<EOF;
Du skal skrive "MC" med store bogstaver ellers kan dit indlæg ikke offentliggøres. Klik på "tilbagenkappen" for at fortsætte.


EOF
PrintStaart();
}
Avatar billede Slettet bruger
02. oktober 2007 - 12:10 #19
Hmm nu er der sniget sig en fejl ind i det....
Det kom efter fejlmeldelsen.
Først ville den ikke poste så lavede jeg linjen om til

elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse; } { PostingPlaatsen() }

og

elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse;}{ Bijdrage() }

Nu virker det ikke.

T2C
Avatar billede Slettet bruger
02. oktober 2007 - 12:13 #20
Shit nu gik det ellers lige så godt.
Det er jo en fantastisk hjælp det her. :-)

Jeg kan sku ikke se fejlen nu.

T2C
Avatar billede breum Nybegynder
02. oktober 2007 - 12:24 #21
{ PostingPlaatsen() } skal væk
{ Bijdrage() } skal væk
Avatar billede breum Nybegynder
02. oktober 2007 - 12:24 #22
prøv lige at poste scriptet som det er nu
Avatar billede Slettet bruger
02. oktober 2007 - 12:26 #23
Er lavet om igen. Men så vil den ikke poste længre.

T2C
Avatar billede Slettet bruger
02. oktober 2007 - 12:30 #24
Her er det som det ser ud nu:


#!/usr/bin/perl
##########################################################
# ForumScript.co.uk 04/12/2004
# © 1999-2004 ForumScript.co.uk
# Script Updated for ForumScript.co.uk by Babelnotes.be
##########################################################
# Instructions: http://www.ForumScript.co.uk/instructions/
# FAQ:          http://www.ForumScript.co.uk/faq/
##########################################################
my $ScriptName          = "forum.pl";
my $Password            = "fjernet";
my $ForumData          = 'forum.txt';
my $template            = 'template.htm';
my $token              = '@#@#@';
##########################################################
# Table Settings
my $TableBorder          = '';
my $TableHeadColor        = 'FB9703';
my $MessageViewTableWidth = '100%';
my $CellSpacing          = '1';
my $CellPadding          = '2';
my $MessTitleFont        = "";
my $MessTitleFontsize    = 1;
my $MessTitleFontcolor    = "ffffff";
##########################################################
# Font Settings
my $MessFont              = "";
my $MessFontsize          = 1;
my $MessThreadFontSize    = 1;
my $MessFontcolor        = "ffffff";
##########################################################
# Cell Colours
my $MainPageColorDark    = '';
my $MainPageColorLight    = '';
my $ThreadPageColorDark  = '';
my $ThreadPageColorLight  = '';
##########################################################
# Reply and Thread link Format
my $BottomFont            = "";
my $BottomFontSize        = "1";
my $BottomFontColor      = "ffffff";
##########################################################
# Message Form Settings
my $MaxLengthMessage      = 3000;
my $ROWS                  = 10;
my $COLS                  = 40;
my $MaxNameChars          = 10;
my $MaxSubjectChars      = 58;
##########################################################
# Miscellaneous Settings
my $language              = "DA";
my $MaxMessagesPerThread  = 100;
my $WrapIE                ='SOFT';
my $Wrap                  = 0;
##################################################################################
# ForumScript.co.uk © 1999 - 2004 Copyright                                      #
# The scripts are available for private and commercial use.                      #
# You can use the scripts in any website you build.                              #
# It is prohibited to sell the scripts in any format to anybody.                #
# The scripts may only be distributed by ForumScript.co.uk                      #
# The redistribution of modified versions of the scripts is prohibited.          #
# ForumScript.co.uk accepts no responsibility or liability                      #
# whatsoever for any damages however caused when using our services or scripts.  #
# By downloading and using this script you agree to the terms and conditions.    #
##################################################################################

$DefaulPassword="";
open (TEMPLATE, "< $template") or die print "$MESS{'IO_ERROR'} ($template)";
@templ = <TEMPLATE>;
close (TEMPLATE);
$token_len = length($token);
$tmpl_cont = join('', @templ);  $tmpl_len = length($tmpl_cont);
$forpos = index($tmpl_cont, $token);
$header = substr($tmpl_cont, 0, $forpos);
$footer = substr($tmpl_cont, $forpos+$token_len , $tmpl_len - $forpos -1);

#######################################################################

language();

if ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'} }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}) }

$delimiter = '\|';
@querylist = split(m'&', $buffer);
for $i (@querylist) {
    ($key,$value) = split(/=/, $i);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $value =~ s/\</\&lt\;/gi;
    $value =~ s/\>/\&gt\;/gi;
        $value =~ s/<!--(.|\n)*-->//g;
    $value =~ s/<([^>]|\n)*>//g;
        $value =~ s/\r//g; 
    $value =~ s/$delimiter/I/g;  # changed.  check for problems

    if ($key eq "onderwerp") {$value =~ s/[%=&\"\'\+\*\^\$\(\)\[\]\{\}\|\\\#]/_/eg }
    $in{$key} = $value;
}

print "Content-type: text/html\n\n";

if ($in{'todo'} eq "Preview") { Preview() }
if ($in{'admin'} eq "1") { &Pass }
elsif ($in{'todo'} eq "NieuwOnderwerp") { NieuwOnderwerp() }
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse; }
elsif ($in{'todo'} eq "BekijkOnderwerp") { BekijkOnderwerp() }
elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse;}
elsif ($in{'todo'} eq "EditBijdrage") { EditBijdrage() }
elsif ($in{'todo'} eq "EditBijdrageOK") { if ($Password eq $in{'TheWord'}) { &EditBijdrageOK } }
elsif ($in{'todo'} eq "EditBijdrageSave") { EditBijdrageSave() }
elsif ($in{'todo'} eq "DeleteBijdrage") { DeleteBijdrage() }
elsif ($in{'todo'} eq "DeleteBijdrageOK") { if ($Password eq $in{'TheWord'}) { &DeleteBijdrageOK } }
elsif ($in{'todo'} eq "VerwijderDiscussie") { &VerwijderDiscussie}
elsif ($in{'todo'} eq "VerwijderDiscussieOK") { if ($Password eq $in{'TheWord'}) { &VerwijderDiscussieOK } }
else { PrintOnderwerpen() }

############################## HELPER SUBS ############################

sub WrapLongLines
{
  ($input) = @_;

  if ($Wrap)
  {
    my @ber = split(/<br>/, $input);
    my $line;
    my $part;
    my @bericht;
    foreach $line(@ber)
    {
        while (length($line) > $COLS+2)
        {
          $part = substr($line, 0, $COLS+2);
          $part .= '<BR>';
          push(@bericht, $part);
          $line = substr($line, $COLS+2);
        }
        $line .= '<BR>';
        push (@bericht, $line);
    }
    $message = join('', @bericht);
  }
  else
  {
    $message = $input;
  }
 
  return $message;
}

#######################################################################

sub rutinemedfejlmeddelelse {
PrintKop();
print <<EOF;
Du skal skrive "MC" med store bogstaver i SPAMtesten ellers kan dit indlæg ikke offentliggøres. Klik på "Tilbage" i din browser for at fortsætte.


EOF
PrintStaart();
}

#######################################################################


sub Preview {

        $NumPreviews = 6;
    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=reverse<DBASE>;
    close (DBASE);
                                                         
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
        if (length($ONDERWERP) > 2) {
            if ($telhes{$ONDERWERP}) {    $telhes{$ONDERWERP} += 1 }
            if (!$telhes{$ONDERWERP}) { $telhes{$ONDERWERP} = 1 }
        }
    }

    print <<EOF;
        <table cellspacing=\"$CellSpacing\" cellpadding=\"$CellPadding\">
                <tr>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Thread'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'LastBy'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Messages'}</td>
        <td><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Date'}</td>
        </tr>
EOF
        my $raster = $ThreadPageColorLight;
    foreach $_ (@DBASE)
        {
      ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
      if (length($ONDERWERP) > 2 && !$donehes{$ONDERWERP} && $tel<$NumPreviews)
          {
        $tel++;
        if ($raster eq "$ThreadPageColorLight") { $raster = "$ThreadPageColorDark" }
            else {$raster = "$ThreadPageColorLight";}

          $LinkONDERWERP = $ONDERWERP;
        $LinkONDERWERP =~ s/ /\%20/ig;
            print <<EOF;
          <tr>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=BekijkOnderwerp">
              <font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">$ONDERWERP</a>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;<B>$NAAM</B>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;<B>$telhes{$ONDERWERP}</B>&nbsp;</td>
          <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor">&nbsp;$DATUM&nbsp;</td>
          </tr>
EOF
            $donehes{$ONDERWERP} = 1;
          }
    }
    exit;
}


sub VerwijderDiscussie {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'RemoveThread'}: "$in{'onderwerp'}"</H4>
        $MESS{'Password'}:
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Slet" class="knap">
        <input type="hidden" name="todo" value="VerwijderDiscussieOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        </FORM>
EOF
    PrintStaart();
}

#######################################################################

sub VerwijderDiscussieOK {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
        if ($in{'onderwerp'} eq $ONDERWERP) { }
            else {    print DBASE $_; }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
          <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName\">
      </head></html>
EOF

}
#######################################################################
sub EditBijdrage {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'Password'}</H4>
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Ændre" class="knap">
        <input type="hidden" name="todo" value="EditBijdrageOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        <input type="hidden" name="datum" value="$in{'datum'}">
                <input type="hidden" name="instance" value="$in{'instance'}">
        </FORM>
        <p align="center"><font size="2"><a href="java script:history.go(-1);">Tilbage</a></font></p>
EOF
    PrintStaart();
}

#######################################################################

sub EditBijdrageOK {

    PrintKop();

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances;
        my $key;

    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
        if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key})) {
            $BERICHT =~ s/<BR>/\n/gi;

            print <<EOF;

            <FORM METHOD=POST>
            <TABLE  border=0 cellpadding=$CellPadding style="background:$ColorDark">
            <TR><TD colspan=2>
            <input type="text" name="naam" value="$NAAM">
            </TD></TR>
            <TR><TD colspan=2>
            <TEXTAREA NAME="bericht" ROWS="$ROWS" COLS="$COLS" WRAP="$WrapIE">$BERICHT</TEXTAREA>
            <BR>
            &nbsp;<input type="submit" class="knap" value="$MESS{'SavePage'}">

            <INPUT TYPE="hidden" name="todo" value="EditBijdrageSave">
            <INPUT TYPE="hidden" name="onderwerp" value="$in{'onderwerp'}">
            <INPUT TYPE="hidden" name="datum" value="$in{'datum'}">
                        <INPUT TYPE="hidden" name="instance" value="$in{'instance'}">
            <BR>
            &nbsp;
           
            </TD></TR>
            </TABLE>
            </FORM>
            <p align="center"><font size="2"><a href="java script:history.go(-1);">Tilbage</a></font></p>
EOF
        }
    }
    PrintStaart();

}

#######################################################################

sub EditBijdrageSave {

    $in{'bericht'} =~ s/\r//gi;
    $in{'bericht'} =~ s/\n/<BR>/gi;

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances;
        my $key;

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
        if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key}))
                {
                  # wrap long lines

                  my $message = WrapLongLines($in{'bericht'});

                  # print to database
          print DBASE "$ONDERWERP|$DATUM|$in{'naam'}|$message\n";
        }
        else {   
            print DBASE $_;
        }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF
}

#######################################################################

sub DeleteBijdrage {

    PrintKop();
    print <<EOF;
        <H4>$MESS{'Remove'}: "$in{'onderwerp'}" af "$in{'naam'}"</H4>
        $MESS{'Password'}:
        <FORM METHOD=POST ACTION="$ScriptName">
        <INPUT TYPE="password" NAME="TheWord" value="$DefaulPassword" style="margin\: 0px">
        <input type="submit" value="Ændre" class="knap">
        <input type="hidden" name="todo" value="DeleteBijdrageOK">
        <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
        <input type="hidden" name="datum" value="$in{'datum'}">
        <input type="hidden" name="lengte" value="$in{'lengte'}">
                <input type="hidden" name="instance" value="$in{'instance'}">
        </FORM>
        <p align="center"><font size="2"><a href="java script:history.go(-1);">Tilbage</a></font></p>
EOF
    PrintStaart();
}

#######################################################################

sub DeleteBijdrageOK {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

        my %instances; # See how sub BekijkOnderwerp works.
        my $key;

    open (DBASE, ">$ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);

                $key = $ONDERWERP.$NAAM;
                $instances{$key} += 1;
       
                if (($in{'onderwerp'} eq $ONDERWERP) && ($in{'datum'} eq $DATUM) && ($in{'instance'} == $instances{$key})) { }
            else {    print DBASE $_; }
    }
    close (DBASE);

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF
}
#######################################################################
sub PrintOnderwerpen {
    PrintKop();

    open (DBASE, "< $ForumData") || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=reverse<DBASE>;
    close (DBASE);

    print <<EOF;
                <table style=\"background-color: $TableBorder; width: $MessageViewTableWidth\" cellspacing=$CellSpacing cellpadding=$CellPadding>
        <tr bgcolor=$TableHeadColor>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Thread'}</td></b>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'LastBy'}</td></b>
        <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$MESS{'Messages'}</td></b>
                <td><b><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">&nbsp;</td></b>
        </tr>
EOF
                                                     
#eerst tellen                                         
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split($delimiter);
        if (length($ONDERWERP) > 2) {
            if ($telhes{$ONDERWERP}) {    $telhes{$ONDERWERP} += 1 }
            if (!$telhes{$ONDERWERP}) { $telhes{$ONDERWERP} = 1 }
        }
    }

#print uniek
        my $raster = $MainPageColorLight;
    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split($delimiter);
        if (length($ONDERWERP) > 2 && !$donehes{$ONDERWERP}) {
            if ($raster eq "$MainPageColorLight") { $raster = "$MainPageColorDark" }
            else {$raster = "$MainPageColorLight";}
            $LinkONDERWERP = $ONDERWERP;
            $LinkONDERWERP =~ s/ /\%20/ig;
            print <<EOF;
                <tr>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=BekijkOnderwerp">
                <font face="$MessFont" size="$MessFontsize"><b>$ONDERWERP</b>
                </a>&nbsp;</td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><B>$NAAM</B>&nbsp;</td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><B>$telhes{$ONDERWERP}</B></td>
                <td valign="TOP" bgcolor="$raster"><font face="$MessFont" size="$MessFontsize" color="$MessFontcolor"><a href="$ScriptName?onderwerp=$LinkONDERWERP&todo=VerwijderDiscussie" Title="$MESS{'RemoveThread'}"><font size="$MessFontsize"><B>x</B></font></A>&nbsp;</td>
            </tr>
EOF
            $donehes{$ONDERWERP} = 1;
        }
    }

    print <<EOF;
        </td></tr></table>
        <BR>
        <form method="get" action="$ScriptName">
        <input type="hidden" name="todo" value="NieuwOnderwerp">
        <input class="knap" type="submit" value="$MESS{'NewThread'}">
        </form>

EOF
    PrintStaart();
}

#######################################################################
sub BekijkOnderwerp {

    open (DBASE, $ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
        @DBASE=<DBASE>;
    close (DBASE);

    PrintKop();
    $teller = 1;

        my %instances;  # keeps a count of messages with same title and user name (see also sub DeleteBijdrage)
        my $key;        # concat of title and user name, will be the key to the instances hash.

    foreach $_ (@DBASE) {
        ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
   
        if ($in{'onderwerp'} eq $ONDERWERP) {
           
            $teller += 1;
            $BERICHT =~ s/\&lt\;br\&gt\;/\<BR\>/gi;
            $LinkONDERWERP = $ONDERWERP;
            $LinkONDERWERP =~ s/ /\%20/ig;
            $LinkDATUM = $DATUM;
            $LinkDATUM =~ s/ /\%20/ig;
            if ($teller > 2) { $ONDERWERP = "Re : $ONDERWERP" }

                        $key = $LinkONDERWERP.$NAAM;
                        $instance{$key} += 1;

            $AantalBerichten += 1;
            print <<EOF;
                <table style="background-color: $TableBorder; width: $MessageViewTableWidth" border="0" cellspacing=$CellSpacing cellpadding=$CellPadding>
                    <tr>
                    <td bgcolor=$TableHeadColor><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor"><B>$ONDERWERP - </B>($NAAM)</td>
                    <td bgcolor=$TableHeadColor>
                      <div align="right"><font face="$MessTitleFont" size="$MessTitleFontsize" color="$MessTitleFontcolor">$DATUM &nbsp;<a href="$ScriptName?onderwerp=$LinkONDERWERP&naam=$NAAM&datum=$LinkDATUM&todo=DeleteBijdrage&instance=$instance{$key}" Title="$MESS{'RemoveMessage'}"><B>x</B></A>
                        &nbsp;<a href="$ScriptName?onderwerp=$LinkONDERWERP&naam=$NAAM&datum=$LinkDATUM&todo=EditBijdrage&instance=$instance{$key}" Title="$MESS{'EditMessage'}"><B>e</B></A>&nbsp;</font></div>
                    </td>
                  </tr>

                  <tr>
                    <td colspan="2" bgcolor="$ThreadPageColorLight"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$BERICHT</td>
                  </tr>
                  <tr>
                    <td colspan="2" align="right" bgcolor="$ThreadPageColorDark">
                      <font face="$BottomFont" size="$BottomFontSize" color="$BottomFontColor">
                        <a href="#reply">$MESS{'Reply'}</a> -
                        <a href="$ScriptName">$MESS{'AllThreads'}</a>
                        </font>
                    </td>
                  </tr>
                </table>
                                <br>
EOF
        }
    }

    print <<EOF;
       
        <a name="reply"></a>
        <font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Reply'}
EOF
   
    if ($AantalBerichten < $MaxMessagesPerThread) {
      print <<EOF;
          <form name="form1" method="post" action="$ScriptName">
            <input type="hidden" name="todo" value="Bijdrage">
          <input type="hidden" name="onderwerp" value="$in{'onderwerp'}">
          <TABLE border=0>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Name'}:</TD>
            <TD><input type="text" name="naam" value="" size="$MaxNameChars" maxlength="$MaxNameChars"></TD>
          </TR>
          <TR>
            <td valign="TOP"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Message'}: </TD>
            <TD><textarea name="bericht" cols=$COLS rows=$ROWS wrap=$WrapIE></textarea></TD>
          </TR>
          <TR>
            <TD></TD>
            <TD>  <font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">SPAMtest: Skriv ordet <b>MC</b> i dette felt og klik på "Send besked".<br><input type="text" name="spamtest" size="2" maxlength="2"><br><br><input type="submit" class="knap" name="Submit" value=" $MESS{'PostMessage'} "></TD>
          </TR>
          </TABLE>
          </form>
          <p align="center"><font size="2"><a href="java script:history.go(-1);">Tilbage</a></font></p>
EOF
    }
    else { print  $MESS{'NoMore'} }

   
    PrintStaart();
}


#######################################################################
sub Bijdrage {

    if (length($in{'bericht'}) > $MaxLengthMessage) {
        PrintKop();
        print <<EOF;
        $MESS{'MessTooLarge'}<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
        exit;
    }

    $in{'bericht'} =~ s/\r//gi;
    $in{'bericht'} =~ s/\n/<br>/gi;

    MaakDatum();


    if ($in{'onderwerp'} && $in{'naam'} && $in{'bericht'})
        {         
          my $message = WrapLongLines($in{'bericht'});

      open (OUT, ">>$ForumData");
      print OUT ("$in{'onderwerp'}|$Datum|$in{'naam'}|$message|IP $ENV{'REMOTE_ADDR'}\n");
      close OUT;
    }

        print <<EOF;
      <html><head>
      <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName?onderwerp=$in{'onderwerp'}&todo=BekijkOnderwerp\">
      </head></html>
EOF

}
#######################################################################
sub NieuwOnderwerp {
    PrintKop();
    print <<EOF;
        <form method="post" action="$ScriptName">
          <table width="60%" border="0" cellspacing=$CellSpacing cellpadding=$CellPadding>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Name'}:</TD>
            <TD><input type="text" name="naam" value="" size="$MaxNameChars" maxlength="$MaxNameChars"></TD>
          </TR>
          <TR>
            <TD><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Subject'}:</TD>
            <TD><input type="text" name="onderwerp" value="" size="$MaxSubjectChars" maxlength="$MaxSubjectChars"></TD>
          </TR>
          <TR>
            <td valign="TOP"><font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">$MESS{'Message'}:</TD>
            <TD><textarea name="bericht" cols="$COLS" rows="$ROWS" WRAP="$WrapIE"></textarea></TD>
          </TR>
          <TR>
            <TD></TD>
            <TD> <font face="$MessFont" size="$MessThreadFontSize" color="$MessFontcolor">SPAMtest: Skriv ordet <b>MC</b> i dette felt og klik på "Start Tråd".<br><input type="text" name="spamtest" size="2" maxlength="2"><br><br><input type="submit" class="knap" name="Submit" value=" $MESS{'StartThread'} "></TD>
          </table>
        <input type="hidden" name="todo" value="PostingPlaatsen">
        </form>
<p align="center"><font size="2"><a href="java script:history.go(-1);">Tilbage</a></font></p>
EOF
    PrintStaart();
}

#######################################################################
sub PostingPlaatsen {

    # even een string met bestaande onderwerpen maken
        $onderwerpen = $delimiter;
        open (DBASE,$ForumData) || die print "$MESS{'IO_ERROR'} (error 1)"; 
            @DBASE=<DBASE>;
        close (DBASE);
        foreach $_ (@DBASE) {
            ($ONDERWERP,$DATUM,$NAAM,$BERICHT)=split(/$delimiter/);
                        my $temp = $delimiter.$ONDERWERP.$delimiter;
            if ($onderwerpen !~ /$temp/) { $onderwerpen = $onderwerpen.$ONDERWERP.$delimiter }
        }

        my $temp = $delimiter.$in{'onderwerp'}.$delimiter;
    if ($onderwerpen =~ /$temp/) {
        PrintKop();
        print <<EOF;
        $MESS{'Thread'} "$in{'onderwerp'}" $MESS{'alreadyexists'}.<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
    }

    if (length($in{'bericht'}) > $MaxLengthMessage) {
        PrintKop();
        print <<EOF;
        $MESS{'MessTooLarge'}<BR>
        <FORM>
            <INPUT TYPE="Button" VALUE="$MESS{'GoBack'}" Onclick="java script:history.go(-1)">
        </FORM>
EOF
        PrintStaart();
    }
   
    else {
        $in{'bericht'} =~ s/\r//gi;
        $in{'bericht'} =~ s/\n/<br>/gi;

        MaakDatum();

        if ($in{'onderwerp'} && $in{'naam'} && $in{'bericht'})
                {
                  # wrap long lines
                  my $message = WrapLongLines($in{'bericht'});
          # write to database   
                  open (OUT, ">>$ForumData");
              print OUT ("$in{'onderwerp'}|$Datum|$in{'naam'}|$message|IP $ENV{'REMOTE_ADDR'}\n");
          close OUT;
        }

                print <<EOF;
        <html><head>
        <meta http-equiv=\"refresh\" content=\"0; url=$ScriptName\">
        </head></html>
EOF
    }
}

#######################################################################
sub MaakDatum {

    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
    if ($sec < 10)  { $sec = "0$sec";  }
    if ($min < 10)  { $min = "0$min";  }
    if ($hour < 10) { $hour = "0$hour"; }
    if ($mday < 10) { $mday = "0$mday"; }
    $year = $year + 1900;
    $mon = $mon + 1;
    if ($mon < 10)  { $mon = "0$mon";  }
    $Datum = "$mday-$mon-$year $hour\:$min";
}

#######################################################################
sub PrintKop {
    print $header;
}

#######################################################################
sub PrintStaart {
    print $footer;
}

#######################################################################

sub language() {
  if ($language eq 'DA') {
    %MESS = (
        'AllThreads' => 'Alle tråde',
        'alreadyexists' => 'eksisterer allerede',
        'Date' => 'Dato',
        'EditMessage' => 'Ændre besked',
        'GoBack' => 'Gå tilbage',
        'LastBy' => 'Sidste',
        'Message' => 'Besked',
        'Messages' => 'Beskeder',
        'MessTooLarge' => 'Din besked er for lang.<BR>',
        'MIO_ERROR' => 'FEJL - Kunne ikke åbne mappe eller fil',
        'Name' => 'Navn',
        'NewThread' => 'Ny tråd',
        'NoMore' => 'Maksimum antal beskeder nået<BR>',
        'Password' => 'Adgangskode',
        'PostMessage' => 'Send besked',
        'Remove' => 'Fjern',
        'RemoveMessage' => 'Fjern besked',
        'RemoveThread' => 'Fjern tråd',
        'RemoveThread' => 'Fjern tråd',
        'Reply' => 'Besvar',
        'SavePage' => 'Gem side',
        'StartThread' => 'Start tråd',
        'Subject' => 'Overskrift',
        'Thread' => 'Tråd',
    );
  }
  else { # defaults to English
    %MESS = ('MIO_ERROR' => 'ERROR - Can\'t open directory or file',
        'AllThreads' => 'All threads',
        'alreadyexists' => 'already exists',
        'Date' => 'Date',
        'EditMessage' => 'Edit Message',
        'GoBack' => 'Go back',
        'LastBy' => 'Last',
        'Message' => 'Message',
        'Messages' => 'Messages',
        'MessTooLarge' => 'Your posting is too large.<BR>',
        'MIO_ERROR' => 'ERROR - Can\'t open directory or file',
        'Name' => 'Name',
        'NewThread' => 'New Thread',
        'NoMore' => 'Maximum  number of messages reached.<BR>',
        'Password' => 'Password',
        'PostMessage' => 'Post Message',
        'Remove' => 'Remove',
        'RemoveMessage' => 'Remove Message',
        'RemoveThread' => 'Remove Thread',
        'RemoveThread' => 'Remove Thread',
        'Reply' => 'Reply',
        'SavePage' => 'SavePage',
        'StartThread' => 'StartThread',
        'Subject' => 'Subject',
        'Thread' => 'Thread',
    );
  }
}
##################################################################################
# ForumScript.co.uk © 1999 - 2004 Copyright                                      #
# The scripts are available for private and commercial use.                      #
# You can use the scripts in any website you build.                              #
# It is prohibited to sell the scripts in any format to anybody.                #
# The scripts may only be distributed by ForumScript.co.uk                      #
# The redistribution of modified versions of the scripts is prohibited.          #
# ForumScript.co.uk accepts no responsibility or liability                      #
# whatsoever for any damages however caused when using our services or scripts.  #
# By downloading and using this script you agree to the terms and conditions.    #
##################################################################################


Password er redigeret ellers er det som det er nu.

T2C
Avatar billede breum Nybegynder
02. oktober 2007 - 12:35 #25
Der mangler 2 linier


elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} eq "MC" ) { Bijdrage() }
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} eq "MC" ) { PostingPlaatsen() }
Avatar billede breum Nybegynder
02. oktober 2007 - 12:40 #26
alle 4 linjer skal med:
elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} eq "MC" ) { Bijdrage() }
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} eq "MC" ) { PostingPlaatsen() }
elsif ($in{'todo'} eq "PostingPlaatsen" && $in{'spamtest'} ne "MC" ) {&rutinemedfejlmeddelelse; }
elsif ($in{'todo'} eq "Bijdrage" && $in{'spamtest'} ne "MC" ) { &rutinemedfejlmeddelelse;}
Avatar billede Slettet bruger
02. oktober 2007 - 12:41 #27
Du er jo god.
Det var bare mig der havde misforstået noget så. Det ser ud til at virke. Og nu er det jo nemt at lave "ordet" om hvis det er SPAMboter der gætter det evt. til en sætning eller gåde.
Jeg siger TUSEN tak for hjælpen.

T2C
Avatar billede breum Nybegynder
02. oktober 2007 - 12:41 #28
som jeg skrev: "ovenstående 2 linier skal blot indsættes sammen med de linier der ligner - ikke istedet for." ;-)
Avatar billede Slettet bruger
02. oktober 2007 - 12:43 #29
Ja men det første man bliver blind på er....



blindtarmen, der er man født blind :-)

T2C
Avatar billede breum Nybegynder
02. oktober 2007 - 12:44 #30
Det var så lidt ;-)
Avatar billede breum Nybegynder
02. oktober 2007 - 12:45 #31
måske bør man rette
Skriv ordet MC i dette felt og klik på "Send besked".
til
Skriv ordet MC i nedenstående felt og klik på "Send besked".
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester