32,781
articles
November 21, 2008
557,299
postings
#!/usr/local/bin/perl
$input_file = "";
$output_dir = "/mnt/web/guide/goofball/deadpool/files/";
$players_dir = "/mnt/web/guide/goofball/deadpool/players/";
$name_file = "person_data.txt";
$standings_file = $output_dir."standings.txt";
$master_file = $output_dir."masterfile.txt";
$url = "/deadpool/cgibin/deadpool.cgi";
$domain = "http://www.goofball.com";
$sysop_email = "coroner\@goofball.com";
$start_page = ""; #tournament_page.html";
require "../../cgibin/shared-lib.pl";
&create_standings;
exit;
############################################################################
sub create_standings #10/15/97 12:21PM
############################################################################
{
#print "Content-type: text/html\n\n";
open (FILE, "$master_file");
@LINES = ;
close (FILE);
my $entry_file = $output_dir.$name_file;
open (FILE, "$entry_file");
@entries = ;
close (FILE);
foreach $line (@LINES) {
$line =~ s/\n//g;
if ( $line ne '' ) {
push @results, $line;
}
}
chdir($players_dir);
#$ls = `ls $file`;
$ls = `dir *.*`;
@ls = split(/\s+/,$ls);
foreach $temp_file (@ls) {
if (-d $file) {
$filename = "$file$temp_file";
if (-T $filename) {
push(@FILES,$filename);
}
} elsif (-T $temp_file) {
push(@FILES,$temp_file);
}
}
foreach $data_file (@FILES) {
open (DATA, $data_file);
@LINES = ;
close (DATA);
my(@user_results);
foreach $line (@LINES) {
$line =~ s/\n//g;
if ( $line ne '' ) {
push @user_results, $line;
}
}
open (RESULTS, ">>$standings_file");
$score = 0;
$count = 0;
$total_score = 0;
foreach $item (@user_results) {
#$item = s/\n//g;
($name,$score) = split(/;/,$item);
if ($score) {
$total_score = $total_score + $score;
}
}
if (!($total_score)) {
$total_score = 0;
}
print RESULTS "$total_score=$data_file\n";
}
close (RESULTS);
open (LIST, "$standings_file");
@LINES = ;
close (LIST);
print "Content-type: text/html\n\n";
my $body .= "\n";
$body .= "1999 DeadPool Standings: \n";
$body .= "(Select the Players Link to view Picks) \n";
foreach $data (@LINES) {
($item,$junk,$junk2) = split(/=/, $data);
push @score, $item;
}
@sortedlines = @LINES[sort (order (0..$#LINES))];
$body .= "\n";
$body .= "Rank Player Score \n";
$rank = 1;
$prev_score = 0;
foreach $rec (@sortedlines) {
($score, $player) = split(/=/, $rec);
foreach $entry (@entries) {
($name, $em) = split(/\|/, $entry);
if ($player =~ /$em/ig) {
$player = $name;
last;
}
}
$url_str = $url."?email=".$player;
$url_str2 = "function=view";
$body .= "\n";
$body .= "";
#we dont want to rank a person lower if they are tied for a place in the standings.
if ( $score ne $prev_score ) {
$body .= "$rank ";
}
$body .= " ";
$body .= " $score[$a];
}
Features
2008 Deadpool
Don't miss out ... If you are a Goofballer, it's free. If you are not ... become a Goofballer!
12.09.2007
Caption Contest - December 2006
Check out the silly picture below, give us a funny, witty, original caption and be in the running for a free ...
12.05.2006
Goofball Facts
Acrotomophilia is a sexual attraction to amputees.