Annotation of loncom/cgi/plot.gif, revision 1.5
1.5 ! matthew 1: #!/usr/bin/perl
1.1 matthew 2: #
1.5 ! matthew 3: # $Id: plot.gif,v 1.4 2001/12/12 18:36:44 matthew Exp $
1.1 matthew 4: #
5: # Copyright Michigan State University Board of Trustees
6: #
7: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
8: #
9: # LON-CAPA is free software; you can redistribute it and/or modify
10: # it under the terms of the GNU General Public License as published by
11: # the Free Software Foundation; either version 2 of the License, or
12: # (at your option) any later version.
13: #
14: # LON-CAPA is distributed in the hope that it will be useful,
15: # but WITHOUT ANY WARRANTY; without even the implied warranty of
16: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: # GNU General Public License for more details.
18: #
19: # You should have received a copy of the GNU General Public License
20: # along with LON-CAPA; if not, write to the Free Software
21: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22: #
23: # /home/httpd/cgi-bin/plot.gif
24: #
25: # http://www.lon-capa.org/
26: #
1.4 matthew 27:
1.5 ! matthew 28: use strict;
! 29: my $output;
! 30: my $tmpdir = '/home/httpd/perl/tmp/';
! 31: my $filename = $tmpdir . $ENV{'QUERY_STRING'};
1.1 matthew 32:
1.5 ! matthew 33: $output =<<"END";
! 34: Content-type: text/html
1.4 matthew 35:
1.1 matthew 36:
1.5 ! matthew 37: END
1.1 matthew 38:
1.5 ! matthew 39: if (0) {
! 40: $output =<<"END";
! 41: Content-type: image/gif
1.1 matthew 42:
43:
1.5 ! matthew 44: END
! 45: $output .= `gnuplot $filename`;
1.4 matthew 46: }
1.5 ! matthew 47: print $output;
1.1 matthew 48:
49:
50:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>