16 |
function demande($id,&$db,$debug) { |
function demande($id,&$db,$debug) { |
17 |
$this->constructeur($id,$db,$debug); |
$this->constructeur($id,$db,$debug); |
18 |
}// fin constructeur |
}// fin constructeur |
19 |
|
|
20 |
|
function setValF($val) { |
21 |
|
parent::setValF($val); |
22 |
|
// Récupération des id demandeurs postés |
23 |
|
$this->getPostedValues(); |
24 |
|
//$this->valIdDemandeur=$this->postedIdDemandeur; |
25 |
|
} |
26 |
|
|
27 |
|
/** |
28 |
|
* Méthode permettant de récupérer les valeurs du dossier d'autorisation |
29 |
|
* correspondant àla nouvelle demande |
30 |
|
*/ |
31 |
|
function getValFromDossier($dossier_autorisation) { |
32 |
|
include "../sql/pgsql/demande.form.inc.php"; |
33 |
|
$sql=str_replace("<idx>",$this->getParameter("idx_dossier"), |
34 |
|
$sql_infos_dossier); |
35 |
|
$res = $this->db->query($sql); |
36 |
|
$this->addToLog("demande -> getValFromDossier() : ".$sql); |
37 |
|
$this->f->isDatabaseError(); |
38 |
|
$row = & $res->fetchRow(DB_FETCHMODE_ASSOC); |
39 |
|
return $row; |
40 |
|
} |
41 |
|
|
42 |
/* |
/* |
43 |
* La date du jour par défaut dans le champs date_demande |
* La date du jour par défaut dans le champs date_demande |
45 |
*/ |
*/ |
46 |
function setVal(&$form, $maj, $validation, &$db) { |
function setVal(&$form, $maj, $validation, &$db) { |
47 |
if($maj == 0) { |
if($maj == 0) { |
48 |
$form->setVal("date_demande",date('d/m/Y')); |
$form->setVal("date_demande",date('d/m/Y')); |
49 |
|
|
50 |
|
// Récupération des valeurs du dossier d'autorisation correspondant |
51 |
|
if($this->getParameter("idx_dossier") != "") { |
52 |
|
$val_autorisation = $this->getValFromDossier( |
53 |
|
$this->getParameter("idx_dossier")); |
54 |
|
foreach($val_autorisation as $champ => $value) { |
55 |
|
$form->setVal($champ,$value); |
56 |
|
} |
57 |
|
} |
58 |
} |
} |
59 |
} |
} |
60 |
|
|
63 |
*/ |
*/ |
64 |
function verifier($val, &$db, $DEBUG) { |
function verifier($val, &$db, $DEBUG) { |
65 |
parent::verifier($val, $db, $DEBUG); |
parent::verifier($val, $db, $DEBUG); |
|
$this->getPostedValues(); |
|
66 |
if(!isset($this->postedIdDemandeur["petitionnaire_principal"]) OR |
if(!isset($this->postedIdDemandeur["petitionnaire_principal"]) OR |
67 |
empty($this->postedIdDemandeur["petitionnaire_principal"])) { |
empty($this->postedIdDemandeur["petitionnaire_principal"])) { |
68 |
$this->correct = false; |
$this->correct = false; |
69 |
$this->addToMessage("La saisie d'un petitionnaire principal est obligatoire."); |
$this->addToMessage("La saisie d'un petitionnaire principal est obligatoire."); |
|
$this->valIdDemandeur=$this->postedIdDemandeur; |
|
70 |
} |
} |
71 |
} |
} |
72 |
/* |
/* |
122 |
|
|
123 |
$form->setType('dossier_instruction', 'hidden'); |
$form->setType('dossier_instruction', 'hidden'); |
124 |
$form->setType('dossier_autorisation', 'hidden'); |
$form->setType('dossier_autorisation', 'hidden'); |
125 |
|
|
126 |
|
$form->setType('instruction_recepisse', 'hidden'); |
127 |
|
$form->setType('arrondissement', 'hidden'); |
128 |
|
|
129 |
|
// Si il s'agit d'une demande sur dossier existant on desactive tous les champs |
130 |
|
// sauf demande_type |
131 |
|
if($maj == 0 AND $this-> getParameter("idx_dossier")) { |
132 |
|
$form->setType('dossier_autorisation_type_detaille', 'selecthiddenstatic'); |
133 |
|
$form->setType('terrain_references_cadastrales', 'hiddenstatic'); |
134 |
|
$form->setType('terrain_adresse_voie_numero', 'hiddenstatic'); |
135 |
|
$form->setType('complement', 'hiddenstatic'); |
136 |
|
$form->setType('terrain_adresse_lieu_dit', 'hiddenstatic'); |
137 |
|
$form->setType('terrain_adresse_localite', 'hiddenstatic'); |
138 |
|
$form->setType('terrain_adresse_code_postal', 'hiddenstatic'); |
139 |
|
$form->setType('terrain_adresse_bp', 'hiddenstatic'); |
140 |
|
$form->setType('terrain_adresse_cedex', 'hiddenstatic'); |
141 |
|
$form->setType('terrain_superficie', 'hiddenstatic'); |
142 |
|
$form->setType('nombre_lots', 'hiddenstatic'); |
143 |
|
} |
144 |
} |
} |
145 |
|
|
146 |
/** |
/** |
173 |
$valAuto['terrain_adresse_bp']=$this->valF['terrain_adresse_bp']; |
$valAuto['terrain_adresse_bp']=$this->valF['terrain_adresse_bp']; |
174 |
$valAuto['terrain_adresse_cedex']=$this->valF['terrain_adresse_cedex']; |
$valAuto['terrain_adresse_cedex']=$this->valF['terrain_adresse_cedex']; |
175 |
$valAuto['terrain_superficie']=$this->valF['terrain_superficie']; |
$valAuto['terrain_superficie']=$this->valF['terrain_superficie']; |
176 |
|
$valAuto['numero_version']=-1; |
177 |
// Ajout du dossier dans la base |
// Ajout du dossier dans la base |
178 |
$dossier_autorisation->ajouter($valAuto, $db, $DEBUG); |
$dossier_autorisation->ajouter($valAuto, $db, $DEBUG); |
179 |
// Liaison du dossier ajouter à la demande |
// Liaison du dossier ajouter à la demande |
183 |
/** |
/** |
184 |
* Méthode permettant d'ajouter un dossier d'instruction |
* Méthode permettant d'ajouter un dossier d'instruction |
185 |
*/ |
*/ |
186 |
function ajoutDossierInstruction($id, &$db, $val, $DEBUG){ |
function ajoutDossierInstruction($id, &$db, $val, $DEBUG, $dossier_instruction_type){ |
187 |
require_once '../obj/dossier.class.php'; |
require_once '../obj/dossier.class.php'; |
188 |
$dossier = new dossier("]",$db,$DEBUG); |
$dossier = new dossier("]",$db,$DEBUG); |
189 |
foreach($dossier->champs as $value) { |
foreach($dossier->champs as $value) { |
192 |
require_once '../obj/dossier_autorisation_type_detaille.class.php'; |
require_once '../obj/dossier_autorisation_type_detaille.class.php'; |
193 |
$datd = new dossier_autorisation_type_detaille( |
$datd = new dossier_autorisation_type_detaille( |
194 |
$this->valF['dossier_autorisation_type_detaille'],$db,$DEBUG); |
$this->valF['dossier_autorisation_type_detaille'],$db,$DEBUG); |
195 |
|
|
196 |
|
/*Ajout de la variable dossier_instruction_type à l'objet dossier pour le |
197 |
|
* versionning |
198 |
|
*/ |
199 |
|
$dossier->setDossierInstructionType($dossier_instruction_type); |
200 |
|
|
201 |
// Définition des valeurs à entrée dans la table |
// Définition des valeurs à entrée dans la table |
202 |
$valInstr['nature']=$datd->val[array_search("code", $datd->champs)]; |
$valInstr['nature']=$datd->val[array_search("code", $datd->champs)]; |
203 |
$valInstr['dossier_autorisation_type_detaille']=$this->valF['dossier_autorisation_type_detaille']; |
$valInstr['dossier_autorisation_type_detaille']=$this->valF['dossier_autorisation_type_detaille']; |
204 |
$valInstr['date_depot']=$this->dateDBToForm($this->valF['date_demande']); |
$valInstr['date_depot']=$this->dateDBToForm($this->valF['date_demande']); |
205 |
|
$valInstr['date_demande']=$this->dateDBToForm($this->valF['date_demande']); |
206 |
$valInstr['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
$valInstr['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
207 |
$valInstr['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
$valInstr['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
208 |
$valInstr['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
$valInstr['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
261 |
} |
} |
262 |
} |
} |
263 |
|
|
264 |
|
/* |
265 |
|
* Récupère l'identifiant d'un arrondissement à partir d'un code postal |
266 |
|
*/ |
267 |
|
function getArrondissement($terrain_adresse_code_postal){ |
268 |
|
|
269 |
|
$arrondissement = NULL; |
270 |
|
|
271 |
|
$sql = "SELECT |
272 |
|
arrondissement |
273 |
|
FROM |
274 |
|
".DB_PREFIXE."arrondissement |
275 |
|
WHERE |
276 |
|
code_postal = '$terrain_adresse_code_postal' "; |
277 |
|
$this->addToLog("demande.class.php : ".$sql." execute <br>", EXTRA_VERBOSE_MODE); |
278 |
|
|
279 |
|
$res = $this->db->query($sql); |
280 |
|
$this->f->isDatabaseError($res); |
281 |
|
|
282 |
|
if( $res->numrows() > 0 ) { |
283 |
|
|
284 |
|
$row=& $res->fetchRow(DB_FETCHMODE_ASSOC); |
285 |
|
$arrondissement = $row['arrondissement']; |
286 |
|
} |
287 |
|
|
288 |
|
return $arrondissement; |
289 |
|
} |
290 |
|
|
291 |
|
/* |
292 |
|
* Récupère l'évènement lié à un type de demande |
293 |
|
*/ |
294 |
|
function getEvenement($demande_type){ |
295 |
|
|
296 |
|
$evenement = NULL; |
297 |
|
|
298 |
|
$sql = |
299 |
|
"SELECT |
300 |
|
evenement |
301 |
|
FROM |
302 |
|
".DB_PREFIXE."demande_type |
303 |
|
WHERE |
304 |
|
demande_type = $demande_type"; |
305 |
|
|
306 |
|
$res = $this->db->query($sql); |
307 |
|
$this->f->isDatabaseError($res); |
308 |
|
|
309 |
|
if ( $res->numrows() > 0 ){ |
310 |
|
|
311 |
|
$row=& $res->fetchRow(DB_FETCHMODE_ASSOC); |
312 |
|
$evenement = $row['evenement']; |
313 |
|
} |
314 |
|
|
315 |
|
return $evenement; |
316 |
|
} |
317 |
|
|
318 |
|
/* |
319 |
|
* Récupère la lettre type lié à un événement |
320 |
|
*/ |
321 |
|
function getLettreType($evenement){ |
322 |
|
|
323 |
|
$lettretype = NULL; |
324 |
|
|
325 |
|
$sql = |
326 |
|
"SELECT |
327 |
|
lettretype |
328 |
|
FROM |
329 |
|
".DB_PREFIXE."evenement |
330 |
|
WHERE |
331 |
|
evenement = $evenement"; |
332 |
|
|
333 |
|
$res = $this->db->query($sql); |
334 |
|
$this->f->isDatabaseError($res); |
335 |
|
|
336 |
|
if ( $res->numrows() > 0 ){ |
337 |
|
|
338 |
|
$row=& $res->fetchRow(DB_FETCHMODE_ASSOC); |
339 |
|
$lettretype = $row['lettretype']; |
340 |
|
} |
341 |
|
|
342 |
|
return $lettretype; |
343 |
|
} |
344 |
|
|
345 |
/** |
/** |
346 |
* Ajout des dossiers |
* Ajout des dossiers |
347 |
**/ |
**/ |
358 |
} |
} |
359 |
// Création du dossier d'instruction |
// Création du dossier d'instruction |
360 |
if($dossier_type['dossier_instruction_type'] != NULL) { |
if($dossier_type['dossier_instruction_type'] != NULL) { |
361 |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG); |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG, $dossier_type['dossier_instruction_type']); |
362 |
$this -> addToMessage(_("Creation du dossier d'instruction no".$this->valF['dossier_instruction'])); |
$this -> addToMessage(_("Creation du dossier d'instruction no").$this->valF['dossier_instruction']); |
363 |
|
} |
364 |
|
|
365 |
|
/*Création du lien de téléchargement de récépissé de demande*/ |
366 |
|
if ( $this->valF['demande_type'] != "" && is_numeric($this->valF['demande_type']) |
367 |
|
&& isset($this->valF['dossier_instruction']) && $this->valF['dossier_instruction'] !== "" ){ |
368 |
|
|
369 |
|
/*Récupérer l'événement lié à ce type de demande*/ |
370 |
|
$evenement = $this->getEvenement($this->valF['demande_type']); |
371 |
|
|
372 |
|
/*Récupération de la lettre type de l'événement*/ |
373 |
|
$lettretype = $this->getLettreType($evenement); |
374 |
|
|
375 |
|
/*Création d'une nouvelle instruction avec cet événement*/ |
376 |
|
/*Données*/ |
377 |
|
$valInstr['instruction']=NULL; |
378 |
|
|
379 |
|
$valInstr['destinataire']=$this->valF['dossier_instruction']; |
380 |
|
$valInstr['dossier']=$this->valF['dossier_instruction']; |
381 |
|
|
382 |
|
$valInstr['datecourrier']=date("d/m/Y"); |
383 |
|
$valInstr['evenement']=$evenement; |
384 |
|
$valInstr['lettretype']=$lettretype; |
385 |
|
$valInstr['complement']=""; |
386 |
|
$valInstr['complement2']=""; |
387 |
|
|
388 |
|
$valInstr['action']="initialisation"; |
389 |
|
$valInstr['delai']="2"; |
390 |
|
$valInstr['etat']="notifier"; |
391 |
|
$valInstr['accord_tacite']="Oui"; |
392 |
|
$valInstr['delai_notification']="1"; |
393 |
|
$valInstr['archive_delai']="0"; |
394 |
|
$valInstr['archive_date_complet']=NULL; |
395 |
|
$valInstr['archive_date_rejet']=NULL; |
396 |
|
$valInstr['archive_date_limite']=NULL; |
397 |
|
$valInstr['archive_date_notification_delai']=NULL; |
398 |
|
$valInstr['archive_accord_tacite']="Non"; |
399 |
|
$valInstr['archive_etat']="initialiser"; |
400 |
|
$valInstr['archive_date_decision']=NULL; |
401 |
|
$valInstr['archive_avis']=""; |
402 |
|
$valInstr['archive_date_validite']=NULL; |
403 |
|
$valInstr['archive_date_achevement']=NULL; |
404 |
|
$valInstr['archive_date_chantier']=NULL; |
405 |
|
$valInstr['archive_date_conformite']=NULL; |
406 |
|
$valInstr['complement3']=""; |
407 |
|
$valInstr['complement4']=""; |
408 |
|
$valInstr['complement5']=""; |
409 |
|
$valInstr['complement6']=""; |
410 |
|
$valInstr['complement7']=""; |
411 |
|
$valInstr['complement8']=""; |
412 |
|
$valInstr['complement9']=""; |
413 |
|
$valInstr['complement10']=""; |
414 |
|
$valInstr['complement11']=""; |
415 |
|
$valInstr['complement12']=""; |
416 |
|
$valInstr['complement13']=""; |
417 |
|
$valInstr['complement14']=""; |
418 |
|
$valInstr['complement15']=""; |
419 |
|
$valInstr['avis_decision']=NULL; |
420 |
|
|
421 |
|
/*Fichier requis*/ |
422 |
|
require_once '../obj/instruction.class.php'; |
423 |
|
|
424 |
|
/*Création d'un nouveau dossier*/ |
425 |
|
$instruction = new instruction("]",$db,$DEBUG); |
426 |
|
$instruction->valF = ""; |
427 |
|
$instruction->ajouter($valInstr, $db, $DEBUG); |
428 |
|
if ( $instruction->valF['instruction'] != "" ){ |
429 |
|
|
430 |
|
$this->valF['instruction_recepisse'] = $instruction->valF['instruction']; |
431 |
|
$this -> addToMessage("<br/><a |
432 |
|
class='lien' |
433 |
|
href='../pdf/pdflettretype.php?obj=".$lettretype."&idx=".$this->valF['dossier_instruction']."'> |
434 |
|
<span |
435 |
|
class=\"om-icon om-icon-16 om-icon-fix pdf-16\" |
436 |
|
title=\""._("Telecharger le recepisse de la demande")."\">". |
437 |
|
_("Telecharger le recepisse de la demande"). |
438 |
|
"</span> |
439 |
|
". |
440 |
|
_("Telecharger le recepisse de la demande")." |
441 |
|
</a></br>"); |
442 |
|
} |
443 |
|
else { |
444 |
|
|
445 |
|
$this -> addToMessage(_("Une erreur s'est produite lors de la creation du recepisse")); |
446 |
|
} |
447 |
|
} |
448 |
|
|
449 |
|
/*Ajout de l'arrondissement à partir du code postal*/ |
450 |
|
if ( !is_null($this->valF["terrain_adresse_code_postal"]) && is_numeric($this->valF["terrain_adresse_code_postal"]) ){ |
451 |
|
|
452 |
|
$this->valF["arrondissement"] = $this->getArrondissement($this->valF["terrain_adresse_code_postal"]); |
453 |
} |
} |
454 |
} |
} |
455 |
} |
} |
459 |
**/ |
**/ |
460 |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
461 |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
462 |
$this->valIdDemandeur=$this->postedIdDemandeur; |
|
463 |
// Ajout des lliens entre dossier_autorisation et demandeur |
// Ajout des lliens entre dossier_autorisation et demandeur |
464 |
if(!empty($this->valF['dossier_autorisation'])) { |
if(!empty($this->valF['dossier_autorisation'])) { |
465 |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
470 |
} |
} |
471 |
} |
} |
472 |
function triggerModifierApres($id, &$db, $val, $DEBUG){ |
function triggerModifierApres($id, &$db, $val, $DEBUG){ |
473 |
$this->listeDemandeur(); |
$this->listeDemandeur("demande",$this->val[array_search('demande', $this->champs)]); |
474 |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
475 |
$this->valIdDemandeur=$this->postedIdDemandeur; |
$this->valIdDemandeur=$this->postedIdDemandeur; |
476 |
|
|
482 |
function insertLinkDemandeDemandeur($db, $DEBUG) { |
function insertLinkDemandeDemandeur($db, $DEBUG) { |
483 |
// |
// |
484 |
require_once "../obj/lien_demande_demandeur.class.php"; |
require_once "../obj/lien_demande_demandeur.class.php"; |
|
|
|
485 |
// Comparaison de l'id petitionnaire principal |
// Comparaison de l'id petitionnaire principal |
486 |
if(isset($this->postedIdDemandeur['petitionnaire_principal']) AND |
if(isset($this->postedIdDemandeur['petitionnaire_principal']) AND |
487 |
!empty($this->postedIdDemandeur['petitionnaire_principal']) AND |
!empty($this->postedIdDemandeur['petitionnaire_principal']) AND |
597 |
} |
} |
598 |
} |
} |
599 |
/** |
/** |
600 |
* Méthode permettant de récupérer les id des demandeur lié à la demande |
* Méthode permettant de récupérer les id des demandeur liés à la demande ou |
601 |
|
* liés au dossier d'autorisation |
602 |
**/ |
**/ |
603 |
function listeDemandeur() { |
function listeDemandeur($from, $id) { |
604 |
// Récupération des demandeurs de la base |
// Récupération des demandeurs de la base |
605 |
$sql = "SELECT demandeur.demandeur, |
$sql = "SELECT demandeur.demandeur, |
606 |
demandeur.type_demandeur, |
demandeur.type_demandeur, |
607 |
lien_demande_demandeur.petitionnaire_principal |
lien_".$from."_demandeur.petitionnaire_principal |
608 |
FROM ".DB_PREFIXE."lien_demande_demandeur |
FROM ".DB_PREFIXE."lien_".$from."_demandeur |
609 |
INNER JOIN ".DB_PREFIXE."demandeur |
INNER JOIN ".DB_PREFIXE."demandeur |
610 |
ON demandeur.demandeur=lien_demande_demandeur.demandeur |
ON demandeur.demandeur=lien_".$from."_demandeur.demandeur |
611 |
WHERE demande = ".$this->val[array_search('demande', $this->champs)]; |
WHERE ".$from." = '".$id."'"; |
612 |
$res = $this->f->db->query($sql); |
$res = $this->f->db->query($sql); |
613 |
$this->f->addToLog("listeDemandeur() : ".$sql); |
$this->f->addToLog("listeDemandeur() : ".$sql); |
614 |
$this->f->isDatabaseError($res); |
$this->f->isDatabaseError($res); |
626 |
} |
} |
627 |
} |
} |
628 |
|
|
629 |
|
|
630 |
|
/** |
631 |
|
* Surcharge du bouton retour afin de retourner sur la recherche de dossiers |
632 |
|
* d'instruction existant |
633 |
|
*/ |
634 |
|
function retour($premier = 0, $recherche = "", $tricol = "") { |
635 |
|
|
636 |
|
echo "\n<a class=\"retour\" "; |
637 |
|
echo "href=\""; |
638 |
|
// |
639 |
|
if($this->getParameter("idx_dossier") != "") { |
640 |
|
echo "tab.php?"; |
641 |
|
echo "obj=recherche_dossier"; |
642 |
|
|
643 |
|
} else { |
644 |
|
if($this->getParameter("retour")=="form" AND !($this->getParameter("validation")>0 AND $this->getParameter("maj")==2 AND $this->correct)) { |
645 |
|
echo "form.php?"; |
646 |
|
} else { |
647 |
|
echo "tab.php?"; |
648 |
|
} |
649 |
|
echo "obj=".get_class($this); |
650 |
|
if($this->getParameter("retour")=="form") { |
651 |
|
echo "&idx=".$this->getParameter("idx"); |
652 |
|
echo "&action=3"; |
653 |
|
} |
654 |
|
} |
655 |
|
echo "&premier=".$this->getParameter("premier"); |
656 |
|
echo "&tricol=".$this->getParameter("tricol"); |
657 |
|
echo "&recherche=".$this->getParameter("recherche"); |
658 |
|
echo "&selectioncol=".$this->getParameter("selectioncol"); |
659 |
|
echo "&advs_id=".$this->getParameter("advs_id"); |
660 |
|
echo "&valide=".$this->getParameter("valide"); |
661 |
|
// |
662 |
|
echo "\""; |
663 |
|
echo ">"; |
664 |
|
// |
665 |
|
echo _("Retour"); |
666 |
|
// |
667 |
|
echo "</a>\n"; |
668 |
|
|
669 |
|
} |
670 |
|
|
671 |
|
|
672 |
/** |
/** |
673 |
* Ajout de la liste des demandeurs |
* Ajout de la liste des demandeurs |
674 |
*/ |
*/ |
675 |
function formSpecificContent($maj) { |
function formSpecificContent($maj) { |
676 |
if(!$this->correct AND $maj != 0) { |
if(!$this->correct AND $maj != 0) { |
677 |
$this->listeDemandeur(); |
$this->listeDemandeur("demande", $this->val[array_search('demande', $this->champs)]); |
678 |
|
} |
679 |
|
// Si le paramètre idx_dossier est défini on récupère les demandeurs liés au dossier d'instruction |
680 |
|
if($this->getParameter("idx_dossier") != "") { |
681 |
|
$this->listeDemandeur("dossier", $this->getParameter("idx_dossier")); |
682 |
} |
} |
683 |
if($maj < 2 AND !$this->correct) { |
if($maj < 2 AND !$this->correct) { |
684 |
$linkable = true; |
$linkable = true; |
685 |
} else { |
} else { |
686 |
$linkable = false; |
$linkable = false; |
687 |
} |
} |
688 |
|
|
689 |
// Conteneur de la listes des demandeurs |
// Conteneur de la listes des demandeurs |
690 |
echo "<div class=\"demande_hidden_bloc col_12\">"; |
echo "<div class=\"demande_hidden_bloc col_12\">"; |
691 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\">"; |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\">"; |
706 |
$this->f->db,false); |
$this->f->db,false); |
707 |
$demandeur -> afficherSynthese("petitionnaire_principal", $linkable); |
$demandeur -> afficherSynthese("petitionnaire_principal", $linkable); |
708 |
$demandeur -> __destruct(); |
$demandeur -> __destruct(); |
709 |
|
} elseif ( isset ($this->postedIdDemandeur["petitionnaire_principal"]) AND |
710 |
|
!empty($this->postedIdDemandeur["petitionnaire_principal"]) ) { |
711 |
|
$demandeur = new petitionnaire( |
712 |
|
$this->postedIdDemandeur["petitionnaire_principal"], |
713 |
|
$this->f->db,false); |
714 |
|
$demandeur -> afficherSynthese("petitionnaire_principal", $linkable); |
715 |
|
$demandeur -> __destruct(); |
716 |
} |
} |
717 |
// Si en édition de formulaire |
// Si en édition de formulaire |
718 |
if($maj < 2 AND $this->correct != true) { |
if($maj < 2 AND $this->correct != true) { |
719 |
// Bouton d'ajout du pétitionnaire principal |
// Bouton d'ajout du pétitionnaire principal |
720 |
// L'ID DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
// L'ID DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
721 |
echo "<input id=\"add_petitionnaire_principal\" |
/*echo "<span id=\"add_petitionnaire_principal\" |
722 |
class=\"ui-button ui-widget ui-state-default ui-corner-all\" |
class=\"om-form-button add-16\" |
723 |
type=\"button\" value=\""._("Saisir le petitionnaire principal")."\"/>"; |
type=\"button\" value=\""._("Saisir le petitionnaire principal")."\"/>"._("Saisir le petitionnaire principal")."<span>";*/ |
724 |
echo " <span class=\"om-icon om-icon-16 om-icon-fix arrow-right-16\">></span> "; |
echo "<span id=\"add_petitionnaire_principal\" |
725 |
|
class=\"om-form-button add-16\" |
726 |
|
type=\"button\" value=\""._("Saisir le petitionnaire principal")."\"/>". |
727 |
|
_("Saisir le petitionnaire principal"). |
728 |
|
"</span>"; |
729 |
// Bouton d'ajout du delegataire |
// Bouton d'ajout du delegataire |
730 |
// L'ID DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
// L'ID DU DIV ET DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
731 |
echo "<input id=\"add_delegataire\" |
echo "<div id=\"delegataire\">"; |
732 |
class=\"ui-button ui-widget ui-state-default ui-corner-all\" |
echo " <span class=\"om-icon om-icon-16 om-icon-fix arrow-right-16\">></span> "; |
733 |
type=\"button\" value=\""._("Saisir le delegataire")."\"/>"; |
|
734 |
} |
// Affichage de la synthèse |
735 |
// Affichage de la synthèse |
if (isset ($this->valIdDemandeur["delegataire"]) AND |
736 |
if (isset ($this->valIdDemandeur["delegataire"]) AND |
!empty($this->valIdDemandeur["delegataire"])) { |
737 |
!empty($this->valIdDemandeur["delegataire"])) { |
$demandeur = new delegataire($this->valIdDemandeur["delegataire"], |
738 |
$demandeur = new delegataire($this->valIdDemandeur["delegataire"], |
$this->f->db,false); |
739 |
$this->f->db,false); |
$demandeur -> afficherSynthese("delegataire", $linkable); |
740 |
$demandeur -> afficherSynthese("delegataire", $linkable); |
$demandeur -> __destruct(); |
741 |
$demandeur -> __destruct(); |
} elseif ( isset ($this->postedIdDemandeur["delegataire"]) AND |
742 |
|
!empty($this->postedIdDemandeur["delegataire"]) ) { |
743 |
|
$demandeur = new delegataire($this->postedIdDemandeur["delegataire"], |
744 |
|
$this->f->db,false); |
745 |
|
$demandeur -> afficherSynthese("delegataire", $linkable); |
746 |
|
$demandeur -> __destruct(); |
747 |
|
} |
748 |
|
echo "<span id=\"add_delegataire\" |
749 |
|
class=\"om-form-button add-16\" |
750 |
|
type=\"button\" value=\""._("Saisir le delegataire")."\"/>". |
751 |
|
_("Saisir le delegataire"). |
752 |
|
"</span>"; |
753 |
|
echo "</div>"; |
754 |
} |
} |
|
|
|
755 |
echo "</div>"; |
echo "</div>"; |
|
|
|
756 |
// Bloc des pétitionnaires secondaires |
// Bloc des pétitionnaires secondaires |
757 |
// L'ID DU DIV SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
// L'ID DU DIV SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
758 |
echo "<div id=\"listePetitionnaires\">"; |
echo "<div id=\"listePetitionnaires\">"; |
768 |
$demandeur -> __destruct(); |
$demandeur -> __destruct(); |
769 |
} |
} |
770 |
|
|
771 |
|
} elseif ( isset ($this->postedIdDemandeur["petitionnaire"]) AND |
772 |
|
!empty($this->postedIdDemandeur["petitionnaire"]) ) { |
773 |
|
foreach ($this->postedIdDemandeur["petitionnaire"] as $petitionnaire) { |
774 |
|
$demandeur = new petitionnaire($petitionnaire, |
775 |
|
$this->f->db,false); |
776 |
|
$demandeur -> afficherSynthese("petitionnaire", $linkable); |
777 |
|
$demandeur -> __destruct(); |
778 |
|
} |
779 |
} |
} |
780 |
if ($maj < 2 AND !$this->correct) { |
if ($maj < 2 AND !$this->correct) { |
781 |
// L'ID DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
// L'ID DE L'INPUT SUIVANT EST NECESSAIRE AU BON FONCTIONNEMENT DU JS |
782 |
echo "<input id=\"add_petitionnaire\" |
echo "<span id=\"add_petitionnaire\" |
783 |
class=\"ui-button ui-widget ui-state-default ui-corner-all\" |
class=\"om-form-button add-16\" |
784 |
type=\"button\" value=\""._("Ajouter un petitionnaire")."\"/>"; |
type=\"button\" value=\""._("Ajouter un petitionnaire")."\"/>". |
785 |
|
_("Ajouter un petitionnaire") |
786 |
|
."</span>"; |
787 |
} |
} |
788 |
echo "</div>"; |
echo "</div>"; |
789 |
echo "</fieldset>"; |
echo "</fieldset>"; |
791 |
} |
} |
792 |
|
|
793 |
}// fin classe |
}// fin classe |
|
?> |
|
794 |
|
?> |