Hello all: Here is a question I am tackling for a Friend and if anyone could point me to a resource or the proper answer I would greatly appreciate it. This code is running on a server of a friend
A Perl script that creates a web page renders correctly in Netscape , Mosilla , Opera and Konqueror . It produces a error when rendered in Internet Explorer . In Explore it generates either a "you don't have premissions to view this page" or it renders it as plain text code. The server is Apachy on a Linux box . It's straight Perl , coded in the older stile of "here Documents" using regular HTML tags. the page in question is at www.1anchorsaway.com if you care to take a look at it . I have a feeling thats it's a browser issue but what and how to correct I have no clue . heres the code: it's not mine as I would use CGI.PM and I don't copyright my Perl code. # ########################################### Begin code ####################### #!/usr/bin/perl # # Copyright 1998, ITM Services # http://www.itm.com/ # Written by Melissa Niles ([EMAIL PROTECTED]) # # Project information: # Lisa Wehr # Alaska Web Art http://www.akwebart.com/ # Anchors Away v1.0 $|=1; if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } if ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $contents{$name} = $value; } print "Content-type: text/html\n\n"; $database = "$contents{'p'}/database.txt"; $locations = "$contents{'p'}/locations.txt"; $desc_frame_top = "$contents{'p'}/desc_frame_top"; $desc_frame_bottom = "$contents{'p'}/desc_frame_bottom"; if($contents{'f'} eq "v") { &list_descriptions; } elsif($contents{'f'} eq "m") { &list_months; } elsif($contents{'f'} eq "d") { &list_deals; } sub list_descriptions { open(FILE, "$desc_frame_top"); @lines = <FILE>; close(FILE); print @lines; $cnt=0; open(FILE, "$database"); @lines = <FILE>; close(FILE); @lines = sort {$a <=> $b} @lines; foreach $line (@lines) { unless ($line =~ /^month/) { $line =~ s/\n//g; @f = split(/\t/, $line); if ($contents{'c'} && $f[0] == $contents{'c'}) { if ($f[2] eq $contents{'d'}) { if ($f[1] == $contents{'y'}) { &print_item; } } } if ($contents{'n'} && $f[0] == $contents{'n'}) { if ($f[2] eq $contents{'d'}) { if ($f[1] == $contents{'y'}) { &print_item; } } } } } if ($cnt == 0) { print "I'm sorry, there's nothing available here.\n"; } open(FILE, "$desc_frame_bottom"); @lines = <FILE>; close(FILE); print @lines; } sub print_item { print <<"HTML"; <br> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="21%"><img src="$contents{'p'}/graphics/$f[3]" border="2"></td> <td width="79%"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">$f[4]</font></b></td> </tr> <tr> <td width="21%" colspan="2"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">$f[7] </font></td> </tr> <tr> <td width="21%"><b><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Price: \$$f[5] </font></b></td> <td width="79%"><b><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Dates: $f[6]</font></b></td> </tr> </table> <br> <hr noshade size="1" width="95%"> HTML $cnt++; } sub list_deals { print <<"HTML"; <html> <head> <title>Untitled Document</title> </head> <body bgcolor="#000000" link="#E4E4E4" vlink="#FFFFCC" text="#FFFFFF" alink="#000000"> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center" vspace="0" hspace="0"> <tr> <td bgcolor="#000000" align="center"> <font face="Book Antiqua, Times New Roman" color="#FFFFCC" size="-1">HOT <br>DESTINATIONS</font> <hr noshade size="1" width="100%"> </td> </tr> HTML open (FILE, "$database"); @lines = <FILE>; close(FILE); foreach $line (@lines) { $line =~ s/\n//g; @f = split(/\t/, $line); if ($contents{'c'} && $f[0] == $contents{'c'}) { if ($f[1] == $contents{'y'}) { push(@places, "$f[2]"); } } if ($contents{'n'} && $f[0] == $contents{'n'}) { if ($f[1] == $contents{'y'}) { push(@places, "$f[2]"); } } } @places = sort {$a cmp $b} @places; foreach $line (@places) { unless ($old eq $line) { $link = $line; $link =~ s/ /+/g; print <<"HTML"; <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href="anchor.cgi?p=$contents{'p'}\&d=$link\&f=v\&c=$contents{'c'}\&n=$content s{ 'n'}\&y=$contents{'y'}" target="cruise_body">$line</a> </font></td> </tr> HTML $old = $line; } } print <<"HTML"; <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> </body> </html> HTML } sub list_months { chop($cyear = `date +%Y`); if ($contents{'y'}) { $year = $contents{'y'}; } else { $year = $cyear; } chop($month = `date +%m`); print <<"HTML"; <html> <head> <title>Untitled Document</title> </head> <body bgcolor="#000000" text="#FFFFFF" link="#E4E4E4" vlink="#FFFFCC" alink="#000000"> <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000" align="right" vspace="0" hspace="0"> <tr> <td bgcolor="#000000" align="center"> <font color="#FFFFCC" face="Book Antiqua, Times New Roman" size="-1">MONTH</font> <hr noshade size="1" width="100%"> </td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFCCFF"><b>Year: $year HTML if ($year == $cyear) { print <<"HTML"; <br><img src="graphics/arrow.gif" width="6" height="11"> <font color="#FFFFFF"> <a href=\"anchor.cgi?c=$month\&y=$year\&p=$contents{'p'}\&f=d\" target=\"cruise_list\">Current</a> </font> HTML } print <<"HTML"; </b></font></td> </tr> <tr> <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-1" color="#FFFFFF"> <a href=\"anchor.cgi?c=01\&n=02\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">Jan. / Feb.</a> </font></td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href=\"anchor.cgi?c=03\&n=04\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">Mar. / Apr.</a> </font></td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href=\"anchor.cgi?c=05\&n=06\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">May / Jun.</a> </font></td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href=\"anchor.cgi?c=07\&n=08\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">Jul. / Aug.</a> </font></td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href=\"anchor.cgi?c=09\&n=10\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">Sep. / Oct.</a> </font></td> </tr> <tr> <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> <a href=\"anchor.cgi?c=11\&n=12\&y=$year\&p=$contents{'p'}\&f=d\" target="cruise_list">Nov. / Dec.</a> </font></td> </tr> <tr><td>\ </td></tr> HTML if ($cyear < $year) { $lyear = $year-1; print "<tr><td><font size=\"-1\" face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#FFFFFF\"><a href=\"anchor.cgi?p=$contents{'p'}&f=m\&y=$lyear\">Previous Year</a></font></td></tr>\n"; } $nyear = $year+1; print "<tr><td><font size=\"-1\" face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#FFFFFF\"><a href=\"anchor.cgi?p=$contents{'p'}&f=m\&y=$nyear\">Next Year</a></font></td></tr>\n"; print <<"HTML"; </table> </body> </html> HTML } ######################### end code ####################### Thanks for any help Greg Jetter [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]