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

$home = "/usr/local/e-cron";
$jobnet = param("jobnet");
$project = param("project");
@server = param("server");

print "Content-type: text/html\n\n";
###############contents insert#########
system("cat ../elements/header");
print "&nbsp;&nbsp;&nbsp;<a href=\"./set_jobnet_form.cgi?${project},${jobnet}\">Back to jobnet setting</a>";

# change status
print "<br></br>";
print "<div style=\"padding-left:12px;\">";
print "<pre>";

unless(@server){
  print "No server was cheked !";
}

foreach $server ( @server ) {
    print "<a href=\"./ls_log.cgi?${project},${jobnet},${server}\">${server} Log</a>";
    system("sudo -u ejobmgr $home/bin/run_jobnet $project/$jobnet $server");
} 
print "</pre>";
print "</div>";
system("cat ../elements/footer");

