9 |
$this->constructeur($id,$db,$debug); |
$this->constructeur($id,$db,$debug); |
10 |
}// fin constructeur |
}// fin constructeur |
11 |
|
|
|
|
|
|
function verifier($val,&$db,$DEBUG){ |
|
|
$this->correct=True; |
|
|
$imgv=""; |
|
|
$f=" ! "; |
|
|
$imgv="<img src='../app/img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
|
|
if ($this->valF['message']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("message")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['valeur']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("valeur")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['champ']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("champ")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['operateur']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg=$this->msg.$imgv." "._("operateur")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['sens']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("sens")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
if ($this->valF['ordre']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("ordre")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
} |
|
|
|
|
12 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
13 |
if ($maj < 2) { //ajouter et modifier |
if ($maj < 2) { //ajouter et modifier |
14 |
$form->setType('sens', 'select'); |
$form->setType('sens', 'select'); |
77 |
$contenu[1]=array(_('egal'),_('different'),'>','<','<=','>='); |
$contenu[1]=array(_('egal'),_('different'),'>','<','<=','>='); |
78 |
$form->setSelect("operateur",$contenu); |
$form->setSelect("operateur",$contenu); |
79 |
} |
} |
|
|
|
|
function setTaille(&$form, $maj) { |
|
|
$form->setTaille('regle',8); |
|
|
$form->setTaille('sens',5); |
|
|
$form->setTaille('ordre',2); |
|
|
$form->setTaille('controle',20); |
|
|
$form->setTaille('id',8); |
|
|
$form->setTaille('champ',30); |
|
|
$form->setTaille('operateur',2); |
|
|
$form->setTaille('valeur',12); |
|
|
$form->setTaille('message',80); |
|
|
} |
|
|
|
|
|
function setMax(&$form, $maj) { |
|
|
$form->setMax('regle',8); |
|
|
$form->setMax('sens',5); |
|
|
$form->setMax('ordre',2); |
|
|
$form->setMax('controle',20); |
|
|
$form->setMax('id',8); |
|
|
$form->setMax('champ',30); |
|
|
$form->setMax('operateur',2); |
|
|
$form->setMax('valeur',12); |
|
|
$form->setMax('message',80); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//function retoursousformulaire($idxformulaire,$retourformulaire,$val,$objsf,$premiersf){ |
|
|
//if (!$this->correct){ |
|
|
// echo "<a href=\"form.php?obj=". |
|
|
// $retourformulaire."&idx=".$val['id']. |
|
|
// "&objsf=".$objsf."&premiersf=".$premiersf."\">"; |
|
|
// echo"<img src='../img/retour.png' align='top' hspace='10' border='0'>"; |
|
|
// echo "</a></center></td> </tr>"; |
|
|
//}else{ |
|
|
// echo "<tr><td><br></td></tr><tr><td colspan=2><center><a href=\"form.php?obj=". |
|
|
// $retourformulaire."&idx=".$val['id']. |
|
|
// "&objsf=".$objsf."&premiersf=".$premiersf."\">"; |
|
|
// echo"<img src='../img/retour.png' align='top' border='0'>"; |
|
|
// echo "</a></center></td> </tr>"; |
|
|
//}} |
|
80 |
|
|
81 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){ |
82 |
if ($validation==0) { |
if ($validation==0) { |
83 |
if ($maj == 0){ |
if ($maj == 0){ |
84 |
$form->setVal('id', $idxformulaire); |
$form->setVal('id', $idxformulaire); |
85 |
$form->setVal('controle', $retourformulaire); |
$form->setVal('controle', $retourformulaire); |
86 |
} |
} |
87 |
}} |
} |
88 |
|
} |
89 |
|
|
90 |
|
|
91 |
|
|