#!/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 ;
$server =`echo $string | awk -F\",\" '{print \$3}'`;
$server =~s/\s//g ;
$log =`echo $string | awk -F\",\" '{print \$4}'`;
$log =~s/\s//g ;

print "Content-type: text/html\n\n";
###############contents insert#########
system("cat ../elements/header");
print "<h3>${project}::${jobnet}::${server} ${log}</h3>";
print "<pre>";
system("sudo -u ejobmgr /usr/local/e-cron/bin/for_cgi/cat_log ${project}/${jobnet} ${server} ${log}");
print "</pre>";
system("cat ../elements/footer");
