4 |
require_once ("dossier.class.php"); |
require_once ("dossier.class.php"); |
5 |
|
|
6 |
|
|
7 |
class dossier_numeromanuel extends dossier{ |
class dossier_numeromanuel extends dossier{ |
8 |
var $nature=""; |
var $nature=""; |
9 |
|
var $required_field=array( |
10 |
|
"dossier", |
11 |
|
"date_depot", |
12 |
|
"demandeur_nom" |
13 |
|
); |
14 |
|
|
15 |
function dossier_numeromanuel($id,&$db,$DEBUG) { |
function dossier_numeromanuel($id,&$db,$DEBUG) { |
16 |
$this->constructeur($id,$db,$DEBUG); |
$this->constructeur($id,$db,$DEBUG); |
17 |
} // fin constructeur |
} // fin constructeur |
18 |
|
|
19 |
|
function setValFAjout($val = array()) { |
20 |
|
} |
21 |
|
|
22 |
function setvalF($val){ |
function setvalF($val){ |
23 |
$this->valF['dossier'] = $val['dossier']; |
$this->valF['dossier'] = $val['dossier']; |
24 |
$this->valF['nature'] = substr($val['dossier'],0,2); |
$this->valF['nature'] = substr($val['dossier'],0,2); |
35 |
} |
} |
36 |
|
|
37 |
function verifier($val,&$db,$DEBUG){ |
function verifier($val,&$db,$DEBUG){ |
38 |
$this->correct=True; |
dbform::verifier($val,$db,$DEBUG); |
39 |
$imgv=""; |
|
|
$f=" ! "; |
|
|
$imgv="<img src='../app/img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
|
40 |
if($val['date_depot']!=""){ |
if($val['date_depot']!=""){ |
41 |
$this->valF['date_depot'] = $this->dateDB($val['date_depot']); |
$this->valF['date_depot'] = $this->dateDB($val['date_depot']); |
|
}else{ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("date_depot")." ". |
|
|
_("obligatoire").$f; |
|
42 |
} |
} |
43 |
if ($this->valF['dossier']==""){ |
if ($this->valF['dossier']!=""){ |
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("dossier")." ". |
|
|
_("obligatoire").$f; |
|
|
}else{ |
|
44 |
// verif nature |
// verif nature |
45 |
if($this->valF['nature']!="PC" |
if($this->valF['nature']!="PC" |
46 |
and $this->valF['nature']!="PA" |
and $this->valF['nature']!="PA" |
47 |
and $this->valF['nature']!= "DP" |
and $this->valF['nature']!= "DP" |
48 |
and $this->valF['nature'] != "PD"){ |
and $this->valF['nature'] != "PD"){ |
49 |
$this->correct=false; |
$this->correct=false; |
50 |
$this->msg= $this->msg.$imgv." "._("nature")." ".$this->valF['nature']." ". |
$this->msg= $this->msg." "._("Nature")." ".$this->valF['nature']." ". |
51 |
_("inexistante").$f; |
_("inexistante"); |
52 |
} |
} |
53 |
// verif annee |
// verif annee |
54 |
if($this->valF['annee']>= date('y')){ |
if($this->valF['annee']>= date('y')){ |
55 |
$this->correct=false; |
$this->correct=false; |
56 |
$this->msg= $this->msg.$imgv." "._("annee")." ".$this->valF['annee']." ". |
$this->msg= $this->msg." "._("Annee")." ".$this->valF['annee']." ". |
57 |
_("en cours").$f; |
_("en cours"); |
58 |
} |
} |
59 |
} |
} |
|
echo $this->valF['annee']." ".date('y'); |
|
|
if ($this->valF['demandeur_nom']==""){ |
|
|
$this->correct=false; |
|
|
$this->msg= $this->msg.$imgv." "._("nom")." ". |
|
|
_("obligatoire").$f; |
|
|
} |
|
|
|
|
60 |
} |
} |
61 |
|
|
62 |
function setId($db){ |
function setId($db){ |
75 |
} |
} |
76 |
|
|
77 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
78 |
//parent::setType($form,$maj); |
parent::setType($form,$maj); |
79 |
$form->setType('etat','hiddenstatic'); |
$form->setType('etat','hiddenstatic'); |
80 |
$form->setType('types','hidden'); |
$form->setType('types','hidden'); |
81 |
$form->setType('objet_dossier','hidden'); |
$form->setType('objet_dossier','hidden'); |