You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
531 B
24 lines
531 B
#!/usr/bin/perl
|
|
#
|
|
# $Id: image.pl,v 1.3 2004/03/22 09:45:04 jeffo Exp $
|
|
#
|
|
# Source File: image.pl
|
|
|
|
require 'sitecfg.pl';
|
|
require 'testlib.pl';
|
|
|
|
&app_initialize;
|
|
|
|
if (&get_session($FORM{'tid'})) {
|
|
$imgfile = join($pathsep, $testgraphic, $FORM{'img'});
|
|
@filesegs = split(/./, $FORM{'img'});
|
|
$fext = $filesegs[$#filesegs];
|
|
print "Content-Type: $CONTENT_TYPES{$fext}\n\n";
|
|
open (IMGFILE, "<$imgfile");
|
|
binmode(IMGFILE);
|
|
$fsize = (stat(IMGFILE))[7];
|
|
read(IMGFILE, $img, $fsize);
|
|
close IMGFILE;
|
|
binmode(STDOUT);
|
|
print $img;
|
|
}
|
|
|