public function __construct(AriiSession $session) { $this->session = $session; $this->enterprise = $session->getEnterprise(); // Securité ! $this->Access = $session->getTeamRights(); // on retraite les champs d'accès $n = 0; while (isset($this->Access[$n]['path'])) { $this->Access[$n]['job_name'] = $this->AppendPath($this->Access[$n]['path'], $this->Access[$n]['job']); $this->Access[$n]['job_chain'] = $this->AppendPath($this->Access[$n]['path'], $this->Access[$n]['job_chain']); $n++; } $db = $session->getDatabase(); $this->driver = $db['driver']; $Spooler = $session->getSpooler(); $this->spooler = $Spooler['name']; if ($this->spooler == 'spooler.all') { $this->spooler = '%'; } $this->ref_date = $session->getRefDate(); $this->ref_past = $session->getRefPast(); $this->ref_future = $session->getRefFuture(); $this->ref_timestamp = $session->getRefTimestamp(); // Correction des dates if ($this->driver == 'pdo_oci') { $this->past = "to_date('" . $session->getPast() . "','yyyy-mm-dd hh24:mi:ss')"; $this->future = "to_date('" . $session->getFuture() . "','yyyy-mm-dd hh24:mi:ss')"; } else { $this->past = '"' . $session->getPast() . '"'; $this->future = '"' . $session->getFuture() . '"'; } // filtre en cours $Filter = $session->getUserFilter(); $this->spooler = str_replace('*', '%', $Filter['spooler']); $this->job_name = str_replace('*', '%', $Filter['job']); $this->job_chain = str_replace('*', '%', $Filter['job_chain']); if ($this->job_chain == '') { $this->job_chain = '%'; } $this->order_id = str_replace('*', '%', $Filter['order_id']); if ($this->order_id == '') { $this->order_id = '%'; } $this->status = str_replace('*', '%', $Filter['status']); # valeur par defaut, au cas ou... if ($this->ref_past == "") { $this->ref_past = -4; } if ($this->ref_future == "") { $this->ref_future = 2; } if ($this->spooler == "") { $this->spooler = "%"; } }