#!/usr/bin/perl -w require "../../cgi-lib.pl"; ReadParse(*in); $openbr="<"; $closebr="&rt;"; # $listing=`./allhtml.pl`; #this script outputs a list of all my html #files. if($in{html){ if ($in{html} =~ /^([-\@\w.]+)$/) { $filename = $1; } else { die "Bad data in $in{html}"; } open(LINKPAGE, $filename); $filesize = -s LINKPAGE; read(LINKPAGE, $wholepage, $filesize); $wholepage=~s/</$openbr/g; $wholepage=~s/>/$closebr/g; print "Content-type: text/html\n\n"; print "<HTML><BODY><PRE>"; print "<FONT size = 5><Center>"; print $in{html}; print "</Center></FONT><BR>"; print "$wholepage <BR><BR>"; } print $listing; print "<!--Written by Joseph Harnish--><A HREF=\"http://www.csis.gvsu.edu/~harnisjl\">Big Joe </A></PRE><BR><BR><BR>\n\n <FORM NAME=\"myForm\" ACTION=\"html2code.pl\" METHOD=\"POST\"> <TABLE CELLPADDING=2 CELLSPACING=0> <TR><TD WIDTH=50>File name:</TD><TD><INPUT TYPE=TEXT NAME=\"html\" SIZE=\"30\"></TD></TR> </TD> <TR><TD COLSPAN=2><INPUT TYPE=SUBMIT VALUE=\"View\"></TD></TR> </TABLE> </FORM> </BODY></HTML>"; close(LINKPAGE); exit;
In reply to Code Viewer by BigJoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |