*** scripts/html_output.pl	2007-12-07 19:50:05.000000000 -0500
--- ../../webstump/scripts/html_output.pl	1999-07-02 15:07:56.000000000 -0400
***************
*** 10,46 ****
    my $title = pop( @_ );
    print 
  "Content-Type: text/html\n\n
! <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
!     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
! <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\"> 
! <head>
! <title>$title</title>
! <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
! <link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />
! <link rel=\"Icon\" href=\"/logoIcon.png\" type=\"image/png\" />
! </head>
! <body>
! <h1>$title</h1>\n\n";
  
    if( &is_demo_mode ) {
!     print "<strong>You are operating in demonstration mode. User actions will have no effect.</strong><hr />\n";
    }
    
  }
  
  sub end_html {
!   print "\n<hr /><p>Thank you for using <a href=\"$STUMP_URL\"><abbr title=\"Secure Team-based Usenet Moderation Program\">STUMP</abbr> Robomoderator</a>.
! <br />
! Click <a href=\"$base_address\">here</a> to return to WebSTUMP.</p>
! <!-- Start Quantcast tag -->
! <script type=\"text/javascript\" src=\"//secure.quantserve.com/quant.js\"></script>
! <script type=\"text/javascript\">
! _qacct=\"p-79u6yl8NsXp2s\";quantserve();</script>
! <noscript>
! <a href=\"http://www.quantcast.com/p-79u6yl8NsXp2s\" target=\"_blank\"><img src=\"//secure.quantserve.com/pixel/p-79u6yl8NsXp2s.gif\" border=\"0\" style=\"display: none\" height=\"1\" width=\"1\" alt=\"Quantcast\"></a></noscript>
! <!-- End Quantcast tag -->
! </body>
! </html>
  ";
  }
  
--- 10,29 ----
    my $title = pop( @_ );
    print 
  "Content-Type: text/html\n\n
! <TITLE>$title</TITLE>
! <BODY BGCOLOR=\"#C5C5FF\" BACKGROUND=$base_address_for_files/images/bg1.jpg>
! <H1>$title</H1>\n\n";
  
    if( &is_demo_mode ) {
!     print "<B> You are operating in demonstration mode. User actions will have no effect.</B><HR>\n";
    }
    
  }
  
  sub end_html {
!   print "\n<HR>Thank you for using <A HREF=$STUMP_URL>STUMP Robomoderator</A>.
! <BR>
! Click <A HREF=$base_address>here</A> to return to WebSTUMP.
  ";
  }
  
***************
*** 53,59 ****
  
    #&print_image( "help.gif", "" );
  
!   print " <a href=\"$base_address?action=help&amp;topic=$topic\" target=\"new\">Click here for help on $topic_name</a>\n";
  }
  
  #
--- 36,42 ----
  
    #&print_image( "help.gif", "" );
  
!   print "<A HREF=$base_address?action=help&topic=$topic TARGET=new>Click here for help on $topic_name</A>\n";
  }
  
  #
***************
*** 63,69 ****
    my $alt = pop( @_ );
    my $file = pop( @_ );
  
!   print "<img src=\"$base_address_for_files/images/$file\" alt=\"$alt\" align=\"bottom\" />\n";
  }
  
  # prints the welcome page and login screen.
--- 46,52 ----
    my $alt = pop( @_ );
    my $file = pop( @_ );
  
!   print "<IMG SRC=$base_address_for_files/images/$file ALT=\"$alt\" ALIGN=BOTTOMP>\n";
  }
  
  # prints the welcome page and login screen.
***************
*** 72,117 ****
  
    print 
  
! "<p>Welcome to WebSTUMP, the moderators' front end for <a
! href=\"http://www.algebra.com/~ichudov/stump\"><abbr title=\"Secure Team-based Usenet Moderation Program\">STUMP</abbr></a> users -- USENET newsgroup
  moderators. Only authorized users are allowed to log into this
! program.</p>
  
! <hr />";
  
    my $motd_file = "$webstump_home/config/motd";
  
    if( -f $motd_file && -r $motd_file ){
      open( MOTD, $motd_file );
!     print "<h4>Message of the Day:</h4><pre>\n";
      print while( <MOTD> );
      close( MOTD );
!     print "</pre><hr />\n";
    }
  
    print "
! <h4>Newsgroups Status:</h4>
! <table border=\"3\">\n";
  
    for( sort @newsgroups_array ) {
!     print "<tr><td>";
      
      my $count = &get_article_count( $_ );
  
!     print "<a href=\"$base_address?action=login_screen\&amp;newsgroup=$_\">$_</a>";
      &print_image( "smiley.gif", "" ) if $count;
!     print "</td>";
  
  
!     print "<td>$count messages in queue</td>";
!     print "<td><a href=\"$base_address?action=init_request_newsgroup_creation\&amp;newsgroup=$_\">Request creation</a></td></tr>\n";
    }
  
!   print "</table>\n";
!   print "<hr /><p>Note: click on the newsgroup to login in as moderator. 
  Click on 'Request Creation' to ask a sysadmin at a specific domain 
! to carry your newsgroup.</p>\n<hr />
! <p><a href=\"$base_address?action=admin_login\">Click here to administer this WebSTUMP installation</a></p>
  ";
    &end_html;
  }
--- 55,100 ----
  
    print 
  
! "Welcome to WebSTUMP, the moderators' front end for <A
! HREF=http://www.algebra.com/~ichudov/stump>STUMP</A> users -- USENET newsgroup
  moderators. Only authorized users are allowed to log into this
! program.
  
! <HR>";
  
    my $motd_file = "$webstump_home/config/motd";
  
    if( -f $motd_file && -r $motd_file ){
      open( MOTD, $motd_file );
!     print "<B>Message of the Day:</B><BR><PRE>\n";
      print while( <MOTD> );
      close( MOTD );
!     print "</PRE><HR>\n";
    }
  
    print "
! Newsgroups Status:<BR>
! <TABLE BORDER=3>\n";
  
    for( sort @newsgroups_array ) {
!     print "<TR><TD>";
      
      my $count = &get_article_count( $_ );
  
!     print " <A HREF=$base_address?action=login_screen\&newsgroup=$_>$_</A>";
      &print_image( "smiley.gif", "" ) if $count;
!     print "</TD>";
  
  
!     print "<TD>$count messages in queue<BR></TD>";
!     print "<TD><A HREF=$base_address?action=init_request_newsgroup_creation\&newsgroup=$_>Request creation</A></TD>\n";
    }
  
!   print "</TABLE>\n";
!   print "<HR>Note: click on the newsgroup to login in as moderator. 
  Click on 'Request Creation' to ask a sysadmin at a specific domain 
! to carry your newsgroup.\n<HR>
! <A HREF=$base_address?action=admin_login>Click here to administer this WebSTUMP installation</A>
  ";
    &end_html;
  }
***************
*** 130,183 ****
    }
  
    print
! " <p>Welcome to the Moderation Center for $newsgroup. Please bookmark
! this page.</p><hr />";
  
  
    my $color = "", $end_color = "";
  
    if( $count ) {
!     $color = "<font color=\"red\">";
!     $end_color = "</font>";
    }
  
    print 
! "<form method=\"$request_method\" action=\"$base_address\"><div>
!  <input name=\"action\" value=\"moderation_screen\" type=\"hidden\" />
!   $color <p>($count ";
    
    &print_image( "new_tiny2.gif", "new" ) if $count;
  
!   print " articles available)$end_color</p>
!  <label>Login: <input name=\"moderator\" value=\"\" size=\"20\" /></label>
!  <br />
!  <label>Password: <input name=\"password\" type=\"password\" value=\"\" size=\"20\" /></label>
!  <br />
!  <input type=\"submit\" value=\"Proceed with Login\" />
!  <input type=\"reset\" value=\"Reset\" />
!  <input name=\"newsgroup\" value=\"$newsgroup\" type=\"hidden\" />
!  </div></form><hr />
!   <p>Please log into $newsgroup. You can only log in if you know your login id
    and know the secret password. You should not give your password to any
    unauthorized user. Your login id and password are NOT case sentitive, 
    which means that,
!   for example, \"xyzzy\" and \"XyZZY\" are equally valid.</p>
  ";
  
    print "
!  <p>Log in as \"admin\" if you want to:</p>
! <ul>
!   <li>edit filtering lists.";
  
    &link_to_help( "filter-lists", "Filter Lists" );
  
!   print "</li>
!   <li>add/delete users or change their passwords.</li>
!   <li>First Time Users: You have to log in as admin and add a moderator user
    who will be able to moderate the newsgroup. Then log in again as that
    user. If you are a new user, you have to have your admin password assigned to
!   you by the administrator.</li>
! </ul>
  
  ";
    &end_html;
--- 113,166 ----
    }
  
    print
! " Welcome to the Moderation  Center for  $newsgroup. Please bookmark
! this page. <HR>";
  
  
    my $color = "", $end_color = "";
  
    if( $count ) {
!     $color = "<font color=red>";
!     $end_color = "<font color=black>";
    }
  
    print 
! "<FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=moderation_screen TYPE=hidden>
!   $color ($count ";
    
    &print_image( "new_tiny2.gif", "new" ) if $count;
  
!   print " articles available)<BR> $end_color
!  Login: <INPUT NAME=moderator VALUE=\"\" SIZE=20>
!  <BR>
!  Password: <INPUT NAME=password TYPE=password VALUE=\"\" SIZE=20>
!  <BR>
!  <INPUT TYPE=submit VALUE=\"Proceed with Login\">
!  <INPUT TYPE=reset VALUE=\"Reset\">
!  <INPUT NAME=newsgroup VALUE=\"$newsgroup\" TYPE=hidden>
!  </FORM><HR>
!   Please log into $newsgroup. You can only log in if you know your login id
    and know the secret password. You should not give your password to any
    unauthorized user. Your login id and password are NOT case sentitive, 
    which means that,
!   for example, \"xyzzy\" and \"XyZZY\" are equally valid.<P>
  ";
  
    print "
!  Log in as \"admin\" if you want to 
! <UL>
!   <LI> edit filtering lists.";
  
    &link_to_help( "filter-lists", "Filter Lists" );
  
!   print "
!   <LI> add/delete users or change their passwords.
!   <LI> First Time Users: You have to log in as admin and add a moderator user
    who will be able to moderate the newsgroup. Then log in again as that
    user. If you are a new user, you have to have your admin password assigned to
!   you by the administrator.
! </UL>
  
  ";
    &end_html;
***************
*** 189,207 ****
  
    print
  "
! <p>Attention: this page is only for the maintainer of the whole WebSTUMP
  installation. Please return to the main page if you are not the maintainer
! of this installation.</p><hr />
  ";
  
    print 
! "<form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"webstump_admin_screen\" type=\"hidden\" />
!  Password: <input name=\"password\" type=\"password\" value=\"\" size=\"20\" />
!  <br />
!  <input type=\"submit\" value=\"Proceed with Login\" />
!  <input type=\"reset\" value=\"Reset\" />
!  </form>
  ";
  
    &end_html;
--- 172,190 ----
  
    print
  "
! Attention: this page is only for the maintainer of the whole WebSTUMP
  installation. Please return to the main page if you are not the maintainer
! of this installation. <HR>
  ";
  
    print 
! "<FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=webstump_admin_screen TYPE=hidden>
!  Password: <INPUT NAME=password TYPE=password VALUE=\"\" SIZE=20>
!  <BR>
!  <INPUT TYPE=submit VALUE=\"Proceed with Login\">
!  <INPUT TYPE=reset VALUE=\"Reset\">
!  </FORM>
  ";
  
    &end_html;
***************
*** 215,221 ****
    my $file = shift @_ || &required_parameter('file');
  
    &begin_html( "Main Moderation Screen: $newsgroup" );
!   print "<hr />\n";
  
    &read_rejection_reasons;
  
--- 198,204 ----
    my $file = shift @_ || &required_parameter('file');
  
    &begin_html( "Main Moderation Screen: $newsgroup" );
!   print "<HR>\n";
  
    &read_rejection_reasons;
  
***************
*** 223,231 ****
  
    if( -d "$dir/$file" && open( TEXT_FILES, "$dir/$file/text.files.lst" ) ) {
  
!       print "<hr />\n" if &print_article_warning( $file );
  
!       print "<pre>\n";
        my $filename;
        while( $filename = <TEXT_FILES> ) {
          open( ARTICLE, "$dir/$file/$filename" );
--- 206,214 ----
  
    if( -d "$dir/$file" && open( TEXT_FILES, "$dir/$file/text.files.lst" ) ) {
  
!       print "<HR>\n" if &print_article_warning( $file );
  
!       print "<PRE>\n";
        my $filename;
        while( $filename = <TEXT_FILES> ) {
          open( ARTICLE, "$dir/$file/$filename" );
***************
*** 237,243 ****
          close( ARTICLE );
        }
  
!       print "\n</pre>\n\n";
  
        &print_images( $newsgroup, "$dir/$file", $file);
  
--- 220,226 ----
          close( ARTICLE );
        }
  
!       print "\n</PRE>\n\n";
  
        &print_images( $newsgroup, "$dir/$file", $file);
  
***************
*** 246,289 ****
            "approved or rejected by another moderator.";
    }
  
!       print "<hr />
! <form name=\"decision\" method=\"$request_method\" action=\"$base_address\">
  ";
  
    print "
! <input name=\"action\" value=\"approval_decision\" type=\"hidden\" />";
    &html_print_credentials;
!   print "<select name=\"decision_$file\">
! <option value=\"approve\">Approve</option>
  ";
  
        foreach (sort(keys %rejection_reasons)) {
!         print "<option value=\"reject $_\">Reject -- $rejection_reasons{$_}</option>\n";
        }
  
!       print "<br />";
  
!       print "</select><br /> Comment: <input name=\"comment\" value=\"\" size=\"80\" /><br />";
  
!   print "<br />
! <input type=\"radio\" name=\"poster_decision\" value=\"nothing\" checked=\"checked\" />Don't change poster's status
! <input type=\"radio\" name=\"poster_decision\" value=\"preapprove\" 
!  />Preapprove poster
! <input type=\"radio\" name=\"poster_decision\" value=\"ban\" 
!   onclick=\"alert( 'Banning a poster is a controversial practice'); \"
!  /> Ban All Posts by this Person (Careful!)
! <br /><br />
! <input type=\"radio\" name=\"thread_decision\" value=\"nothing\" checked=\"checked\" />Don't change thread's status
! <input type=\"radio\" name=\"thread_decision\" value=\"preapprove\" />Preapprove thread, by Subject:
! <br />
  
! <input type=\"radio\" name=\"thread_decision\" value=\"ban\"
!   onclick=\"alert( 'Banning a thread is a controversial practice'); \"
!  />Ban Entire Thread By Subject (Careful!)
! <input type=\"radio\" name=\"thread_decision\" value=\"watch\" />Put Entire thread on a Watch, by Subject:
  
! <br /><br />
! <em>
  NOTE: Decisions to ban and preapprove posters and threads can be reversed by 
  logging in as \"admin\" and editing respective lists of preapproved
  and banned threads  and posters.
--- 229,272 ----
            "approved or rejected by another moderator.";
    }
  
!       print "<HR>
! <FORM NAME=decision METHOD=$request_method action=$base_address>
  ";
  
    print "
! <INPUT NAME=action VALUE=approval_decision TYPE=hidden>";
    &html_print_credentials;
!   print "<SELECT NAME=\"decision_$file\">
! <OPTION VALUE=\"approve\">Approve</OPTION>
  ";
  
        foreach (sort(keys %rejection_reasons)) {
!         print "<OPTION VALUE=\"reject $_\">Reject -- $rejection_reasons{$_}</OPTION>\n";
        }
  
!       print "<BR>";
  
!       print "</SELECT><BR> Comment: <INPUT NAME=comment VALUE=\"\" SIZE=80><BR>";
  
!   print "<BR>
! <INPUT TYPE=radio NAME=poster_decision VALUE=nothing CHECKED>Don't change poster's status</INPUT>
! <INPUT TYPE=radio NAME=poster_decision VALUE=preapprove 
! >Preapprove poster</INPUT>
! <INPUT TYPE=radio NAME=poster_decision VALUE=ban 
!   ONCLICK=\"alert( 'Banning a poster is a controversial practice'); \"
! > Ban All Posts by this Person (Careful!)</INPUT>
! <BR><BR>
! <INPUT TYPE=radio NAME=thread_decision VALUE=nothing CHECKED>Don't change thread's status</INPUT>
! <INPUT TYPE=radio NAME=thread_decision VALUE=preapprove>Preapprove thread, by Subject:</INPUT>
! <BR>
  
! <INPUT TYPE=radio NAME=thread_decision VALUE=ban
!   ONCLICK=\"alert( 'Banning a thread is a controversial practice'); \"
! >Ban Entire Thread By Subject (Careful!)</INPUT>
! <INPUT TYPE=radio NAME=thread_decision VALUE=watch>Put Entire thread on a Watch, by Subject:</INPUT>
  
! <BR><BR>
! <I>
  NOTE: Decisions to ban and preapprove posters and threads can be reversed by 
  logging in as \"admin\" and editing respective lists of preapproved
  and banned threads  and posters.
***************
*** 291,311 ****
  
    &link_to_help( "filter-lists", "automatic filtering and filter lists, blacklisting and preapproved threads." );
  
!   print "Be really careful about blacklisting of everyone except spammers.</em><br /><br />
  
! <input type=\"radio\" name=\"next_screen\" value=\"single\" checked=\"checked\" />
  	Review ONE article in next screen
! <input type=\"radio\" name=\"next_screen\" value=\"multiple\" />
  	Review multiple articles in next screen
! <hr />
  
! <input type=\"submit\" value=\"Submit\" />
! <input type=\"reset\" value=\"Reset\" />
  ";
  
!       print "</form>\n\n";
!   print "<br /><a href=\"$base_address?action=change_password&amp;newsgroup=$newsgroup&" .
!         "moderator=$moderator&password=$password\">Change Password</a>";
  
    closedir( QUEUE );
    &end_html;
--- 274,294 ----
  
    &link_to_help( "filter-lists", "automatic filtering and filter lists, blacklisting and preapproved threads." );
  
!   print "Be really careful about blacklisting of everyone except spammers.</I><BR><BR>
  
! <INPUT TYPE=radio NAME=next_screen VALUE=single CHECKED> 
  	Review ONE article in next screen
! <INPUT TYPE=radio NAME=next_screen VALUE=multiple> 
  	Review multiple articles in next screen
! <HR>
  
! <INPUT TYPE=submit VALUE=\"Submit\">
! <INPUT TYPE=reset VALUE=\"Reset\">
  ";
  
!       print "</FORM>\n\n";
!   print "<BR><A HREF=$base_address?action=change_password&newsgroup=$newsgroup&" .
!         "moderator=$moderator&password=$password>Change Password</A>";
  
    closedir( QUEUE );
    &end_html;
***************
*** 320,343 ****
  
    &begin_html( "WebSTUMP Administration" );
    print "
! <form method=\"$request_method\" action=\"$base_address\">
! <input name=\"action\" value=\"admin_add_newsgroup\" type=\"hidden\" />
! <input name=\"password\" value=\"$password\" type=\"hidden\" />\n";
  
  
    print "
! <hr />
! Create a new newsgroup on the server:<br />
  
! Newsgroup:<br /> <input name=\"newsgroup_name\" value=\"\" size=\"50\" /><br />
! Address to send approved/rejected messages <br />
! 	<input name=\"newsgroup_approved_address\" value=\"\" size=\"30\" /><br />
! Admin Password For this group:<br /> <input name=\"newsgroup_password\" value=\"\" size=\"10\" /><br />
! <input type=\"submit\" value=\"Submit\" />
! <input type=\"reset\" value=\"Reset\" /><hr />
  ";
  
!       print "</form>\n\n<pre>\n";
  
    &end_html;
  }
--- 303,326 ----
  
    &begin_html( "WebSTUMP Administration" );
    print "
! <FORM METHOD=$request_method action=$base_address>
! <INPUT NAME=action VALUE=admin_add_newsgroup TYPE=hidden>
! <INPUT NAME=password VALUE=\"$password\" TYPE=hidden>\n";
  
  
    print "
! <HR>
! Create a new newsgroup on the server:<BR>
  
! Newsgroup:<BR> <INPUT NAME=newsgroup_name VALUE=\"\" SIZE=50><BR>
! Address to send approved/rejected messages <BR>
! 	<INPUT NAME=newsgroup_approved_address VALUE=\"\" SIZE=30><BR>
! Admin Password For this group:<BR> <INPUT NAME=newsgroup_password VALUE=\"\" SIZE=10><BR>
! <INPUT TYPE=submit VALUE=\"Submit\">
! <INPUT TYPE=reset VALUE=\"Reset\"><HR>
  ";
  
!       print "</FORM>\n\n<PRE>\n";
  
    &end_html;
  }
***************
*** 363,369 ****
  
    &begin_html( "WebSTUMP Administration: Newsgroup created" );
  
!   print "<pre>\n\n";
  
    print "Adding $newsgroup to $webstump_home/config/newsgroups.lst...";
    mkdir "$webstump_home/queues/$newsgroup", 0755;
--- 346,352 ----
  
    &begin_html( "WebSTUMP Administration: Newsgroup created" );
  
!   print "<PRE>\n\n";
  
    print "Adding $newsgroup to $webstump_home/config/newsgroups.lst...";
    mkdir "$webstump_home/queues/$newsgroup", 0755;
***************
*** 389,395 ****
    print " done.\n";
  
  
!   print "</pre>\n";
  
    &end_html;
  }
--- 372,378 ----
    print " done.\n";
  
  
!   print "</PRE>\n";
  
    &end_html;
  }
***************
*** 413,419 ****
      $extension = "\L$extension";
      
      if( $extension eq "gif" || $extension eq "jpg" || $extension eq "jpeg" ) {
!       print "<div align=\"center\"> <img src=\"$base_address_for_files/queues/$newsgroup/$web_subdir/$_\" /></div><hr />\n";
        $count++;
      } else {
        my $filename = $_;
--- 396,402 ----
      $extension = "\L$extension";
      
      if( $extension eq "gif" || $extension eq "jpg" || $extension eq "jpeg" ) {
!       print "<CENTER> <IMG SRC=$base_address_for_files/queues/$newsgroup/$web_subdir/$_></CENTER><HR>\n";
        $count++;
      } else {
        my $filename = $_;
***************
*** 427,433 ****
  	      || $filename =~ /msg-.*\.doc/;
        
        &print_image( "no_image.gif", "security warning" );
!       print "<strong>Non-image attachment:</strong><code>$filename</code> NOT SHOWN for security reasons.<br />\n";
      }
    }
    return $count;
--- 410,416 ----
  	      || $filename =~ /msg-.*\.doc/;
        
        &print_image( "no_image.gif", "security warning" );
!       print "<B>Non-image attachment:</B><CODE>$filename</CODE> NOT SHOWN for security reasons.<BR>\n";
      }
    }
    return $count;
***************
*** 446,452 ****
      $warning =~ s/>/&gt;/g;
      close( WARNING );
      &print_image( "star.gif", "warning" );
!     print "<font color=\"red\">$warning</font>\n";
      return 1;
    }
  
--- 429,435 ----
      $warning =~ s/>/&gt;/g;
      close( WARNING );
      &print_image( "star.gif", "warning" );
!     print "<FONT COLOR=red>$warning</FONT>\n";
      return 1;
    }
  
***************
*** 481,487 ****
    }
      
    &begin_html( "Main Moderation Screen: $newsgroup" );
!   print "<p>Welcome to the main moderation screen. Its main purpose is to 
  help you process most messages extremely quickly. For every message, it 
  presents you who sent it, as well as the first three non-blank lines.
  For those messages where the decision is obvious, simply select your
--- 464,470 ----
    }
      
    &begin_html( "Main Moderation Screen: $newsgroup" );
!   print "Welcome to the main moderation screen. Its main purpose is to 
  help you process most messages extremely quickly. For every message, it 
  presents you who sent it, as well as the first three non-blank lines.
  For those messages where the decision is obvious, simply select your
***************
*** 489,495 ****
  you would like to review in more details, do not select anything and
  use Review/Comment function from this screen or from a subsequent screen.
  Remember that if you do not make any decision, the article would stay in the
! queue.</p>\n";
  
    &read_rejection_reasons;
  
--- 472,478 ----
  you would like to review in more details, do not select anything and
  use Review/Comment function from this screen or from a subsequent screen.
  Remember that if you do not make any decision, the article would stay in the
! queue.\n";
  
    &read_rejection_reasons;
  
***************
*** 497,504 ****
    opendir( QUEUE, $dir ) || &error( "could not open directory $dir" );
  
    print "
!   <form method=\"$request_method\" action=\"$base_address\">
!   <input name=\"action\" value=\"approval_decision\" type=\"hidden\" />";
      &html_print_credentials;
    
    my $file, $subject = "No Subject", $from = "From nobody";
--- 480,487 ----
    opendir( QUEUE, $dir ) || &error( "could not open directory $dir" );
  
    print "
!   <FORM METHOD=$request_method action=$base_address>
!   <INPUT NAME=action VALUE=approval_decision TYPE=hidden>";
      &html_print_credentials;
    
    my $file, $subject = "No Subject", $from = "From nobody";
***************
*** 525,544 ****
            }
          }
  
!         print "<hr /><strong>$from: $subject</strong>(";
!         print "<a href=\"$base_address?action=moderate_article&amp;newsgroup=$newsgroup&" .
!               "moderator=$moderator&password=$password&file=$subdir\">Review/Comment/Preapprove</a>)<br />\n";
!         print "<input type=\"radio\" name=\"decision_$file\" value=\"approve\" />Approve\n";
! #        print "<input type=\"radio\" name=\"decision_$file\" value=\"preapprove\" />PreApprove\n";
          foreach (@short_rejection_reasons) {
!           print "<input type=\"radio\" name=\"decision_$file\" value=\"reject $_\" />Reject \u$_\n";
          }
  
! 	print "<br />\n";
  
          &print_article_warning( $file );
  
!         print "<br /><pre>\n";
  
          my $i = 0;
  
--- 508,527 ----
            }
          }
  
!         print "<HR><B>$from: $subject</B>(";
!         print "<A HREF=$base_address?action=moderate_article&newsgroup=$newsgroup&" .
!               "moderator=$moderator&password=$password&file=$subdir>Review/Comment/Preapprove</A>)<BR>\n";
!         print "<INPUT TYPE=radio NAME=\"decision_$file\" VALUE=approve>Approve\n";
! #        print "<INPUT TYPE=radio NAME=\"decision_$file\" VALUE=preapprove>PreApprove\n";
          foreach (@short_rejection_reasons) {
!           print "<INPUT TYPE=radio NAME=\"decision_$file\" VALUE=\"reject $_\">Reject \u$_\n";
          }
  
! 	print "<BR>\n";
  
          &print_article_warning( $file );
  
!         print "<BR><PRE>\n";
  
          my $i = 0;
  
***************
*** 552,558 ****
              }
          }
  
!         print "</pre>";
          $form_not_empty = "yes";
          close( PROLOG );
          $article_count += &print_images( $newsgroup, "$dir/$subdir", $subdir );
--- 535,541 ----
              }
          }
  
!         print "</PRE>";
          $form_not_empty = "yes";
          close( PROLOG );
          $article_count += &print_images( $newsgroup, "$dir/$subdir", $subdir );
***************
*** 560,577 ****
    }
  
    if( $form_not_empty ) {
!     print "<hr /> <input type=\"submit\" value=\"Submit\" />
! <input type=\"reset\" value=\"Reset\" />
  ";
    } else {
!     print "No articles present in the queue\n<hr />\n";
    }
  
!   print "<a href=\"$base_address?action=change_password&amp;newsgroup=$newsgroup&" .
!         "moderator=$moderator&password=$password\">Change Password</a>";
  
  
!   print "</form>\n\n";
    closedir( QUEUE );
    &end_html;
  }
--- 543,560 ----
    }
  
    if( $form_not_empty ) {
!     print "<HR> <INPUT TYPE=submit VALUE=Submit>
! <INPUT TYPE=reset VALUE=Reset>
  ";
    } else {
!     print "No articles present in the queue\n<HR>\n";
    }
  
!   print "<A HREF=$base_address?action=change_password&newsgroup=$newsgroup&" .
!         "moderator=$moderator&password=$password>Change Password</A>";
  
  
!   print "</FORM>\n\n";
    closedir( QUEUE );
    &end_html;
  }
***************
*** 583,591 ****
    my $password = $request{'password'};
  
    print "
!  <input name=\"newsgroup\" value=\"$newsgroup\" type=\"hidden\" />
!  <input name=\"moderator\" value=\"$moderator\" type=\"hidden\" />
!  <input name=\"password\" value=\"$password\" type=\"hidden\" />\n";
  }
  
  # newsgroup admin page
--- 566,574 ----
    my $password = $request{'password'};
  
    print "
!  <INPUT NAME=newsgroup VALUE=\"$newsgroup\" TYPE=hidden>
!  <INPUT NAME=moderator VALUE=\"$moderator\" TYPE=hidden>
!  <INPUT NAME=password VALUE=\"$password\" TYPE=hidden>\n";
  }
  
  # newsgroup admin page
***************
*** 593,656 ****
    &begin_html( "Administer $request{'newsgroup'}" );
  
    print "All usernames and passwords are not case sensitive.\n";
!   print "<hr />Use this form to add new moderators or change passwords:<br />
!  <form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"add_user\" type=\"hidden\" />";
    &html_print_credentials;
    print "
!  Username: <input name=\"user\" value=\"\" size=\"20\" />
!  <br />
!  Password: <input name=\"new_password\" value=\"\" size=\"20\" />
!  <br />
!  <input type=\"submit\" value=\"Add/Change\" />
!  <input type=\"reset\" value=\"Reset\" />
!  </form>
  ";
  
!   print "<hr />Use this form to delete moderators:<br />
!  <form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"delete_user\" type=\"hidden\" />";
    &html_print_credentials;
    print "
!  Username: <input name=\"user\" value=\"\" size=\"20\" />
!  <br />
!  <input type=\"submit\" value=\"Delete Moderator\" />
!  <input type=\"reset\" value=\"Reset\" />
!  </form><hr />
  
!  <form method=\"$request_method\" action=\"$base_address\" />
!  <input name=\"action\" value=\"edit_list\" type=\"hidden\" />";
    &html_print_credentials;
    print "
!   Configuration List: <select name=\"list_to_edit\">
  
!     <option value=\"good.posters.list\">Good Posters List</option>
!     <option value=\"watch.posters.list\">Suspicious Posters List</option>
!     <option value=\"bad.posters.list\">Banned Posters List</option>
!     <option value=\"good.subjects.list\">Good Subjects List</option>
!     <option value=\"watch.subjects.list\">Suspicious Subjects List</option>
!     <option value=\"bad.subjects.list\">Banned Subjects List</option>
!     <option value=\"watch.words.list\">Suspicious Words List</option>
!     <option value=\"bad.words.list\">Banned Words List</option>
  
!   </select>
!   <input type=\"submit\" value=\"Edit\" />
!   <input type=\"reset\" value=\"Reset\" />";
  
    &link_to_help( "filter-lists", "filtering lists" );
  
    print "
!   </form><hr />
  
    List of current moderators:<P>
  
!   <ul>\n";
  
    foreach (keys %moderators) {
!       print "<li> $_\n";
    }
  
!   print "</ul>\n";
  
    &end_html;
  }
--- 576,639 ----
    &begin_html( "Administer $request{'newsgroup'}" );
  
    print "All usernames and passwords are not case sensitive.\n";
!   print "<HR>Use this form to add new moderators or change passwords:<BR>
!  <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=add_user TYPE=hidden>";
    &html_print_credentials;
    print "
!  Username: <INPUT NAME=user VALUE=\"\" SIZE=20>
!  <BR>
!  Password: <INPUT NAME=new_password VALUE=\"\" SIZE=20>
!  <BR>
!  <INPUT TYPE=submit VALUE=\"Add/Change\">
!  <INPUT TYPE=reset VALUE=Reset>
!  </FORM>
  ";
  
!   print "<HR>Use this form to delete moderators:<BR>
!  <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=delete_user TYPE=hidden>";
    &html_print_credentials;
    print "
!  Username: <INPUT NAME=user VALUE=\"\" SIZE=20>
!  <BR>
!  <INPUT TYPE=submit VALUE=\"Delete Moderator\">
!  <INPUT TYPE=reset VALUE=Reset>
!  </FORM><HR>
  
!  <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=edit_list TYPE=hidden>";
    &html_print_credentials;
    print "
!   Configuration List: <SELECT NAME=list_to_edit>
  
!     <OPTION VALUE=good.posters.list>Good Posters List
!     <OPTION VALUE=watch.posters.list>Suspicious Posters List
!     <OPTION VALUE=bad.posters.list>Banned Posters List
!     <OPTION VALUE=good.subjects.list>Good Subjects List
!     <OPTION VALUE=watch.subjects.list>Suspicious Subjects List
!     <OPTION VALUE=bad.subjects.list>Banned Subjects List
!     <OPTION VALUE=watch.words.list>Suspicious Words List
!     <OPTION VALUE=bad.words.list>Banned Words List
  
!   </SELECT>
!   <INPUT TYPE=submit VALUE=\"Edit\">
!   <INPUT TYPE=reset VALUE=Reset>";
  
    &link_to_help( "filter-lists", "filtering lists" );
  
    print "
!   </FORM><HR>
  
    List of current moderators:<P>
  
!   <UL>\n";
  
    foreach (keys %moderators) {
!       print "<LI> $_\n";
    }
  
!   print "</UL>\n";
  
    &end_html;
  }
***************
*** 678,696 ****
    &begin_html( "Edit $list_to_edit" );
  
    print
! " <form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"set_config_list\" type=\"hidden\" />
!  <input name=\"list_to_edit\" value=\"$list_to_edit\" type=\"hidden\" />";
    &html_print_credentials;
    &link_to_help( $list_to_edit, "$list_to_edit" );
    print "
!  <p>Edit this list:</p><hr />
! <textarea name=\"list\" rows=\"20\" cols=\"50\">
! $list_content</textarea>
  
!  <br />
!  <input type=\"submit\" value=\"Set\" />
!  </form>
  ";
  
    &end_html;
--- 661,679 ----
    &begin_html( "Edit $list_to_edit" );
  
    print
! " <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=set_config_list TYPE=hidden>
!  <INPUT NAME=list_to_edit VALUE=$list_to_edit TYPE=hidden>";
    &html_print_credentials;
    &link_to_help( $list_to_edit, "$list_to_edit" );
    print "
!  Edit this list: <HR>
! <TEXTAREA NAME=list rows=20 COLS=50>
! $list_content</TEXTAREA>
  
!  <BR>
!  <INPUT TYPE=submit VALUE=\"Set\">
!  </FORM>
  ";
  
    &end_html;
***************
*** 701,717 ****
    &begin_html( "Change Password" );
  
    print "All usernames and passwords are not case sensitive.\n";
!   print "<hr />Use this form to change your password:<br />
!  <form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"validate_change_password\" type=\"hidden\" />";
    &html_print_credentials;
    print "
!  <br />
!  New Password: <input name=\"new_password\" value=\"\" size=\"20\" />
!  <br />
!  <input type=\"submit\" value=\"Submit\" />
!  <input type=\"reset\" value=\"Reset\" />
!  </form>
  ";
  
    &end_html;
--- 684,700 ----
    &begin_html( "Change Password" );
  
    print "All usernames and passwords are not case sensitive.\n";
!   print "<HR>Use this form to change your password:<BR>
!  <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=validate_change_password TYPE=hidden>";
    &html_print_credentials;
    print "
!  <BR>
!  New Password: <INPUT NAME=new_password VALUE=\"\" SIZE=20>
!  <BR>
!  <INPUT TYPE=submit VALUE=Submit>
!  <INPUT TYPE=reset VALUE=Reset>
!  </FORM>
  ";
  
    &end_html;
***************
*** 724,748 ****
  
    &begin_html( "Request Creation of $newsgroup" );
  
!   print "<p>This page helps you ask the system administrator of your domain
! to create <strong>$newsgroup</strong> on your server. Type in your domain name and
  click SUBMIT. An email will be sent to news\@domain and usenet\@domain
  and postmaster\@domain
  asking them to create your newsgroup. Please do NOT abuse this system.
  NOTE: You can give the URL of this page to your group readers so that 
! they could request creation of their newsgroups by themselves.</p>\n";
  
!   print "<hr />
!  <form method=\"$request_method\" action=\"$base_address\">
!  <input name=\"action\" value=\"complete_newsgroup_creation_request\" type=\"hidden\" />\n";
    &html_print_credentials;
    print "
!  <br />
!  Domain Name ONLY: <input name=\"domain_name\" value=\"\" size=\"40\" />
!  <br />
!  <input type=\"submit\" value=\"Submit\" />
!  <input type=\"reset\" value=\"Reset\" />
!  </form>
  ";
  
    &end_html;
--- 707,731 ----
  
    &begin_html( "Request Creation of $newsgroup" );
  
!   print "This page helps you ask the system administrator of your domain
! to create <B>$newsgroup</B> on your server. Type in your domain name and
  click SUBMIT. An email will be sent to news\@domain and usenet\@domain
  and postmaster\@domain
  asking them to create your newsgroup. Please do NOT abuse this system.
  NOTE: You can give the URL of this page to your group readers so that 
! they could request creation of their newsgroups by themselves.\n";
  
!   print "<HR>
!  <FORM METHOD=$request_method action=$base_address>
!  <INPUT NAME=action VALUE=complete_newsgroup_creation_request TYPE=hidden>\n";
    &html_print_credentials;
    print "
!  <BR>
!  Domain Name ONLY: <INPUT NAME=domain_name VALUE=\"\" SIZE=40>
!  <BR>
!  <INPUT TYPE=submit VALUE=Submit>
!  <INPUT TYPE=reset VALUE=Reset>
!  </FORM>
  ";
  
    &end_html;
***************
*** 789,797 ****
  
    &begin_html( "Request to create $newsgroup sent" );
  
!   print "The following request has been sent:<hr /><pre>\n";
  
!   print "$request</pre>\n";
  
    &end_html;
  }
--- 772,780 ----
  
    &begin_html( "Request to create $newsgroup sent" );
  
!   print "The following request has been sent:<HR><PRE>\n";
  
!   print "$request</PRE>\n";
  
    &end_html;
  }
***************
*** 814,835 ****
    $help .= $_ while( <FILE> );
    close( FILE );
  
!   $help =~ s/##/$base_address?action=help&amp;topic=/g;
  
    &begin_html( "$topic_name" );
  
    print $help;
  
!   print "<hr />";
!   print "<!-- Start Quantcast tag -->
! <script type=\"text/javascript\" src=\"//secure.quantserve.com/quant.js\"></script>
! <script type=\"text/javascript\">
! _qacct=\"p-79u6yl8NsXp2s\";quantserve();</script>
! <noscript>
! <a href=\"http://www.quantcast.com/p-79u6yl8NsXp2s\" target=\"_blank\"><img src=\"//secure.quantserve.com/pixel/p-79u6yl8NsXp2s.gif\" border=\"0\" style=\"display: none\" height=\"1\" width=\"1\" alt=\"Quantcast\"></a></noscript>
! <!-- End Quantcast tag -->";
! 
!   print "</body></html>";
  }
  
  
--- 797,809 ----
    $help .= $_ while( <FILE> );
    close( FILE );
  
!   $help =~ s/##/$base_address?action=help&topic=/g;
  
    &begin_html( "$topic_name" );
  
    print $help;
  
!   print "<HR>";
  }
  
  
***************
*** 839,842 ****
  
  
  1;
- 
--- 813,815 ----
