#!/usr/bin/perl
use CGI::Carp "fatalsToBrowser"; # Output errors to browser
use CGI qw(:standard); # Saves loads of work
$CGI::POST_MAX=1024 * 150; # limit post data
$CGI::DISABLE_UPLOADS = 1; # Disable uploads
$CGI::HEADERS_ONCE = 1; # Kill redundant headers
eval {
($0 =~ m,(.*)/[^/]+,) and unshift (@INC, "$1");
($0 =~ m,(.*)\\[^\\]+,) and unshift (@INC, "$1");
require "data/boardstats.cgi";# Require board stats
};
if ($@) {
print "Content-type: text/html\n\n";
print "Could not find these files: $@\nIf you are running NT you may need to enter the full path in each require statement in each script";
print end_html; exit;
}
$|++; # Unbuffer the output
#################--- Begin the program ---###################
### The HTML before the number of members
$openingHTML = "Total Members: ";
### The HTML after the number of members
$closeingHTML = "";
$thisprog = "totmem.cgi";
$mode = $ENV{'QUERY_STRING'};
print "Content-type: text/html\n\n";
if (lc($mode) eq "java") {
print "document.write('$openingHTML $totalmembers $closeingHTML')";
}
else {
print "$openingHTML $totalmembers $closeingHTML";
}