D:\WEBSITES\testbed\zipped\yabb252_09_15\cgi-bin\yabb2\Admin\AntispamQuestions.pl D:\WEBSITES\testbed\cgi-bin\yabb252\Admin\AntispamQuestions.pl
############################################################################### ###############################################################################
# AntispamQuestions.pl                                                        # # AntispamQuestions.pl                                                        #
############################################################################### ###############################################################################
# YaBB: Yet another Bulletin Board                                            # # YaBB: Yet another Bulletin Board                                            #
# Open-Source Community Software for Webmasters                               # # Open-Source Community Software for Webmasters                               #
# Version:        YaBB 2.5.2                                                  # # Version:        YaBB 2.5.2                                                  #
# Packaged:       September 30, 2012                                          # # Packaged:       September 30, 2012                                          #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     #
# Software by:  The YaBB Development Team                                     # # Software by:  The YaBB Development Team                                     #
#               with assistance from the YaBB community.                      # #               with assistance from the YaBB community.                      #
############################################################################### ###############################################################################
   
$antispamquestionsplver = 'YaBB 2.5.2 $Revision: 1.0 $'; $antispamquestionsplver = 'YaBB 2.5.2 $Revision: 1.1 $';
if ($action eq 'detailedversion') { return 1; } if ($action eq 'detailedversion') { return 1; }
   
sub SpamQuestions { sub SpamQuestions {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   if ($en_spam_questions)   { $chk_spam_question = qq~ checked="checked"~; }    if ($en_spam_questions)   { $chk_spam_question = qq~ checked="checked"~; }
   if ($spam_questions_case) { $chk_spam_question_case = qq~ checked="checked"~; }    if ($spam_questions_case) { $chk_spam_question_case = qq~ checked="checked"~; }
   
   fopen(SPAMQUESTIONS, "<$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, "<$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   @spam_questions = <SPAMQUESTIONS>;    @spam_questions = <SPAMQUESTIONS>;
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   $total_questions = @spam_questions || 0;    $total_questions = @spam_questions || 0;
   
   if ($total_questions) {    if ($total_questions) {
       $header_row = qq~ colspan="4"~;        $header_row = qq~ colspan="4"~;
       $show_questions = qq~        $show_questions = qq~
<tr class="catbg" style="font-weight: bold; font-size: 11px;"> <tr class="catbg" style="font-weight: bold; font-size: 11px;">
   <td style="width: 43%;">$spam_question_txt{'question'}</td>    <td style="width: 43%;">$spam_question_txt{'question'}</td>
   <td style="width: 43%;">$spam_question_txt{'answer'}</td>    <td style="width: 43%;">$spam_question_txt{'answer'}</td>
   <td style="width: 7%;">$spam_question_txt{'edit'}</td>    <td style="width: 7%;">$spam_question_txt{'edit'}</td>
   <td style="width: 7%;">$spam_question_txt{'delete'}</td>    <td style="width: 7%;">$spam_question_txt{'delete'}</td>
</tr>~; </tr>~;
   
       foreach my $question (sort { $a <=> $b } @spam_questions) {        foreach my $question (sort { $a <=> $b } @spam_questions) {
           chomp $question;            chomp $question;
           ($spam_question_id, $spam_question, $spam_answer) = split(/\|/, $question);            ($spam_question_id, $spam_question, $spam_answer) = split(/\|/, $question);
            $show_questions .= qq~             $show_questions .= qq~
<tr class="windowbg2"> <tr class="windowbg2">
   <td>$spam_question</td>    <td>$spam_question</td>
   <td>$spam_answer</td>    <td>$spam_answer</td>
   <td>    <td>
   <form action="$adminurl?action=spam_questions_edit" method="post">    <form action="$adminurl?action=spam_questions_edit" method="post">
     <input type="hidden" name="spam_question_id" value="$spam_question_id" />      <input type="hidden" name="spam_question_id" value="$spam_question_id" />
     <input class="button" type="submit" value="$spam_question_txt{'edit'}" />      <input class="button" type="submit" value="$spam_question_txt{'edit'}" />
   </form>    </form>
   </td>    </td>
   <td>    <td>
   <form action="$adminurl?action=spam_questions_delete" method="post">    <form action="$adminurl?action=spam_questions_delete" method="post">
     <input type="hidden" name="spam_question_id" value="$spam_question_id" />      <input type="hidden" name="spam_question_id" value="$spam_question_id" />
     <input class="button" type="submit" value="$spam_question_txt{'delete'}" onclick="return confirm('$spam_question_txt{'confirm'}');"/>      <input class="button" type="submit" value="$spam_question_txt{'delete'}" onclick="return confirm('$spam_question_txt{'confirm'}');"/>
   </form>    </form>
   </td>    </td>
</tr>~; </tr>~;
       }        }
   } else {    } else {
       $header_row = "";        $header_row = "";
       $show_questions = qq~        $show_questions = qq~
<tr class="windowbg2"> <tr class="windowbg2">
   <td>$spam_question_txt{'no_questions'}</td>    <td>$spam_question_txt{'no_questions'}</td>
</tr>~; </tr>~;
   }    }
   
   $yymain = qq~    $yymain = qq~
<form action="$adminurl?action=spam_questions2" method="post"> <form action="$adminurl?action=spam_questions2" method="post">
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<colgroup> <colgroup>
   <col width="50%" />    <col width="50%" />
   <col width="50%" />    <col width="50%" />
</colgroup> </colgroup>
<tr> <tr>
   <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'question_settings'}</th>    <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'question_settings'}</th>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top;"> <tr class="windowbg2" style="vertical-align: top;">
   <td><label for="en_spam_questions">$spam_question_txt{'enable_question'}</label></td>    <td><label for="en_spam_questions">$spam_question_txt{'enable_question'}</label></td>
   <td><input type="checkbox" name="en_spam_questions" id="en_spam_questions" value="1"$chk_spam_question /></td>    <td><input type="checkbox" name="en_spam_questions" id="en_spam_questions" value="1"$chk_spam_question /></td>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top;"> <tr class="windowbg2" style="vertical-align: top;">
   <td><label for="spam_questions_case">$spam_question_txt{'case_sensitive'}</label></td>    <td><label for="spam_questions_case">$spam_question_txt{'case_sensitive'}</label></td>
   <td><input type="checkbox" name="spam_questions_case" id="spam_questions_case" value="1"$chk_spam_question_case /></td>    <td><input type="checkbox" name="spam_questions_case" id="spam_questions_case" value="1"$chk_spam_question_case /></td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<tr> <tr>
   <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>    <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>
</tr> </tr>
<tr> <tr>
   <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$admin_txt{'10'}" /></td>    <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$admin_txt{'10'}" /></td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<tr> <tr>
   <th class="titlebg"$header_row style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'questions'} ($total_questions)</th>    <th class="titlebg"$header_row style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'questions'} ($total_questions)</th>
</tr> </tr>
$show_questions $show_questions
</table> </table>
</div> </div>
<form action="$adminurl?action=spam_questions_add" method="post"> <form action="$adminurl?action=spam_questions_add" method="post">
<div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<colgroup> <colgroup>
   <col width="25%" />    <col width="25%" />
   <col width="75%" />    <col width="75%" />
</colgroup> </colgroup>
<tr> <tr>
   <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'new_question'}</th>    <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'new_question'}</th>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top; font-weight: bold;"> <tr class="windowbg2" style="vertical-align: top; font-weight: bold;">
   <td><label for="spam_question">$spam_question_txt{'question'}:</label></td>    <td><label for="spam_question">$spam_question_txt{'question'}:</label></td>
   <td><input type="text" name="spam_question" id="spam_question" size="60" /></td>    <td><input type="text" name="spam_question" id="spam_question" size="60" /></td>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top; font-weight: bold;"> <tr class="windowbg2" style="vertical-align: top; font-weight: bold;">
   <td><label for="spam_answer">$spam_question_txt{'answer'}:<br /><span class="small" style="font-weight: normal;">$spam_question_txt{'answer_desc'}</span></label></td>    <td><label for="spam_answer">$spam_question_txt{'answer'}:<br /><span class="small" style="font-weight: normal;">$spam_question_txt{'answer_desc'}</span></label></td>
   <td><input type="text" name="spam_answer" id="spam_answer" size="60" /></td>    <td><input type="text" name="spam_answer" id="spam_answer" size="60" /></td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<tr> <tr>
   <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>    <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>
</tr> </tr>
<tr> <tr>
   <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$spam_question_txt{'add_question'}" /></td>    <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$spam_question_txt{'add_question'}" /></td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
~; ~;
   
   $yytitle = $admintxt{'a3_sub6'};    $yytitle = $admintxt{'a3_sub6'};
   $action_area = "spam_questions";    $action_area = "spam_questions";
   &AdminTemplate;    &AdminTemplate;
   exit;    exit;
   
} }
   
sub SpamQuestions2 { sub SpamQuestions2 {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   $en_spam_questions = $FORM{'en_spam_questions'} || "0";    $en_spam_questions = $FORM{'en_spam_questions'} || "0";
   $spam_questions_case = $FORM{'spam_questions_case'} || "0";    $spam_questions_case = $FORM{'spam_questions_case'} || "0";
   
   require "$admindir/NewSettings.pl";    require "$admindir/NewSettings.pl";
   &SaveSettingsTo('Settings.pl');    &SaveSettingsTo('Settings.pl');
   
   if ($action eq "spam_questions2") {    if ($action eq "spam_questions2") {
       $yySetLocation = qq~$adminurl?action=spam_questions~;        $yySetLocation = qq~$adminurl?action=spam_questions~;
       &redirectexit;        &redirectexit;
   }    }
   
} }
   
sub SpamQuestionsAdd { sub SpamQuestionsAdd {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   $spam_question = $FORM{'spam_question'};    $spam_question = $FORM{'spam_question'};
   $spam_answer   = $FORM{'spam_answer'};    $spam_answer   = $FORM{'spam_answer'};
   
   if ($spam_question eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'question'}"); }    if ($spam_question eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'question'}"); }
   if ($spam_answer eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'answer'}"); }    if ($spam_answer eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'answer'}"); }
   
   fopen(SPAMQUESTIONS, ">>$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, ">>$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   print SPAMQUESTIONS "$date|$spam_question|$spam_answer\n";    print SPAMQUESTIONS "$date|$spam_question|$spam_answer\n";
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   if ($action eq "spam_questions_add") {    if ($action eq "spam_questions_add") {
       $yySetLocation = qq~$adminurl?action=spam_questions~;        $yySetLocation = qq~$adminurl?action=spam_questions~;
       &redirectexit;        &redirectexit;
   }    }
   
} }
   
sub SpamQuestionsEdit { sub SpamQuestionsEdit {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   $id = $FORM{'spam_question_id'};    $id = $FORM{'spam_question_id'};
   my $question_edit = "";    my $question_edit = "";
   
   fopen(SPAMQUESTIONS, "<$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, "<$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   @spam_questions = <SPAMQUESTIONS>;    @spam_questions = <SPAMQUESTIONS>;
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   foreach my $question (@spam_questions) {    foreach my $question (@spam_questions) {
       chomp $question;        chomp $question;
       if ($question =~ /$id/) {        if ($question =~ /$id/) {
           $question_edit = $question; last;            $question_edit = $question; last;
       }        }
   }    }
   ($spam_question_id, $spam_question, $spam_answer) = split(/\|/, $question_edit);    ($spam_question_id, $spam_question, $spam_answer) = split(/\|/, $question_edit);
   
   $yymain = qq~    $yymain = qq~
<form action="$adminurl?action=spam_questions_edit2" method="post"> <form action="$adminurl?action=spam_questions_edit2" method="post">
<div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<colgroup> <colgroup>
   <col width="25%" />    <col width="25%" />
   <col width="75%" />    <col width="75%" />
</colgroup> </colgroup>
<tr> <tr>
   <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'edit_question'}</th>    <th class="titlebg" colspan="2" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $spam_question_txt{'edit_question'}</th>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top; font-weight: bold;"> <tr class="windowbg2" style="vertical-align: top; font-weight: bold;">
   <td><label for="spam_question">$spam_question_txt{'question'}:</label></td>    <td><label for="spam_question">$spam_question_txt{'question'}:</label></td>
   <td><input type="text" name="spam_question" id="spam_question" size="60" value="$spam_question" /></td>    <td><input type="text" name="spam_question" id="spam_question" size="60" value="$spam_question" /></td>
</tr> </tr>
<tr class="windowbg2" style="vertical-align: top; font-weight: bold;"> <tr class="windowbg2" style="vertical-align: top; font-weight: bold;">
   <td><label for="spam_answer">$spam_question_txt{'answer'}:<br /><span class="small" style="font-weight: normal;">$spam_question_txt{'answer_desc'}</span></label></td>    <td><label for="spam_answer">$spam_question_txt{'answer'}:<br /><span class="small" style="font-weight: normal;">$spam_question_txt{'answer_desc'}</span></label></td>
   <td><input type="text" name="spam_answer" id="spam_answer" size="60" value="$spam_answer" /><input type="hidden" name="spam_question_id" id="spam_question_id" value="$spam_question_id" /></td>    <td><input type="text" name="spam_answer" id="spam_answer" size="60" value="$spam_answer" /><input type="hidden" name="spam_question_id" id="spam_question_id" value="$spam_question_id" /></td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;"> <div class="bordercolor" style="padding: 0px; width: 99%; margin-top: 1em; margin-left: 0px; margin-right: auto;">
<table width="100%" cellspacing="1" cellpadding="4"> <table width="100%" cellspacing="1" cellpadding="4">
<tr> <tr>
   <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>    <th class="titlebg" style="text-align: left; vertical-align: middle;"><img src="$imagesdir/preferences.gif" alt="" border="0" /> $admin_txt{'10'}</th>
</tr> </tr>
<tr> <tr>
   <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$admin_txt{'10'} $spam_question_txt{'question'}" />&nbsp;<input type="button" class="button" value="$spam_question_txt{'cancel'}" onclick="location.href='$adminurl?action=spam_questions';" /></td>    <td class="catbg" style="text-align: center; vertical-align: middle;"><input class="button" type="submit" value="$admin_txt{'10'} $spam_question_txt{'question'}" />&nbsp;<input type="button" class="button" value="$spam_question_txt{'cancel'}" onclick="location.href='$adminurl?action=spam_questions';" /></td>
</tr> </tr>
</table> </table>
</div> </div>
</form>~; </form>~;
   
   $yytitle = $admintxt{'a3_sub6'};    $yytitle = $admintxt{'a3_sub6'};
   &AdminTemplate;    &AdminTemplate;
   exit;    exit;
   
} }
   
sub SpamQuestionsEdit2 { sub SpamQuestionsEdit2 {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   $spam_question_id = $FORM{'spam_question_id'};    $spam_question_id = $FORM{'spam_question_id'};
   $spam_question = $FORM{'spam_question'};    $spam_question = $FORM{'spam_question'};
   $spam_answer = $FORM{'spam_answer'};    $spam_answer = $FORM{'spam_answer'};
   
   if ($spam_question eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'question'}"); }    if ($spam_question eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'question'}"); }
   if ($spam_answer eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'answer'}"); }    if ($spam_answer eq '') { &admin_fatal_error("invalid_value","$spam_question_txt{'answer'}"); }
   
   fopen(SPAMQUESTIONS, "<$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, "<$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   @spam_questions = <SPAMQUESTIONS>;    @spam_questions = <SPAMQUESTIONS>;
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   @question = grep (!/$spam_question_id/, @spam_questions);    @question = grep (!/$spam_question_id/, @spam_questions);
   push(@question, "$spam_question_id|$spam_question|$spam_answer");    push(@question, "$spam_question_id|$spam_question|$spam_answer");
   $question = join("", @question);    $question = join("", @question);
   
   fopen(SPAMQUESTIONS, ">$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, ">$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   print SPAMQUESTIONS "$question\n";    print SPAMQUESTIONS "$question\n";
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   if ($action eq "spam_questions_edit2") {    if ($action eq "spam_questions_edit2") {
       $yySetLocation = qq~$adminurl?action=spam_questions~;        $yySetLocation = qq~$adminurl?action=spam_questions~;
       &redirectexit;        &redirectexit;
   }    }
   
} }
   
sub SpamQuestionsDelete { sub SpamQuestionsDelete {
   
   &is_admin_or_gmod;    &is_admin_or_gmod;
   
   fopen(SPAMQUESTIONS, "<$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, "<$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   @spam_questions = <SPAMQUESTIONS>;    @spam_questions = <SPAMQUESTIONS>;
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   fopen(SPAMQUESTIONS, ">$vardir/spam.questions") || &admin_fatal_error("cannot_open","$vardir/spam.questions", 1);    fopen(SPAMQUESTIONS, ">$langdir/$language/spam.questions") || &admin_fatal_error("cannot_open","$langdir/$language/spam.questions", 1);
   print SPAMQUESTIONS grep (!/$FORM{'spam_question_id'}/, @spam_questions);    print SPAMQUESTIONS grep (!/$FORM{'spam_question_id'}/, @spam_questions);
   fclose(SPAMQUESTIONS);    fclose(SPAMQUESTIONS);
   
   if ($action eq "spam_questions_delete") {    if ($action eq "spam_questions_delete") {
       $yySetLocation = qq~$adminurl?action=spam_questions~;        $yySetLocation = qq~$adminurl?action=spam_questions~;
       &redirectexit;        &redirectexit;
   }    }
   
} }
   
1; 1;