コード例 #1
0
ファイル: index.php プロジェクト: hisapi/his
 $prop["id_status"] = 'new';
 $prop["id_hf"] = $qn;
 $prop["dt_created"] = $this_time;
 $prop["dt_modified"] = $this_time;
 $prop["str_rqdata"] = $rd;
 $prop["str_response"] = 'undefined';
 $prop["str_output"] = 'undefined';
 $new_job_id = new job_id_user();
 $new_job_id->create($prop);
 $prop = array();
 $prop["id_user"] = $u->id_user;
 $prop["id"] = $this_job_id;
 $new_job = new job_new();
 if ($APP['ms']->kind != "no-messaging") {
     $new_job->set($prop);
     $xml_send = $new_job->toobjectxml();
     $new_job->send("sendto_" . $selected_job_server_name, $xml_send);
 } else {
     $new_job->create($prop);
 }
 if ($mode_jidonly) {
     echo $this_job_id;
 }
 if ($mode_edit) {
     $alert_messages = $alert_messages . "<center><span style='background-color:green;color:white;'>" . getTranslation("Job", $settings) . " <a style='color:white;' href='?q={$qn}&v=job-servers#unfinished_" . str_replace("<", "&lt;", $this_job_id) . "'>" . str_replace("<", "&lt;", $this_job_id) . "</a> " . getTranslation("has been submitted", $settings) . "</span></center>";
 }
 if ($mode_jidonly) {
     return;
     //exit; ??
 }
 $id_submitted_job = $this_job_id;
コード例 #2
0
ファイル: model.classes.php プロジェクト: hisapi/his
 public function status_new()
 {
     global $APP;
     // CREATE JOB_NEW ENTRY
     /*if (PHP_SAPI === 'cli')
       {
           logger( "RESTARTING ORPHANED RUNNING JOB:\n\t".$this->id."\n");
       }*/
     $prop = array();
     $prop["id_user"] = $this->id_user;
     $prop["id"] = $this->id;
     $has_at = strpos($prop['id'], "@");
     if ($has_at !== FALSE) {
         $idsplit = explode("@", $prop["id"]);
         $server_name = $idsplit[0];
         $create_new_job = new job_new();
         if ($APP['ms']->kind != "no-messaging") {
             $create_new_job->set($prop);
             $xml_send = $create_new_job->toobjectxml();
             $create_new_job->send("sendto_" . $server_name, $xml_send);
         } else {
             $create_new_job->create($prop);
             $this->delete_job_status();
         }
     }
 }