--- loncom/interface/printout.pl 2003/10/16 15:30:43 1.38 +++ loncom/interface/printout.pl 2003/10/20 17:39:30 1.39 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.38 2003/10/16 15:30:43 sakharuk Exp $ +# $Id: printout.pl,v 1.39 2003/10/20 17:39:30 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,12 +26,36 @@ # http://www.lon-capa.org/ # +use lib '/home/httpd/lib/perl'; +use LONCAPA::loncgi(); use File::Path; use IO::File; use Image::Magick; + +if (! &LONCAPA::loncgi::check_cookie_and_load_env()) { + print < +Bad Cookie + +Your cookie information is incorrect. What\'s up with that? + + +END + return; +} + print "Content-type: text/html\n\n"; print "\n"; - my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'}); +#### my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'}); + +my $identifier = $ENV{'QUERY_STRING'}; +my $texfile = $ENV{$identifier.'.file'}; +my $laystyle = $ENV{$identifier.'.layout'}; +my $numberofcolumns = $ENV{$identifier.'.numcol'}; +my $selectionmade = $ENV{$identifier.'.selection'}; + my $advans_role=0; if ($selectionmade>=10000) {$selectionmade=$selectionmade/10000; $advans_role=1;} my $figfile = $texfile;