As of:  Wed 2017-12-13 03:10:26 UTC  [=1513134626. 22:10:26-05:00]

>> cgi-bin/tables.pl  L: 13,215. A: 100755. M: 2011-10-29 13:50:15 UTC [=1319896215] -2236.55d >> 

#!/usr/local/bin/perl

if (($request_method = $ENV{'REQUEST_METHOD'}) eq "GET") {
    $string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
    read(STDIN, $string, $ENV{'CONTENT_LENGTH'});
} else {
    if ($request_method eq "") {
        $request_method = ".GKW.";
    }
    print "Content-type: text/plain\nStatus: 400 Bad Request\n\nRequest method $request_method not supported.\n$datestamp\n";
    exit (0);
}

@vartab = split(/&/,$string);

foreach $kv (@vartab) {
    ($key, $value) = split(/=/, $kv);	
    $value =~ tr/+/ /;
    $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("C",hex($1))/eg;
    if (defined($INPUT{$key})) {
#	  $INPUT{$key} = join(",", $INPUT{$key},$value);
        print "Content-type: text/plain\nStatus: 400 Bad Request\n\nRecursive entry aborted.\n";
        exit (0);
    } else {
	  $INPUT{$key} = $value;
    }
}

@timelist = gmtime(time());

$date = sprintf("%d.%02d.%02d %02d:%02d:%02d UTC", # Perl bug trunc. last char?
    $timelist[5] + 1900,$timelist[4]+1,$timelist[3],
    $timelist[2],$timelist[1],$timelist[0]);

$filename = $INPUT{filename};
$reel = "";
$sela = " selected";
$selb = "";
$thr = "";
$erasmus = $biblio = "";
$vsp1 = 5;
$dedicate = "";

if ($filename eq "films") {
    $dedicate = "\&nbsp;<font color=navy>This page in memory of Louis Forsdale, <i>film lover</i>.</font><br>\n";
    $reel = "<a href=\"../gone.html\"><img src=\"../gif/reel.gif\" width=17 height=17 hspace=1 align=bottom alt=\"[ Go watch a film! ]\" border=0></a> ";
    $thr = "<tr>\n" .
        "<td><center><a href=\"../gone.html\"><img src=\"../sq/emptyTheater.jpg\" border=1 alt=\"[ Please be seated and watch the show! ]\" hspace=4 height=76 width=184></a></center></td></tr>\n" .
        "<tr><td><img src=\"../sp.gif\" height=2 width=2 border=0 alt=\"[ ]\" vspace=9></td></tr>";
</tr>
} elsif ($filename eq "music") {
    $reel = "<a href=\"../etc2.html#LandF\"><img src=\"../gif/music.gif\" width=25 height=31 hspace=1 align=bottom alt=\"[ Learn why orchestral and choral music is unfit for free persons! ]\" border=0></a> ";
} elsif ($filename eq "people") {
    $reel = "<a href=\"../etc2.html#BB\"><img src=\"../gif/star9.gif\" width=32 height=32 hspace=1 align=bottom alt=\"[ Neither leaders nor followers! No stars except in the sky! ]\" border=0></a> ";
} elsif ($filename eq "ads") {
    $reel = "<a href=\"../AmCulture.html\"><img src=\"../gif/united_states.gif\" width=24 height=17 hspace=1 align=bottom alt=\"[ Learn more about American 21st century middle-class folkways! ]\" border=0></a> ";
} elsif ($filename eq "books") {
    $sela = "";
    $selb = " selected";
    $reel = "<a href=\"../sgmlnote.html\"><img src=\"../gif/book09.gif\" width=33 height=29 hspace=1 align=bottom alt=\"[ Learn about SGML! ]\" border=0></a> ";
    $erasmus = "\n<tr><td><img src=\"../sp.gif\" height=2 width=2 border=0 alt=\"[ ]\" vspace=5></td></tr>\n" .
               "<tr><td align=center><table cellspacing=0 cellpadding=0 border=0><tr><td bgcolor=\"#DCDCDC\"><table cellspacing=4 cellpadding=0 border=1><tr><td bgcolor=silver><a href=\"../sq/erasmus.html\"><img src=\"../sq/erasmus.jpg\" height=250 width=207 alt=\"[ Erasmus of Rotterdam, writing.... ]\" border=0 hspace=1 vspace=1></a></td>\n" .
               "</tr></table></td></tr></table></td></tr>";
    $vsp1 += 5;
    $biblio = "\n<tr><td colspan=2 align=left><big>\&nbsp;<br>\n" .
              "<a href=\"../bibliography.html\">Go</a>/<a href=\"../bibliography.html\">Return</a> to <i>BMcC</i> dissertation bibliography.</big></td></tr>";
} elsif ($filename ne "art" && $filename ne "ads" && $filename ne "media" && $filename ne "acronyms" &&
        $filename ne "wishlist" && $filename ne "food") {
    print "Content-type: text/plain\nStatus: 400 Bad Request\n\nInvalid input.\n";
    exit (0);
}

$filename .= ".inc"; 
if (!open(IN, "../sgml/".$filename)) {
    print "Content-type: text/plain\nStatus: 400 Bad Request\n\nOpen failed for $filename\n";
    exit (0);
}
@fileInfo = stat IN;
@timelist = gmtime($fileInfo[9]);
$upDate = sprintf("%d.%02d.%02d %02d:%02d:%02d UTC", # Perl bug trunc. last char?
    $timelist[5] + 1900,$timelist[4]+1,$timelist[3],
    $timelist[2],$timelist[1],$timelist[0]);

for (;;) {
    if (($line = <IN>) eq "") {
        print "Content-type: text/plain\nStatus: 400 Bad Request\n\nFile header missing.\n";
        close(IN);
        exit (0);
    }
    if ($line =~ /<table\s*desc="([^"]*)"\s*version="([^"]*)"/i) {
        $type = $1;
        $version = " (" . $2 . ")";
        last;
    } elsif ($line =~ /<table\s*desc="([^"]*)"/i) {
        $type = $1;
        $version = "";
        last;
    }
}

print <<"EOFEOF";
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>$type (SGML data converted to HTML)</title>
<META NAME="description" CONTENT="${type}. Tell me yours!
(Web page generated by converting SGML source into HTML.)">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="../textured_paper.jpg"><center><table cellspacing=0 cellpadding=0 width="90%" border=0>$erasmus
<tr><td><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=${vsp1}></td></tr>$thr
<tr><td align=center><table cellspacing=0 cellpadding=3 border=0>
<tr><td bgcolor="#D3D3D3"><font color=navy><big><big>${reel}<b>Contents of <a href="../sgmlnote.html">SGML</a> "$type" table</b></big></big></font></td>
</tr></table></td></tr>
<tr><td><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=5></td></tr>
<tr><td align=center><table cellspacing=0 cellpadding=2 border=0>
<tr><td bgcolor="#D3D3D3"><big><b><i>as of</i>&nbsp; $date</b></big></td></tr></table></td></tr>
<tr><td><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=7></td></tr></table>
<table cellpadding=0 cellspacing=0 border=0 width="94%">
<tr><td><center><table cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#DCDCDC"><table cellpadding=4 cellspacing=2 border=1>
EOFEOF

$body = "";
while (($line = <IN>) ne "") {
    $body .= $line; 
    if ($line =~ /<\/table>/i) {
        last;
    }
}
close(IN);

if ($filename eq "art.inc") {
    $body =~ s/\<\!\-\- n1 \-\-\>/\`/s;
}

$body =~ s/<(\/?)r>/<$1tr>/gis;
$body =~ s/<c>([^<]*)<\/c>/<td align=left bgcolor="#FFFFF0" valign=top>$1<br><\/td>/gis;
$body =~ s/<c\s+em=head>([^<]+)<\/c>/<td align=left bgcolor="#FFEBCD" valign=bottom><font color=blue><big><b>$1<\/b><\/big><\/font><br><\/td>/gis;
$body =~ s/<c\s+em=bold>([^<]+)<\/c>/<td align=left bgcolor="#FFF8DC" valign=top><b>$1<\/b><br><\/td>/gis;
$body =~ s/<c\s+em=red>([^<]+)<\/c>/<td align=left bgcolor="#FFFFF0" valign=top><font color=red><b>$1<\/b><\/font><br><\/td>/gis;

if ($filename eq "art.inc") {
    $body =~ s/\`/<font color=blue>[<i><a href=\"..\/footnotes3.html#fn77\">Please see footnote #77<\/a><\/i>]<\/font>/s;
}

print $body;

print <<"EOFEOF"; 
</td></tr>
<tr><td align=right><table cellspacing=0 cellpadding=2 border=0>
<tr><td bgcolor="#D3D3D3" align=right><font color=green>${dedicate}\&nbsp;<i>List last updated: ${upDate}</i>.</font></td>
<td><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]"></td></tr>
</table></td></tr></table></center></td></tr>
<tr><td><big><big>&nbsp;</big></big></td></tr></table></center>
<table cellspacing=0 cellpadding=0 border=0>
<tr><td valign=top><form action="http://www.users.cloud9.net/~bradmcc/cgi-bin/tables.pl" method=GET><table cellspacing=0 cellpadding=3 border=0>
<tr><td bgcolor="#D3D3D3"><big><i><big>S</big></i>ee my favorite <select name="filename" size=1>
<option value="books"${sela}>books and essays
<option value="films"${selb}>films
<option value="art">works of art
<option value="music">music
<option value="media">TV programs
<option value="ads">advertising slogans
<option value="food">foods and beverages
<option value="people">famous people
<option value="wishlist">things I'd like to have
<option value="acronyms">acronyms
</select> <input type="submit" name="sub" value="Go"></big></td></tr></table></form></td>
<td><big><big>&nbsp;<br>
&nbsp;</big></big></td></tr></table>
<table cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#FFFFF0"><table cellspacing=0 cellpadding=3 border=0>
<tr><td bgcolor="#FFF8DC"><big><a href="mailto:bradmcc\@cloud9.net"><img src="../emailme.gif" border=0
align=bottom height=12 width=20 hspace=2 alt="[ Email me! ]"></a> Please share <i>your</i>
favorites with me!</big></td></tr></table></td>
<td valign=middle align=left><a href="mailto:bradmcc\@cloud9.net"><img src="../gif/email.gif"
height=17 width=36 alt="[ Email me! ]" border=0></a></td></tr></table>
<table cellspacing=0 cellpadding=0 border=0 width="100%">$biblio
<tr><td valign=bottom><big>&nbsp;<br>
<a href="../sitetoc.html">Go</a> to website <i>Table of Contents</i>.<br>
<a href="../welcome.html">Return</a> to Brad McCormick's home page.<br>
<a href="../Bradsmap.html#m0">Return</a> to site map.</big></td>
<td align=right valign=bottom><table cellspacing=0 cellpadding=0 border=0>
<tr><td rowspan=2><img src="../sp.gif" height=2 width=2 hspace=3 alt="[ ]" border=0></td>
<td valign=bottom><a href="../Bradsmap.html"><img src="../signpost.gif" height=32 width=33 border=0 alt="[ Go to Site Map! ]"></a></td>
<td><img src="../sp.gif" height=2 width=2 hspace=11 alt="[ ]" border=0></td>
<td valign=bottom><a href="../sitetoc.html"><img src="../gif/up_black.gif" vspace=1 height=16
width=16 border=1 alt="[ Go to website Table of Contents! ]"></a></td>
<td><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" hspace=20></td>
<td rowspan=2 valign=bottom><a href="../welcome.html"><img src="../gif/home.gif" height=32 width=32 vspace=1 hspace=1 border=0 alt="[ Go home! (BMcC website Home page!) ]"></a></td>
<td rowspan=2><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" hspace=3></td></tr>
<tr><td colspan=4><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=1></td></tr>
</table></td></tr></table>
<hr>
<table cellspacing=0 cellpadding=0 border=0 width="100%">
<tr><td valign=top nowrap><address><font color="#006400">page generated by http://www.cloud9.net/~bradmcc/cgi-bin/<a href="ascii.pl?f=cgi-bin/tables.pl">tables.pl</a><br>
<a href="../copyright.html">Copyright &copy;</a> 1998-2003 Brad McCormick, Ed.D.<br>
bradmcc\@cloud9.net <a href="../signgb.html"><img src="../gif/email2me.gif" border=0 align=bottom height=10 width=15 alt="[ Email me! ]"></a><br>
08 April 2006 (2006-04-08 <a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO 8601</a>)<br>
v11.04${version}</font></address></td>
<td><img src="../sp.gif" height=2 width=2 alt="[ ]" hspace=4 border=0></td>
<td valign=top align=right><table cellspacing=0 cellpadding=0 border=0>
<tr><td align=right colspan=3><a href="http://validator.w3.org/check/referer"><img src="../valid_html4_01.gif"
border=0 hspace=2 vspace=2 alt="[ Loose HTML 4.01 Checked! Test me! ]" height=31 width=88></a></tr>
<tr><td colspan=3><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=10></td></tr>
<tr><td valign=middle><a href="../sgmlnote.html"><img src="../gif/sgml.gif" height=32 width=32 alt="[ Learn about SGML! ]" border=0></a></td>
<td><img src="../sp.gif" height=2 width=2 alt="[ ]" hspace=4 border=0></td>
<td><a href="../yuriObit1.html"><img src="../gif/iyuri.gif" align=right height=80 width=59 hspace=2 border=0 alt="[ Go to Yuri Rubinsky memorial WEB site! ]"></a></td>
</tr>
<tr><td colspan=3><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=13></td></tr>
<tr><td colspan=3 align=right><a href="../ComeIn.html"><img src="../gif/door2.gif" height=32 width=32 hspace=3 border=0 alt="[ Welcome to my website! Please come in! ]"></a></td></tr>
</table></td></tr>
EOFEOF
print "<tr><td align=left>";

$fPfx = "/home/users/bradmcc/public_html/cgi-bin/";
$file = "${fPfx}multictr9";
$exc_lock = 2;
$now = time();

$err = "";
if (!open(CTR,"< $file")) {
    $err = "noOpen";
} else {
    flock(CTR, $exc_lock);
    read (CTR, $v, 5000);
    close(CTR);
    if (length($v) < 20) {
        $err = "x" . length($v);
    } else {
        if ($v !~ s/^favs (\d+)\.(\d+)\.(\d+)$/sprintf("%s %d.%d.%d","favs",(1+$1),$2,$now)/em) {
            $v .= "favs 1.$now.$now\n";
            $count="???";
        } else {
            $count = $1;
        }
        if ($ENV{'REMOTE_HOST'} =~ /^(205\-126\.dialup\.cloud9\.|ool\-4a59bb0a\.dyn\.optonline\.|slip\-12\-64\-\d+\-\d+\.mis\.prserv\.net$|server\.htmlhelp\.com|w3c5\.inria\.fr)|\.w3\./) {
            $count =~ s/(\d)(\d{3})$/$1,$2/;
            print "<font color=red>[<b>9:${count}</b>]</font>";
        } elsif (length($v) < 3000 && open(CTR,"> $file")) {
            flock(CTR, $exc_lock);
            print CTR "$v";
            close(CTR);
        } else {
            $err = "Nowrite-" . length($v);
        }
    }
}
if ($err ne "") {
   if (open(ER, ">> ${fPfx}GKW")) {
      if ((-s ER) < 20000) {
         flock(ER, $exc_lock);
         print ER "tables $err\n";
      }
      close(ER);
   }
}
print <<"EOFEOF";
<small><small>&nbsp;</small></small></td>
<td colspan=2><img src="../sp.gif" height=2 width=2 border=0 alt="[ ]" vspace=4></td></tr>
</table></body>
</html>
EOFEOF

exit(0);

<< cgi-bin/tables.pl  L: 13,215. A: 100755. M: 2011-10-29 13:50:15 UTC [=1319896215] -2236.55d <<

[ Please note: ]  Some systems do not provide this script with a return address (the HTTP_REFERER cgi environment variable). In those cases, the "Return" icon at right is disabled, but you can still use your web browser's BACK button to return to the page from which you came to here. I apologize. Thank you for your understanding.

Page generated by:
http://www.users.cloud9.net/~bradmcc/cgi-bin/ascii.pl?f=cgi-bin/tables.pl
Copyright © 2001-2005 Brad McCormick, Ed.D.
bradmcc@cloud9.net [ Email me! ]
26 April 2008CE
v10.05
[ ]
[ ]
[ Notice what's hiding in plain sight! ] [ ]
[ ] [ ]
[ Go home! (BMcC website Home page!) ] [ ] [ Use your web browser's BACK button to return to page from which you linked to here! ] [ ]
[ ]
[ Go to Site Map! ] [ ] [ HTML 3.2 Checked! Test me! ] [ ]
[ ]
[ ]
[ Go to website Table of Contents! ] [ ] [ Welcome to my website! Please come in! ]
[ ]
[ ]