Closed Thread Icon

Preserved Topic: Perl script to printSHTML? Pages that link to <a href="https://ozoneasylum.com/backlink?for=17803" title="Pages that link to Preserved Topic: Perl script to printSHTML?" rel="nofollow" >Preserved Topic: Perl script to printSHTML?\

 
Author Thread
Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 17:03

I'm hacking up a bulletin board script and I want to use a SSI in part of the script. Is that possible? I can't rename the script forum.shtml cuz then the CGI wouldn't run it right? Here's the snippet of code I'd like to add the SSI to:

#############################################
# common HTML header for all pages
sub printHeader {
my($title) = @_;
print "Content-type: text/html\n\n";
print <<"EOF";
<HTML>
<HEAD>
<TITLE>$title</TITLE>
<STYLE TYPE="text/css">
<!--
.headers {font-family:verdana, Arial, Helvetica, sans-serif; font-size:10pt; font-weight:bold;}
.items {font-family:verdana, Arial, Helvetica, sans-serif; font-size:9pt; font-weight:normal; text-decoration: none;}
.footer {font-family:verdana, Arial, Helvetica, sans-serif; font-size:8pt; font-weight:bold;}
A {Color: #000000; text-decoration: none}
A:visited { color: purple; }
A:hover {Color: blue; text-decoration: none; }
.atop {Color: #000000; font-size: 70%; text-decoration: none;}
.atop:visited {color: #000000; }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#6699FF">
<table width="100%" BORDER=1 CELLSPACING=0 CELLPADDING=0>
<tr><td width="50%" ><span class="headers">$title</span></td><td width="50%" align="right"><!--# echo var="$DATE_LOCAL" --></td></tr>
</table>
<br>
EOF
}

#############################################

Any ideas???

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 17:21

for the mean time I achieved the date request with javascript....

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 17:23

I still would like to be able to use SSI in a Perl script though. Has anyone else been able to???

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 18:11

Is it possible to do to actions with a form submit?

Like post to a bulletin board and send an email when someone hits 'submit'????

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 19:27

Is this the correct syntax?:

<FORM NAME="forum" METHOD=POST ACTION="forum.pl" action="mailer.pl">

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 06-15-2000 22:43

Anyone? Anyone? Bueller? Bueller?

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-15-2000 23:49

Ok I think I answered (or tried to) the question about the 2 actions in the foam CGI post (http://www.ozones.com/forum/Forum2/HTML/000073.html)

but in regards to the include statement, you need to escape the # sign (<!--\#include...) that should do it


Walking the Earth like Kane

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-16-2000 00:29

Ok I think I answered (or tried to) the question about the 2 actions in the foam CGI post (http://www.ozones.com/forum/Forum2/HTML/000073.html)

but in regards to the include statement, you need to escape the # sign (<!--\#include...) that should do it


Walking the Earth like Kane

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 06-16-2000 01:24

Hmm, will that work, or will it just output the HTML and SSI as a comment? Seems to me it'd miss the part where the server got to process it. PERL has a date function you can access, the same one as the UNIX SSI one I belive. I'm not 100% on this, but it seems to me you should be able to just access it as the variable $DATE_LOCAL - the cgi script is already in the process of being processed, so to speak, the variable should be available. Check it out.

Your pal, -doc-<P>

« BackwardsOnwards »

Show Forum Drop Down Menu