A zzzzzz in the expanding time
@
http://www.yummybaby.force9.co.uk/artistofthecentury/aotc.htm
(Works only with Netscape version 4.0 or later.)
#!C:/Perl/bin/perl
# where perl is on your server !!*!!
# CONFIGURATION (MODIFY THIS SECTION)
# place the absolute path to your message file
# here (include a trailing slash).
# examples - $filepath='C:/Progra~1/Xitami/webpages/aotc/read/'; !!*!!
# $filepath='/files/home/yummybaby/cgi-bin'
$filepath='full_path';
# place the file extention of your artists of the century messages file
# here, including the dot. It is probably .htm or .html
!!*!!
$filext='.htm';
# read in the form data and initialize page
print "Content-type: text/html\nPragma: no-cache\n\n";
&get_form_data;
# write the file in ascending order, change the order by replacing 0 with 1
!!*!!
$the_order=0;
# check for old versions
$cccpop{'read'} =~ s/\W//g;
unless (open(HTMLOLD, "$filepath$cccpop{'read'}$filext"))
{
die 'The following room does not exist on this server: ';
}
@lines=<HTMLOLD>;
close(HTMLOLD);
# change colors, title name etc.. !!*!!
print "<html><head><title>artists of the century</title><SCRIPT
SRC='all.js'></script></head><BODY BGCOLOR=\#FFFFFF TEXT=\#999999
LINK=\#333333 VLINK=\#333333 ALINK=\#CCCCCC>\n";
#
# output the new messages with layers and pre named A HREFS !!*!!
# correct the paths in the following script
!!*!!
if ($cccpop{'message'} ne "") {
$newmessage = "<LAYER ID=lyr0 LEFT=30 TOP=300 visibility='show'
onMouseOut='if(window.visual) window.visual.unSetDrag(this);'
onMouseOver='if(window.visual) window.visual.setDrag(this, null);'><A
HREF='../path/to/aotc.txt' TARGET='NEW'><font
point-size='10pt'>\<P\>\<B\>$cccpop{'makethis'}<\A>$cccpop{'artists'} <
A HREF='../path/to/2000.txt' TARGET='NEW'>$cccpop{'message'}
</B\>\</font></A></layer>\n";
open (NEW, ">$filepath$cccpop{'read'}$filext");
print NEW '<html><head><title>artists of the century</title><SCRIPT
SRC="all.js"></script><BODY TEXT="#999999" BGCOLOR="#FFFFFF" LINK="#333333"
VLINK="#333333" ALINK="#CCCCCC" onLoad="cEnd()">';
print NEW "\n";
if ($the_order) {
print NEW $newmessage;
print $newmessage;
for ($i = 1; $i < 2000; $i++) ## 2000 enteries max
!!*!!
{
print NEW "$lines[$i]";
print "$lines[$i]";
}
}
else {
for ($i = 2; $i < 2001; $i++) ## 2000 enteries max
!!*!!
{
print NEW "$lines[$i]";
print "$lines[$i]";
}
print NEW $newmessage;
print $newmessage;
print '</BODY>';
}
print NEW "\n";
close(NEW);
}
else {
for ($i = 1; $i < 2001; $i++) ### 2000 enteries max !!*!!
{
print "$lines[$i]";
}
}
print "</font></body></html>\n";
exit 0;
#############################################################
# useful and needed tasks !!*!!
sub get_form_data {
$buffer = "";
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$buffer);
foreach $pair (@pairs)
{
@a = split(/=/,$pair);
$name=$a[0];
$value=$a[1];
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$value =~ s/\+/ /g;
$value =~ s/\r//g;
push (@data,$name);
push (@data, $value);
}
%cccpop=@data;
%cccpop;
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|