20 |
} |
} |
21 |
|
|
22 |
/* |
/* |
23 |
|
* Pays par défaut : France |
24 |
|
*/ |
25 |
|
function setValSousFormulaire(&$form, $maj, $validation, &$db) { |
26 |
|
if($maj == 0) { |
27 |
|
$form->setVal("pays",'France'); |
28 |
|
} |
29 |
|
} |
30 |
|
|
31 |
|
/* |
32 |
* Select pour les champs qualite et type_demandeur |
* Select pour les champs qualite et type_demandeur |
33 |
*/ |
*/ |
34 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
37 |
|
|
38 |
$form->setType('type_demandeur', 'select'); |
$form->setType('type_demandeur', 'select'); |
39 |
$form->setType('qualite', 'select'); |
$form->setType('qualite', 'select'); |
40 |
|
if($maj == 0 AND $this->getParameter("idx_demandeur") != "") { |
41 |
|
$form->setType('frequent','hidden'); |
42 |
|
$form->setType('qualite','selectdisabled'); |
43 |
|
$form->setType('particulier_nom','textdisabled'); |
44 |
|
$form->setType('particulier_prenom','textdisabled'); |
45 |
|
$form->setType('particulier_date_naissance','datedisabled'); |
46 |
|
$form->setType('particulier_commune_naissance','textdisabled'); |
47 |
|
$form->setType('particulier_departement_naissance','textdisabled'); |
48 |
|
$form->setType('personne_morale_denomination','textdisabled'); |
49 |
|
$form->setType('personne_morale_raison_sociale','textdisabled'); |
50 |
|
$form->setType('personne_morale_siret','textdisabled'); |
51 |
|
$form->setType('personne_morale_categorie_juridique','textdisabled'); |
52 |
|
$form->setType('personne_morale_nom','textdisabled'); |
53 |
|
$form->setType('personne_morale_prenom','textdisabled'); |
54 |
|
$form->setType('particulier_civilite','selectdisabled'); |
55 |
|
$form->setType('personne_morale_civilite','selectdisabled'); |
56 |
|
$form->setType('telephone_fixe','textdisabled'); |
57 |
|
$form->setType('telephone_mobile','textdisabled'); |
58 |
|
$form->setType('indicatif','textdisabled'); |
59 |
|
$form->setType('courriel','textdisabled'); |
60 |
|
|
61 |
|
} |
62 |
|
// Champs disabled pour la modif de petitionnaires frequents |
63 |
|
// Solution temporaire |
64 |
|
if ($maj==1){ //modifier |
65 |
|
if($this->getVal('frequent') == 't') { |
66 |
|
$form->setType('qualite','selectdisabled'); |
67 |
|
$form->setType('particulier_nom','textdisabled'); |
68 |
|
$form->setType('particulier_prenom','textdisabled'); |
69 |
|
$form->setType('particulier_date_naissance','datedisabled'); |
70 |
|
$form->setType('particulier_commune_naissance','textdisabled'); |
71 |
|
$form->setType('particulier_departement_naissance','textdisabled'); |
72 |
|
$form->setType('personne_morale_denomination','textdisabled'); |
73 |
|
$form->setType('personne_morale_raison_sociale','textdisabled'); |
74 |
|
$form->setType('personne_morale_siret','textdisabled'); |
75 |
|
$form->setType('personne_morale_categorie_juridique','textdisabled'); |
76 |
|
$form->setType('personne_morale_nom','textdisabled'); |
77 |
|
$form->setType('personne_morale_prenom','textdisabled'); |
78 |
|
$form->setType('numero','textdisabled'); |
79 |
|
$form->setType('voie','textdisabled'); |
80 |
|
$form->setType('complement','textdisabled'); |
81 |
|
$form->setType('lieu_dit','textdisabled'); |
82 |
|
$form->setType('localite','textdisabled'); |
83 |
|
$form->setType('code_postal','textdisabled'); |
84 |
|
$form->setType('bp','textdisabled'); |
85 |
|
$form->setType('cedex','textdisabled'); |
86 |
|
$form->setType('pays','textdisabled'); |
87 |
|
$form->setType('division_territoriale','textdisabled'); |
88 |
|
$form->setType('telephone_fixe','textdisabled'); |
89 |
|
$form->setType('telephone_mobile','textdisabled'); |
90 |
|
$form->setType('indicatif','textdisabled'); |
91 |
|
$form->setType('courriel','textdisabled'); |
92 |
|
$form->setType('notification','checkboxdisabled'); |
93 |
|
$form->setType('frequent','checkboxdisabled'); |
94 |
|
$form->setType('particulier_civilite','selectdisabled'); |
95 |
|
$form->setType('personne_morale_civilite','selectdisabled'); |
96 |
|
} |
97 |
|
}// fin modifier |
98 |
} |
} |
99 |
|
$form->setType('demandeur', 'hidden'); |
100 |
|
|
101 |
} |
} |
102 |
|
|
103 |
/* |
/* |
224 |
// Lien de modification du demandeur |
// Lien de modification du demandeur |
225 |
if($linkable) { |
if($linkable) { |
226 |
echo "<a class=\"edit_demandeur\" href=\"#\" |
echo "<a class=\"edit_demandeur\" href=\"#\" |
227 |
onclick=\"editDemandeur('".$this->val[array_search('demandeur', $this->champs)]."','". |
onclick=\"editDemandeur('".$this->val[array_search('type_demandeur', $this->champs)]."',". |
228 |
$this->val[array_search('type_demandeur', $this->champs)]."',". |
$this->val[array_search('demandeur', $this->champs)].",'". |
229 |
|
$type."',". |
230 |
$type."_".$this->val[array_search('demandeur', $this->champs)]. |
$type."_".$this->val[array_search('demandeur', $this->champs)]. |
231 |
");return false;\">\n"; |
");return false;\">\n"; |
232 |
} |
} |
233 |
// Affichage des infos du demandeur |
// Affichage des infos du demandeur |
234 |
if($this->val[array_search('qualite', $this->champs)] == 'particulier') { |
if($this->val[array_search('qualite', $this->champs)] == 'particulier') { |
235 |
$sql = "SELECT libelle FROM civilite WHERE civilite=". |
if(!empty($this->val[array_search('civilite', $this->champs)])) { |
236 |
$this->val[array_search('civilite', $this->champs)]; |
$sql = "SELECT libelle FROM ".DB_PREFIXE."civilite WHERE civilite=". |
237 |
$civilite = $this->f->db->getone($sql); |
$this->val[array_search('civilite', $this->champs)]; |
238 |
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
$civilite = $this->f->db->getone($sql); |
239 |
$this->f->isDatabaseError($civilite); |
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
240 |
echo $civilite." ". |
$this->f->isDatabaseError($civilite); |
241 |
$this->val[array_search('particulier_nom', $this->champs)]." ". |
echo $civilite." "; |
242 |
|
} |
243 |
|
echo $this->val[array_search('particulier_nom', $this->champs)]." ". |
244 |
$this->val[array_search('particulier_prenom', $this->champs)]."<br/>\n"; |
$this->val[array_search('particulier_prenom', $this->champs)]."<br/>\n"; |
245 |
} else { |
} else { |
246 |
echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ". |
echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ". |
247 |
$this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>\n"; |
$this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>\n"; |
248 |
$sql = "SELECT libelle FROM civilite WHERE civilite=". |
if(!empty($this->val[array_search('personne_morale_civilite', $this->champs)])) { |
249 |
$this->val[array_search('personne_morale_civilite', $this->champs)]; |
$sql = "SELECT libelle FROM ".DB_PREFIXE."civilite WHERE civilite=". |
250 |
$civilite = $this->f->db->getone($sql); |
$this->val[array_search('personne_morale_civilite', $this->champs)]; |
251 |
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
$civilite = $this->f->db->getone($sql); |
252 |
$this->f->isDatabaseError($civilite); |
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
253 |
echo $civilite." ". |
$this->f->isDatabaseError($civilite); |
254 |
$this->val[array_search('personne_morale_nom', $this->champs)]." ". |
echo $civilite." "; |
255 |
|
} |
256 |
|
echo $this->val[array_search('personne_morale_nom', $this->champs)]." ". |
257 |
$this->val[array_search('personne_morale_nom', $this->champs)]."<br/>\n"; |
$this->val[array_search('personne_morale_nom', $this->champs)]."<br/>\n"; |
258 |
} |
} |
259 |
echo (($this->val[array_search('numero', $this->champs)] != "")? |
echo (($this->val[array_search('numero', $this->champs)] != "")? |
261 |
(($this->val[array_search('voie', $this->champs)] != "")? |
(($this->val[array_search('voie', $this->champs)] != "")? |
262 |
$this->val[array_search('voie', $this->champs)]." " : ""). |
$this->val[array_search('voie', $this->champs)]." " : ""). |
263 |
(($this->val[array_search('complement', $this->champs)] != "")? |
(($this->val[array_search('complement', $this->champs)] != "")? |
264 |
$this->val[array_search('complement', $this->champs)]." " : "")"<br/>\n". |
$this->val[array_search('complement', $this->champs)]." " : "")."<br/>\n". |
265 |
(($this->val[array_search('code_postal', $this->champs)] != "")? |
(($this->val[array_search('code_postal', $this->champs)] != "")? |
266 |
$this->val[array_search('code_postal', $this->champs)]." " : ""). |
$this->val[array_search('code_postal', $this->champs)]." " : ""). |
267 |
(($this->val[array_search('localite', $this->champs)] != "")? |
(($this->val[array_search('localite', $this->champs)] != "")? |