permission mods
[feisty_meow.git] / scripts / cgi / cgi_display.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : cgi_display                                                       #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 1996-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Spews the given file out as a CGI-interpretable text file.               #
12 #                                                                             #
13 ###############################################################################
14 # This program is free software; you can redistribute it and/or modify it     #
15 # under the terms of the GNU General Public License as published by the Free  #
16 # Software Foundation; either version 2 of the License, or (at your option)   #
17 # any later version.  See: "http://www.gruntose.com/Info/GNU/GPL.html" for a  #
18 # version of the License.  Please send any updates to "chris@gruntose.com".   #
19 ###############################################################################
20
21 print "Content-type: text/plain\n\n";
22
23 # isolate the file showing capability to our web sites.
24 local($file) = "/var/www/" . $ENV{'QUERY_STRING'};
25 open(TO_READ, "<" . $file) || die "Could not open $file for reading.";
26 foreach $line (<TO_READ>) { print $line; }
27
28 exit 1;
29