require 'cgi-lib.pl'; print &PrintHeader; print "
\n"; print "Would you please supply your email address? We want it so that other visitors will be able to respond to your comments. Thanks!"; } if ( ($USEFUL eq "") || ($INTERESTING eq "") ) { print "
Would you please go back and complete the About This Article section on the comment form? Thanks!"; } print "
We're very interested to know who you are and what you think. Thanks for taking the time!"; } else { print "
Please return me to the article $TITLE";} &LogComments; } print "\n"; sub LogComments { opendir(DIR, "bin/cmt") || print "
Can't open bin/cmt"; $num_comments = -3; # skip ".", "..", and "comments.db" while ($cmt = readdir(DIR)) { $num_comments++; } closedir(DIR); $num_comments++; $num_comments = sprintf("%06d",$num_comments); open(CMT, ">bin/cmt/$num_comments.cmt") || print "
Can't create bin/cmt/$num_comments.cmt"; print CMT "\x22$browser\x22,"; print CMT "\x22$ipaddr\x22,"; print CMT "\x22$referer\x22,"; print CMT "\x22$ISSUE\x22,"; print CMT "\x22$SECTION\x22,"; print CMT "\x22$TITLE\x22,"; print CMT "\x22$USEFUL\x22,"; print CMT "\x22$INTERESTING\x22,"; print CMT "\x22$EMAIL\x22,"; print CMT "\x22$REALNAME\x22,"; print CMT "\x22$READBYTE\x22,"; print CMT "\x22$TECHLEVEL\x22,"; print CMT "\x22$INFONEED\x22,"; print CMT "\x22$WANTMORE\x22,"; print CMT "\x22$TEXTCOMMENT\x22\n"; close CMT; }