12 |
function setValFAjout($val){ |
function setValFAjout($val){ |
13 |
$this->valF['service'] = $val['service']; |
$this->valF['service'] = $val['service']; |
14 |
} |
} |
15 |
|
function setvalF($val){ |
16 |
|
parent::setvalF($val); |
17 |
function verifierAjout(){ |
// cles secondaires numerique (contrainte integrite pgsql) |
18 |
$this->correct=True; |
if($val['avis']=='') $this->valF['avis']= null; |
|
$imgv=""; |
|
|
$f=" ! "; |
|
|
$imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
|
|
if ($this->valF['service']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("service")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
} |
|
|
|
|
|
function verifier(){ |
|
|
$this->correct=True; |
|
|
$imgv=""; |
|
|
$f=" ! "; |
|
|
$imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
|
|
if ($this->valF['dossier']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("dossier")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['date_envoi']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("date_envoi")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
19 |
} |
} |
|
|
|
20 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){ |
21 |
if ($validation==0) { |
if ($validation==0) { |
22 |
if ($maj == 0){ |
if ($maj == 0){ |
48 |
} |
} |
49 |
} |
} |
50 |
|
|
|
function setTaille(&$form,$maj){ |
|
|
$form->setTaille('consultation', 8); |
|
|
$form->setTaille('dossier', 12); |
|
|
$form->setTaille('service', 5); |
|
|
$form->setTaille('date_envoi', 12); |
|
|
$form->setTaille('date_retour', 12); |
|
|
$form->setTaille('avis', 2); |
|
|
$form->setTaille('date_limite', 12); |
|
|
} |
|
|
|
|
|
function setMax(&$form,$maj){ |
|
|
$form->setMax('consultation', 8); |
|
|
$form->setMax('dossier', 12); |
|
|
$form->setMax('service', 5); |
|
|
$form->setMax('date_envoi', 12); |
|
|
$form->setMax('date_retour', 12); |
|
|
$form->setMax('avis', 2); |
|
|
$form->setMax('date_limite', 12); |
|
|
} |
|
|
|
|
|
|
|
51 |
// TRIGGER AVANT MODIFICATION DE DONNEES |
// TRIGGER AVANT MODIFICATION DE DONNEES |
52 |
// trigger before modification data |
// trigger before modification data |
53 |
function triggerajouter($id,&$db,$val,$DEBUG) { |
function triggerajouter($id,&$db,$val,$DEBUG) { |
54 |
// mise a jour instruction avec evenement [return delay] |
// mise a jour instruction avec evenement [return delay] |
55 |
$sql= "select delai from service where service ='".$this->valF['service']."'"; |
if (!$this->valF['date_envoi']==""){ |
56 |
$delai = $db->getOne($sql); |
$sql= "select delai from ".DB_PREFIXE."service where service ='".$this->valF['service']."'"; |
57 |
$this->valF['date_limite'] = $this->moisdate($this->valF['date_envoi'],$delai); |
$delai = $db->getOne($sql); |
58 |
$this->msg=$this->msg."<br>"._("delai")." ". |
$this->valF['date_limite'] = $this->moisdate($this->valF['date_envoi'],$delai); |
59 |
_("retour")." ".$delai." "._("mois")." -> ". |
$this->msg=$this->msg."<br>"._("delai")." ". |
60 |
_("retour")." ".$this->valF['date_limite']."<br>"; |
_("retour")." ".$delai." "._("mois")." -> ". |
61 |
|
_("retour")." ".$this->valF['date_limite']."<br>"; |
62 |
|
} |
63 |
} |
} |
64 |
|
|
65 |
// ============================================= |
// ============================================= |