#!/usr/bin/perl
use CGI qw(param);

$home="/usr/local/e-cron";
$string = $ENV{'QUERY_STRING'};
$string =~s/\///g ;
$project =`echo $string | awk -F\",\" '{print \$1}'`;
$project =~s/\s//g ;
$jobnet =`echo $string | awk -F\",\" '{print \$2}'`;
$jobnet =~s/\s//g ;
$file_name =`echo $string | awk -F\",\" '{print \$3}'`;
$file_name =~s/\s//g ;

###############contents insert#########
print "Content-type:application/octet-stream; name=\"$file_name\"\n";
print "Content-Disposition: attachment; filename=\"$file_name\"\n\n";
open(IN,"/${home}/project/${project}/${jobnet}/bat/${file_name}");
print <IN>;
close( IN );
