Example #1
0
File: index.php Project: hisapi/his
 $selected_job_server = $list_of_eligible_servers[$rand_server_index];
 $selected_job_server_name = $selected_job_server->name;
 $this_job_id = $selected_job_server_name . "@" . $sha1_jid;
 $this_time = gmdate('U');
 $prop = array();
 $prop["id_user"] = $u->id_user;
 $prop["id"] = $this_job_id;
 $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) {