$msg"; exit(0); } // // TODO: set this variable from $_POST // // Check HTTPS auth and obtain user ID $user_dn = NULL; $user_ca = NULL; if (isset ($_SERVER['HTTPS'])) { if ( isset ($_SERVER['SSL_CLIENT_VERIFY']) ) { if ($_SERVER['SSL_CLIENT_VERIFY'] == "SUCCESS") { if (isset ($_SERVER['SSL_CLIENT_S_DN'])) $user_dn = $_SERVER['SSL_CLIENT_S_DN']; if (isset ($_SERVER['SSL_CLIENT_I_DN'])) $user_ca = $_SERVER['SSL_CLIENT_I_DN']; } else { exit_failed("Client certificate authentication has filed."); } } } if (is_null($user_dn)) exit_failed("Client certificate authentication is required to use this service"); // Return jobs statuses [ jobID => status string ] $running_jobs = array (); $finished_jobs = array (); $jdh = opendir( ITS_JOBDIR ); while ( $jobid = readdir ($jdh) ) { if ( ! is_dir(ITS_JOBDIR . $jobid) ) continue; $status = trim(file_get_contents(ITS_JOBDIR . $jobid . '/status')); $status_info = trim(file_get_contents(ITS_JOBDIR . $jobid . '/status.info')); if ($status >= 3 ) { $finished_jobs[$jobid] = $status_info; } else { $running_jobs[$jobid] = $status_info; } } // TODO: handle visualisation in Bootstrap ?>