$msg"; exit(0); } // // TODO: set this variable from $_POST // $object_name="Test object"; $seq_fasta="MKMRFFSSPCGKAAVDPADRCKEVQQIRDQHPSKIPVIIERYKGEKQLPVLDKTKFLVPDHVNMSELVKI IRRRLQLNPTQAFFLLVNQHSMVSVSTPIADIYEQEKDEDGFLYMVYASQETFGFIRENE"; $email_result=True; $email_address="manf@grid.org.ua"; // END of variables declaration // Variable check (TODO) if ( ! $email_result ) $email_address = ""; // 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"); // Generate job UUID $job_uuid = md5( microtime() . $user_dn ); // Create job directory $job_dir = ITS_JOBDIR . $job_uuid; mkdir($job_dir, 0750); // Save files in job directory file_put_contents($job_dir . '/seq.fasta', $seq_fasta); file_put_contents($job_dir . '/status', "0"); // Dump parameters needed for submittor $cvalue = 'constant'; $job_params = <<