#!c:/perl/bin/perl.exe ############################################################################## # WWWBoard Admin Version 2.0 ALPHA 2 # # Copyright 1996 Matt Wright mattw@worldwidemart.com # # Created 10/21/95 Last Modified 11/25/95 # # Scripts Archive at: http://www.worldwidemart.com/scripts/ # # Modifications for dynamic IP: Dennis Báthory-Kitsz # ############################################################################## # COPYRIGHT NOTICE # # Copyright 1996 Matthew M. Wright All Rights Reserved. # ############################################################################## # Modifications for dynamic IP make the following assumptions: # # Pointer to perl executable is complete local drive path # # $basedir is complete local drive path # # $baseurl is relative path from www directory (http://0.0.0.0/wwwboard/) # # $cgi_url is relative path from www directory (http://0.0.0.0/cgi-bin/) # # Important: www server must make cgi-bin directory inaccessible # # Remaining variables are as in the original script. # # Throughout the script, relative paths are used in the hyperlinks. # ############################################################################## # # Define Variables $basedir = "d:/mmserver/www/wwwboard"; $baseurl = "wwwboard"; $cgi_url = "/cgi-bin/wwwadmin.pl"; $mesgdir = "messages"; $datafile = "data.txt"; $mesgfile = "index.html"; $passwd_file = "passwd.txt"; $ext = "html"; $title = "Vermont Composers Bulletin Board"; $use_time = 1; # 1 = YES; 0 = NO # Done ############################################################################## if ($ENV{'QUERY_STRING'} ne '') { $command = "$ENV{'QUERY_STRING'}"; } else { &parse_form; } print "Content-type: text/html\n\n"; ############################################################################## # Remove # # This option is useful to see how the threads appear in the # # index.html document. It can give you a better idea of whether or # # not you want to remove the whole thread or just part of it. # ############################################################################## if ($command eq 'remove') { print "
\n"; print "These messages have been left unsorted, so that you can see the order in\n"; print "which they appear in the $mesgpage page. This will give you an idea of\n"; print "what the threads look like and is often more helpful than the sorted method.\n"; print "
\n"; print "
\n"; print "
\n"; print "\n"; } ############################################################################## # Remove By Number # # This method is useful to see in what order the messages were # # added to the index.html document. # ############################################################################## elsif ($command eq 'remove_by_num') { print "\n"; print "
\n"; print "
\n"; print "\n"; } ############################################################################## # Remove By Date # # Using this method allows you to delete all messages posted before # # a certain date. # ############################################################################## elsif ($command eq 'remove_by_date') { print "\n"; print "
\n"; print "
\n"; print "\n"; } ############################################################################## # Remove By Author # # This option makes a list of all known authors and then groups # # together their postings and allows you to remove them all at once. # ############################################################################## elsif ($command eq 'remove_by_author') { print "\n"; print "
\n"; print "
\n"; print "\n"; } ############################################################################## # Change Password # # By calling this section of the script, the admin can change his or # # her password. # ############################################################################## elsif ($command eq 'change_passwd') { print "\n"; print "
\n"; } ############################################################################## # Remove Action # # This portion is used by the options remove and remove_by_num. # ############################################################################## elsif ($FORM{'action'} eq 'remove') { &check_passwd; for ($i = $FORM{'min'}; $i <= $FORM{'max'}; $i++) { if ($FORM{$i} eq 'all') { push(@ALL,$i); } elsif ($FORM{$i} eq 'single') { push(@SINGLE,$i); } } open(MSGS,"$basedir/$mesgfile"); @lines =\n"; print "
\n"; print "New Username: $new_username
\n"; print "New Password: $FORM{'passwd_1'}
\n"; print "
\n"; print "Do not forget these, since they are now encoded in a file, and not readable!.\n"; print "\n"; } if ($type =~ /^remove/) { print "Below is a short summary of what messages were removed from $mesgpage and the\n"; print "$mesgdir directory. All files that the script attempted to remove, were removed,\n"; print "unless there is an error message stating otherwise.
\n"; print "Attempted to Remove: @ATTEMPTED
\n"; if (@NOT_REMOVED) { print "Files That Could Not Be Deleted: @NOT_REMOVED
\n"; } if (@NO_FILE) { print "Files Not Found: @NO_FILE
\n"; } print "
\n"; &passwd_trailer } elsif ($error eq 'passwd_file') { print "
\n"; &passwd_trailer } elsif ($error eq 'not_same') { print "
\n"; &passwd_trailer } elsif ($error eq 'no_change') { print "
\n"; &passwd_trailer } exit; } sub passwd_trailer { print "