9 |
|
|
10 |
var $maj; |
var $maj; |
11 |
var $sig; |
var $sig; |
12 |
|
// XXX SERVITUDE |
13 |
var $servitude=""; |
var $servitude=""; |
14 |
var $auto_pos; |
var $auto_pos; |
15 |
var $auto_servitude_surfacique; |
var $auto_servitude_surfacique; |
54 |
function checkAccessibility() { |
function checkAccessibility() { |
55 |
// |
// |
56 |
parent::checkAccessibility(); |
parent::checkAccessibility(); |
57 |
// Si l'utilisateur est un intructeur qui en correspond pas à la |
// Si l'utilisateur est un intructeur qui ne correspond pas à la |
58 |
// division du dossier |
// division du dossier |
59 |
if ($this->f->isUserInstructeur() |
if ($this->f->isUserInstructeur() |
60 |
&& isset($this->f->om_utilisateur["division"]) |
&& isset($this->f->om_utilisateur["division"]) |
61 |
&& $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()) { |
&& $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()) { |
62 |
// |
// |
63 |
$this->parameters["actions"]["modifier"] = NULL; |
$this->parameters["actions"]["modifier"] = NULL; |
64 |
|
// |
65 |
|
$this->actions_sup["geolocalisation"] = NULL; |
66 |
|
|
67 |
//Cache le lien du rapport d'instruction, si aucun n'est lié |
//Cache le lien du rapport d'instruction, si aucun n'est lié |
68 |
if ( $this->getRapportInstruction() == '' ){ |
if ( $this->getRapportInstruction() == '' ){ |
83 |
if ( $this->f->isUserInstructeur() && $this->getStatut() == "cloture" ){ |
if ( $this->f->isUserInstructeur() && $this->getStatut() == "cloture" ){ |
84 |
|
|
85 |
$this->parameters["actions"]["modifier"] = NULL; |
$this->parameters["actions"]["modifier"] = NULL; |
86 |
|
// |
87 |
|
$this->actions_sup["geolocalisation"] = NULL; |
88 |
|
|
89 |
//Cache le lien du rapport d'instruction, si aucun n'est lié |
//Cache le lien du rapport d'instruction, si aucun n'est lié |
90 |
if ( $this->getRapportInstruction() == '' ){ |
if ( $this->getRapportInstruction() == '' ){ |
360 |
//nombre de dossier d'instruction de ce type, rattaché au dossier |
//nombre de dossier d'instruction de ce type, rattaché au dossier |
361 |
//d'autorisation complété par des 0 à gauche si besoin. Format du retour |
//d'autorisation complété par des 0 à gauche si besoin. Format du retour |
362 |
//attendu : 01 ou 02, etc. |
//attendu : 01 ou 02, etc. |
363 |
elseif ( strcmp($codeDossierInstructionType, "M") == 0 || |
else { |
|
strcmp($codeDossierInstructionType, "T") == 0 ){ |
|
364 |
|
|
365 |
//On récupère le nombre de dossier d'instruction de ce type rattaché au |
//On récupère le nombre de dossier d'instruction de ce type rattaché au |
366 |
//dossier d'autorisation |
//dossier d'autorisation |
367 |
$sql = "SELECT |
$sql = "SELECT |
368 |
count(*) |
count(dossier) |
369 |
FROM |
FROM |
370 |
".DB_PREFIXE."dossier |
".DB_PREFIXE."dossier |
371 |
LEFT JOIN |
LEFT JOIN |
392 |
|
|
393 |
return $numeroVersionDossierInstructionType; |
return $numeroVersionDossierInstructionType; |
394 |
} |
} |
|
//Sinon on retourne le numéro de version |
|
|
else{ |
|
|
return $numeroVersionDossierInstructionType; |
|
|
} |
|
395 |
} |
} |
396 |
/** |
/** |
397 |
* Retourne le libellé du dossier d'autorisation |
* Retourne le libellé du dossier d'autorisation |
448 |
unset ($this->valF['date_achevement']); |
unset ($this->valF['date_achevement']); |
449 |
unset ($this->valF['date_conformite']); |
unset ($this->valF['date_conformite']); |
450 |
|
|
451 |
// Durée de validaité lors de la création du dossier d'instruction |
// Durée de validité lors de la création du dossier d'instruction |
452 |
$this->valF['duree_validite'] = $this->get_duree_validite($this->valF['dossier_autorisation']); |
$this->valF['duree_validite'] = $this->get_duree_validite($this->valF['dossier_autorisation']); |
453 |
} |
} |
454 |
|
|
481 |
$form->setType('evenement_suivant_tacite_incompletude','hidden'); |
$form->setType('evenement_suivant_tacite_incompletude','hidden'); |
482 |
$form->setType('etat_pendant_incompletude','hidden'); |
$form->setType('etat_pendant_incompletude','hidden'); |
483 |
$form->setType('duree_validite','hidden'); |
$form->setType('duree_validite','hidden'); |
484 |
|
$form->setType('description','hidden'); |
485 |
|
// XXX |
486 |
|
$form->setType('servitude', 'hidden'); |
487 |
if ($maj < 2) { //ajouter et modifier |
if ($maj < 2) { //ajouter et modifier |
488 |
// cache |
// cache |
489 |
if($maj==0) $form->setType('dossier_libelle', 'hidden'); |
if($maj==0) $form->setType('dossier_libelle', 'hidden'); |
493 |
|
|
494 |
$form->setType('geom1', 'hidden'); |
$form->setType('geom1', 'hidden'); |
495 |
$form->setType('geom', 'hiddenstatic'); |
$form->setType('geom', 'hiddenstatic'); |
496 |
$form->setType('servitude', 'hiddenstatic'); |
// $form->setType('servitude', 'hiddenstatic'); |
497 |
|
|
498 |
|
$form->setType('autorite_competente', 'selectstatic'); |
499 |
|
|
500 |
// hiddenstatic |
// hiddenstatic |
501 |
if($maj==1) $form->setType('dossier_libelle', 'hiddenstatic'); |
if($maj==1) $form->setType('dossier_libelle', 'hiddenstatic'); |
522 |
$form->setType('date_conformite','hiddenstaticdate'); |
$form->setType('date_conformite','hiddenstaticdate'); |
523 |
$form->setType('date_limite_incompletude','hiddenstaticdate'); |
$form->setType('date_limite_incompletude','hiddenstaticdate'); |
524 |
|
|
|
$form->setType('date_demande','hiddenstaticdate'); |
|
525 |
$form->setType('date_depot','hiddenstaticdate'); |
$form->setType('date_depot','hiddenstaticdate'); |
526 |
$form->setType('date_dernier_depot','hiddenstaticdate'); |
$form->setType('date_dernier_depot','hiddenstaticdate'); |
527 |
|
|
567 |
$form->setType('instructeur', 'selecthiddenstatic'); |
$form->setType('instructeur', 'selecthiddenstatic'); |
568 |
} |
} |
569 |
// |
// |
570 |
if($this->f->getParameter('afficher_division') === 'true') { |
if($this->f->getParameter('option_afficher_division') === 'true') { |
571 |
// |
// |
572 |
if ($this->f->isAccredited("dossier_modifier_division")) { |
if ($this->f->isAccredited("dossier_modifier_division")) { |
573 |
$form->setType('division', 'select'); |
$form->setType('division', 'select'); |
614 |
$form->setType('numero_versement_archive', 'static'); |
$form->setType('numero_versement_archive', 'static'); |
615 |
$form->setType('enjeu_urba', 'checkboxstatic'); |
$form->setType('enjeu_urba', 'checkboxstatic'); |
616 |
$form->setType('enjeu_erp', 'checkboxstatic'); |
$form->setType('enjeu_erp', 'checkboxstatic'); |
|
$form->setType('description','textareastatic'); |
|
617 |
$form->setType('terrain_references_cadastrales','referencescadastralesstatic'); |
$form->setType('terrain_references_cadastrales','referencescadastralesstatic'); |
618 |
$form->setType('terrain_adresse_voie_numero','static'); |
$form->setType('terrain_adresse_voie_numero','static'); |
619 |
$form->setType('terrain_adresse_voie','static'); |
$form->setType('terrain_adresse_voie','static'); |
627 |
} |
} |
628 |
|
|
629 |
// |
// |
630 |
if(!$this->f->getParameter('afficher_division') === 'true') { |
if(!$this->f->getParameter('option_afficher_division') === 'true') { |
631 |
$form->setType('division', 'hidden'); |
$form->setType('division', 'hidden'); |
632 |
} |
} |
633 |
$form->setType('dossier_autorisation', 'hidden'); |
$form->setType('dossier_autorisation', 'hidden'); |
638 |
$form->setType('dossier_autorisation', 'select'); |
$form->setType('dossier_autorisation', 'select'); |
639 |
} |
} |
640 |
// On cache enjeu_ERP si l'option n'est pas activée |
// On cache enjeu_ERP si l'option n'est pas activée |
641 |
if($this->f->getParameter('option_ERP') != 'true') { |
if($this->f->getParameter('option_erp') != 'true') { |
642 |
$form->setType('erp', 'hidden'); |
$form->setType('erp', 'hidden'); |
643 |
$form->setType('enjeu_erp', 'hidden'); |
$form->setType('enjeu_erp', 'hidden'); |
644 |
} |
} |
645 |
|
|
646 |
|
// En mode modifier, supprimer et consulter |
647 |
|
if ($maj != 0) { |
648 |
|
// Cache la date de la demande |
649 |
|
$form->setType('date_demande', 'hidden'); |
650 |
|
} |
651 |
} |
} |
652 |
|
|
653 |
function setVal(&$form,$maj,$validation){ |
function setVal(&$form,$maj,$validation){ |
658 |
&& $this->f->issetSIGParameter() === true) { |
&& $this->f->issetSIGParameter() === true) { |
659 |
$form->setVal('geom', |
$form->setVal('geom', |
660 |
"<a id='action-form-localiser'". |
"<a id='action-form-localiser'". |
661 |
" target='_blank' href='../app/redirect_plan_sig.php?idx=".$this->getVal("dossier")."'>". |
" target='_SIG' href='../app/redirect_plan_sig.php?idx=".$this->getVal("dossier")."'>". |
662 |
"<span class='om-icon om-icon-16 om-icon-fix sig-16' title='Localiser'>Localiser</span> ". |
"<span class='om-icon om-icon-16 om-icon-fix sig-16' title='Localiser'>Localiser</span> ". |
663 |
$this->getVal('geom'). |
$this->getVal('geom'). |
664 |
" </a>"); |
" </a>"); |
688 |
} |
} |
689 |
|
|
690 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
|
parent::setSelect($form, $maj,$db,$debug); |
|
691 |
//optimisation sur table importante parcelle -> pas d appel methode parent |
//optimisation sur table importante parcelle -> pas d appel methode parent |
692 |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
693 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
694 |
|
|
695 |
|
|
696 |
|
// instructeur |
697 |
|
$this->init_select($form, $db, $maj, $debug, "instructeur", |
698 |
|
$sql_instructeur, $sql_instructeur_by_id, true); |
699 |
|
|
700 |
|
// etat |
701 |
|
$this->init_select($form, $db, $maj, $debug, "etat", |
702 |
|
$sql_etat, $sql_etat_by_id, false); |
703 |
|
|
704 |
|
// dossier_instruction_type |
705 |
|
$this->init_select($form, $db, $maj, $debug, "dossier_instruction_type", |
706 |
|
$sql_dossier_instruction_type, $sql_dossier_instruction_type_by_id, false); |
707 |
|
|
708 |
|
// division |
709 |
|
$this->init_select($form, $db, $maj, $debug, "division", |
710 |
|
$sql_division, $sql_division_by_id, true); |
711 |
|
|
712 |
|
// autorite_competente |
713 |
|
$this->init_select($form, $db, $maj, $debug, "autorite_competente", |
714 |
|
$sql_autorite_competente, $sql_autorite_competente_by_id, false); |
715 |
|
|
716 |
|
// avis_decision |
717 |
|
$this->init_select($form, $db, $maj, $debug, "avis_decision", |
718 |
|
$sql_avis_decision, $sql_avis_decision_by_id, false); |
719 |
|
|
720 |
if($maj<2){ |
if($maj<2){ |
721 |
// parcelle_lot |
// parcelle_lot |
722 |
$contenu=""; |
$contenu=""; |
768 |
$form->setSelect("parcelle",$contenu); |
$form->setSelect("parcelle",$contenu); |
769 |
|
|
770 |
} |
} |
771 |
if($this->f->getParameter('afficher_division')==='true') { |
if($this->f->getParameter('option_afficher_division')==='true') { |
772 |
// instructeur |
// instructeur |
773 |
$this->init_select($form, $db, $maj, $debug, "instructeur", |
$this->init_select($form, $db, $maj, $debug, "instructeur", |
774 |
$sql_instructeur_div, $sql_instructeur_div_by_id, false); |
$sql_instructeur_div, $sql_instructeur_div_by_id, false); |
777 |
|
|
778 |
function setLib(&$form,$maj) { |
function setLib(&$form,$maj) { |
779 |
parent::setLib($form,$maj); |
parent::setLib($form,$maj); |
780 |
|
$form->setLib('dossier_autorisation_libelle',_('dossier_autorisation_libelle')); |
781 |
$form->setLib('servitude',_('contraintes')); |
$form->setLib('servitude',_('contraintes')); |
782 |
$form->setLib('geom',_('centroide')); |
$form->setLib('geom',_('centroide')); |
783 |
$form->setLib('date_limite',_("date limite d'instruction")); |
$form->setLib('date_limite',_("date limite d'instruction")); |
803 |
function setLayout(&$form, $maj) { |
function setLayout(&$form, $maj) { |
804 |
// |
// |
805 |
$form->setBloc('dossier_libelle', 'D', '', ($maj == 3 ? 'col_9':'col_12')); |
$form->setBloc('dossier_libelle', 'D', '', ($maj == 3 ? 'col_9':'col_12')); |
806 |
|
|
807 |
$form->setBloc('dossier_libelle', 'D', '', 'col_9'); |
$form->setBloc('dossier_libelle', 'D', '', 'col_9'); |
808 |
|
|
809 |
$form->setFieldset('dossier_libelle', 'D', _("Dossier d'instruction")); |
$form->setFieldset('dossier_libelle', 'D', _("Dossier d'instruction")); |
810 |
$form->setFieldset('numero_versement_archive', 'F'); |
$form->setFieldset('numero_versement_archive', 'F'); |
811 |
|
//Fieldset "Localisation du terrain" |
812 |
|
// |
813 |
|
$form->setBloc('terrain_adresse_voie_numero','D'); |
814 |
|
$form->setFieldset('terrain_adresse_voie_numero','D',_('Localisation du terrain')); |
815 |
|
|
816 |
|
$form->setBloc('terrain_adresse_voie_numero','D',"","col_6"); |
817 |
|
$form->setBloc('terrain_references_cadastrales','F'); |
818 |
|
|
819 |
$form->setBloc('numero_versement_archive', 'F'); |
$form->setBloc('terrain_adresse_voie','D',"","col_6"); |
820 |
|
$form->setBloc('geom','F'); |
821 |
|
|
822 |
|
$form->setFieldset('geom','F',''); |
823 |
|
$form->setBloc('geom','F'); |
824 |
|
|
825 |
|
$form->setBloc('geom', 'F'); |
826 |
|
|
827 |
$form->setBloc('date_demande', 'D', '', 'col_3'); |
$form->setBloc('date_demande', 'D', '', 'col_3'); |
828 |
|
|
829 |
$form->setFieldset('date_demande', 'D', _("Depot")); |
$form->setFieldset('date_demande', 'D', _("Depot")); |
837 |
|
|
838 |
$form->setBloc('a_qualifier', 'F'); |
$form->setBloc('a_qualifier', 'F'); |
839 |
$form->setBloc('a_qualifier', 'F'); |
$form->setBloc('a_qualifier', 'F'); |
840 |
|
|
841 |
// |
// |
842 |
$form->setBloc('date_complet', 'D', '', 'col_12'); |
$form->setBloc('date_complet', 'D', '', 'col_12'); |
843 |
|
|
858 |
|
|
859 |
$form->setBloc('parcelle','D',"", "col_12"); |
$form->setBloc('parcelle','D',"", "col_12"); |
860 |
$form->setBloc('geom1','F'); |
$form->setBloc('geom1','F'); |
|
|
|
|
//Fieldset "Localisation du terrain" |
|
|
$form->setBloc('terrain_references_cadastrales','D',"","col_12"); |
|
|
$form->setFieldset('terrain_references_cadastrales','D',_('Localisation du terrain')); |
|
|
$form->setFieldset('terrain_superficie','F',''); |
|
|
$form->setBloc('terrain_superficie','F'); |
|
861 |
|
|
|
$form->setBloc('description','D',"", "col_12"); |
|
|
$form->setBloc('servitude','F',''); |
|
|
} |
|
|
|
|
|
function setRegroupe(&$form,$maj) { |
|
|
//// depot |
|
|
//If ($maj==0){ |
|
|
// $form->setRegroupe('date_demande','D',_("Depot"),$this->aff_depot ); |
|
|
//} |
|
|
//If ($maj==1){ |
|
|
// $form->setRegroupe('dossier','D',_("Depot"), $this->aff_depot); |
|
|
// $form->setRegroupe('date_demande','G',''); |
|
|
//} |
|
|
//$form->setRegroupe('date_depot','G',''); |
|
|
//$form->setRegroupe('division','F',''); |
|
|
|
|
|
|
|
|
|
|
|
$form->setRegroupe('description','D',_('description').' '._('contraintes'), $this->aff_amenagement); |
|
|
$form->setRegroupe('servitude','F',''); |
|
|
|
|
|
|
|
862 |
} |
} |
863 |
|
|
864 |
/* ============================================================= |
/* ============================================================= |
884 |
|
|
885 |
if ($this->f->getParameter('option_erp') != "") { |
if ($this->f->getParameter('option_erp') != "") { |
886 |
// envoi du message a ERP en cas d'un depot du dossier dat |
// envoi du message a ERP en cas d'un depot du dossier dat |
887 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
888 |
$this->f->getParameter('erp_depot_dossier_dat')) { |
$this->f->getParameter('erp_depot_dossier_dat')) { |
889 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
890 |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
892 |
} |
} |
893 |
|
|
894 |
// envoi du message a ERP en cas d'une demande d'ouverture DAT |
// envoi du message a ERP en cas d'une demande d'ouverture DAT |
895 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
896 |
$this->f->getParameter('erp_demande_ouverture_dat')) { |
$this->f->getParameter('erp_demande_ouverture_dat')) { |
897 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
898 |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
901 |
|
|
902 |
if ($this->valF['erp'] === true) { |
if ($this->valF['erp'] === true) { |
903 |
// envoi du message a ERP en cas d'annulation d'une demande |
// envoi du message a ERP en cas d'annulation d'une demande |
904 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
905 |
$this->f->getParameter('erp_annulation_demande')) { |
$this->f->getParameter('erp_annulation_demande')) { |
906 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
907 |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
910 |
|
|
911 |
// envoi du message a ERP en cas d'ouverture d'un dossier PC "rattache" |
// envoi du message a ERP en cas d'ouverture d'un dossier PC "rattache" |
912 |
// au dossier DAACT |
// au dossier DAACT |
913 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
914 |
$this->f->getParameter('erp_demande_ouverture_pc_daact')) { |
$this->f->getParameter('erp_demande_ouverture_pc_daact')) { |
915 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
916 |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
1066 |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR |
1067 |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR |
1068 |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' ) |
( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' ) |
1069 |
ORDER BY section, quartier, arrondissement, dossier_autorisation_type_detaille |
ORDER BY dossier_autorisation_type_detaille, section, quartier, arrondissement |
1070 |
LIMIT 1"; |
LIMIT 1"; |
1071 |
$this->addToLog("getInstructeurDivision : db->query(\"$sql\")", VERBOSE_MODE); |
$this->addToLog("getInstructeurDivision : db->query(\"$sql\")", VERBOSE_MODE); |
1072 |
$res = $this->db->query($sql); |
$res = $this->db->query($sql); |
1181 |
$this->sig_interne($this->valF['dossier'],$db,$val,$DEBUG); |
$this->sig_interne($this->valF['dossier'],$db,$val,$DEBUG); |
1182 |
else{ |
else{ |
1183 |
if($this->maj ==1){ // en maj mettre a null la geometrie si parcelle changée inexistante |
if($this->maj ==1){ // en maj mettre a null la geometrie si parcelle changée inexistante |
1184 |
|
// XXX SERVITUDE |
1185 |
$sql ="update ".DB_PREFIXE."dossier set geom = null, servitude = '', pos= '' where dossier ='".$id."'"; |
$sql ="update ".DB_PREFIXE."dossier set geom = null, servitude = '', pos= '' where dossier ='".$id."'"; |
1186 |
$res = $db -> query($sql); |
$res = $db -> query($sql); |
1187 |
|
// XXX SERVITUDE |
1188 |
$this->addToLog("requete trigger modifier parcelle vide -> maj pos et servitude :".$sql, VERBOSE_MODE); |
$this->addToLog("requete trigger modifier parcelle vide -> maj pos et servitude :".$sql, VERBOSE_MODE); |
1189 |
if (database :: isError($res)) |
if (database :: isError($res)) |
1190 |
die($res->getMessage()."erreur ".$sql); |
die($res->getMessage()."erreur ".$sql); |
1200 |
|
|
1201 |
// envoi du message "ERP Qualifie" pour un dossier DAT qui a besoin |
// envoi du message "ERP Qualifie" pour un dossier DAT qui a besoin |
1202 |
// de la qualification URBA |
// de la qualification URBA |
1203 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
1204 |
$this->f->getParameter('erp_nature_dat')) { |
$this->f->getParameter('erp_nature_dat')) { |
1205 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
1206 |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
$msgenque->setDossierInstructionIdentifier($this->valF['dossier']); |
1207 |
$msgenque->setCompetence($this->valF['autorite_competente']); |
$msgenque->setCompetence($this->valF['autorite_competente']); |
1208 |
|
// XXX SERVITUDE |
1209 |
$msgenque->setContraintePlu($this->valF['servitude']); |
$msgenque->setContraintePlu($this->valF['servitude']); |
1210 |
$msgenque->setReferenceCadastrale( |
$msgenque->setReferenceCadastrale( |
1211 |
$this->getReferenceCadastrale($this->valF['dossier'])); |
$this->getReferenceCadastrale($this->valF['dossier'])); |
1214 |
|
|
1215 |
// envoi des messages a ERP en cas du dossier PC traite par URBA, et |
// envoi des messages a ERP en cas du dossier PC traite par URBA, et |
1216 |
// qui etait classifie come ERP |
// qui etait classifie come ERP |
1217 |
if ($this->getDATDCode($this->valF['dossier']) == |
if ($this->f->getDATDCode($this->valF['dossier']) == |
1218 |
$this->f->getParameter('erp_dossier_nature_pc') |
$this->f->getParameter('erp_dossier_nature_pc') |
1219 |
&& $this->valF['erp'] == true) { |
&& $this->valF['erp'] == true) { |
1220 |
$msgenque = new MessageEnqueuer(); |
$msgenque = new MessageEnqueuer(); |
1258 |
$this->supprimer_dossier_parcelle($this->valF['dossier']); |
$this->supprimer_dossier_parcelle($this->valF['dossier']); |
1259 |
|
|
1260 |
} |
} |
|
|
|
|
/** |
|
|
* Retourne le type de dossier d'autorisation du dossier courant : |
|
|
* - dossier_autorisation_type_detaille.code |
|
|
**/ |
|
|
function getDATDCode($idxDossier) { |
|
|
$sql = "SELECT dossier_autorisation_type_detaille.code |
|
|
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
|
|
INNER JOIN ".DB_PREFIXE."dossier_autorisation |
|
|
ON dossier_autorisation_type_detaille.dossier_autorisation_type_detaille = |
|
|
dossier_autorisation.dossier_autorisation_type_detaille |
|
|
INNER JOIN ".DB_PREFIXE."dossier ON dossier.dossier_autorisation = dossier_autorisation.dossier_autorisation |
|
|
WHERE dossier.dossier = '".$idxDossier."'"; |
|
|
$res = $this -> db -> getOne($sql); |
|
|
$this->f->addToLog("getDATDCode() : db->getOne(\"".$sql."\")", VERBOSE_MODE); |
|
|
if ( database::isError($res)){ |
|
|
die(); |
|
|
} |
|
|
return $res; |
|
|
} |
|
1261 |
|
|
1262 |
|
|
1263 |
/** |
/** |
1362 |
if($this->auto_servitude_point==1) // recherche de servitude point |
if($this->auto_servitude_point==1) // recherche de servitude point |
1363 |
$this->calcul_auto_servitude_point($id,$db,$geom,$projection); |
$this->calcul_auto_servitude_point($id,$db,$geom,$projection); |
1364 |
$temp=strtr($this->servitude,"'"," "); // enleve le ' |
$temp=strtr($this->servitude,"'"," "); // enleve le ' |
1365 |
|
// XXX SERVITUDE |
1366 |
$sql1 ="update ".DB_PREFIXE."dossier set servitude = '".$temp."' where dossier = '".$id."'"; |
$sql1 ="update ".DB_PREFIXE."dossier set servitude = '".$temp."' where dossier = '".$id."'"; |
1367 |
$res1 = $db -> query($sql1); |
$res1 = $db -> query($sql1); |
1368 |
|
// XXX SERVITUDE |
1369 |
$this->addToLog("maj servitudes :".$sql1, VERBOSE_MODE); |
$this->addToLog("maj servitudes :".$sql1, VERBOSE_MODE); |
1370 |
if (database:: isError($res1)) die($res1->getMessage()."erreur ".$sql1); |
if (database:: isError($res1)) die($res1->getMessage()."erreur ".$sql1); |
1371 |
}else{ // parcelle inexistante //*** |
}else{ // parcelle inexistante //*** |
1372 |
if($this->maj ==1){ // en maj mettre a null la geometrie si parcelle changée inexistante |
if($this->maj ==1){ // en maj mettre a null la geometrie si parcelle changée inexistante |
1373 |
|
// XXX SERVITUDE |
1374 |
$sql ="update ".DB_PREFIXE."dossier set geom = null, servitude = '', pos= '' where dossier ='".$id."'"; |
$sql ="update ".DB_PREFIXE."dossier set geom = null, servitude = '', pos= '' where dossier ='".$id."'"; |
1375 |
$res = $db -> query($sql); |
$res = $db -> query($sql); |
1376 |
$this->addToLog("requete sig_interne maj parcelle inexistante :".$sql, VERBOSE_MODE); |
$this->addToLog("requete sig_interne maj parcelle inexistante :".$sql, VERBOSE_MODE); |
1404 |
if (database:: isError($res)) die($res1->getMessage()."erreur ".$sql); |
if (database:: isError($res)) die($res1->getMessage()."erreur ".$sql); |
1405 |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
1406 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
1407 |
|
// XXX SERVITUDE |
1408 |
$this->addToMessage("<br>"._("servitude")." : ".$row['libelle']." - ".$row['observation']); |
$this->addToMessage("<br>"._("servitude")." : ".$row['libelle']." - ".$row['observation']); |
1409 |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." - "; |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." - "; |
1410 |
} |
} |
1417 |
if (database:: isError($res)) die($res1->getMessage()."erreur ".$sql); |
if (database:: isError($res)) die($res1->getMessage()."erreur ".$sql); |
1418 |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
1419 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
1420 |
|
// XXX SERVITUDE |
1421 |
$this->addToMessage("<br>"._("contraintes")." : ".$row['libelle']." - ".$row['observation']); |
$this->addToMessage("<br>"._("contraintes")." : ".$row['libelle']." - ".$row['observation']); |
1422 |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." - "; |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." - "; |
1423 |
} |
} |
1432 |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
$this->addToLog("requete :".$sql." executee ", VERBOSE_MODE); |
1433 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
1434 |
$this->addToMessage("<br>"._("contraintes")." : ".$row['libelle']." - ".$row['observation']." a ".round($row['distance'],2)." m "); |
$this->addToMessage("<br>"._("contraintes")." : ".$row['libelle']." - ".$row['observation']." a ".round($row['distance'],2)." m "); |
1435 |
|
// XXX SERVITUDE |
1436 |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." a ".round($row['distance'],2)." m - "; |
$this->servitude.=" [".$row['libelle']."] ".$row['observation']." a ".round($row['distance'],2)." m - "; |
1437 |
} |
} |
1438 |
} |
} |
1560 |
} |
} |
1561 |
|
|
1562 |
/** |
/** |
1563 |
* Ajout de la liste des demandeurs |
* Récupère la liste des contraintes d'un dossier. |
1564 |
|
* @param string $dossier Identifiant du dossier |
1565 |
|
* |
1566 |
|
* @return object Résultat de la requête |
1567 |
|
*/ |
1568 |
|
function getListContrainte($dossier) { |
1569 |
|
|
1570 |
|
// Select |
1571 |
|
$select = "SELECT dossier_contrainte.dossier_contrainte as dossier_contrainte_id, |
1572 |
|
dossier_contrainte.texte_complete as dossier_contrainte_texte, |
1573 |
|
dossier_contrainte.reference as dossier_contrainte_reference, |
1574 |
|
contrainte.libelle as contrainte_libelle, |
1575 |
|
contrainte.nature as contrainte_nature, |
1576 |
|
contrainte.texte as contrainte_texte, |
1577 |
|
contrainte.reference as contrainte_reference, |
1578 |
|
lower(contrainte.groupe) as contrainte_groupe, |
1579 |
|
lower(contrainte.sousgroupe) as contrainte_sousgroupe "; |
1580 |
|
|
1581 |
|
// From |
1582 |
|
$from = " FROM ".DB_PREFIXE."contrainte |
1583 |
|
LEFT JOIN ".DB_PREFIXE."dossier_contrainte |
1584 |
|
ON dossier_contrainte.contrainte = contrainte.contrainte "; |
1585 |
|
|
1586 |
|
// Where |
1587 |
|
$where = " WHERE dossier_contrainte.dossier = '".$dossier."' "; |
1588 |
|
|
1589 |
|
// Si le paramètre "option_contrainte_di" est définit |
1590 |
|
if ($this->f->getParameter('option_contrainte_di') != 'aucun') { |
1591 |
|
// Ajoute la condition |
1592 |
|
$where .= $this->f->traitement_condition_contrainte( |
1593 |
|
$this->f->getParameter('option_contrainte_di')); |
1594 |
|
} |
1595 |
|
|
1596 |
|
// Tri |
1597 |
|
$tri = " ORDER BY contrainte_groupe, contrainte_sousgroupe, |
1598 |
|
contrainte.no_ordre, contrainte.libelle "; |
1599 |
|
|
1600 |
|
// Requête SQL |
1601 |
|
$sql = $select.$from.$where.$tri; |
1602 |
|
$res = $this->f->db->query($sql); |
1603 |
|
$this->f->addToLog("listContrainte(): db->query(\"".$sql."\");", VERBOSE_MODE); |
1604 |
|
$this->f->isDatabaseError($res); |
1605 |
|
|
1606 |
|
// Retourne le résultat |
1607 |
|
return $res; |
1608 |
|
} |
1609 |
|
|
1610 |
|
/** |
1611 |
|
* Ajout de la liste des contraintes et des demandeurs |
1612 |
*/ |
*/ |
1613 |
function formSpecificContent($maj) { |
function formSpecificContent($maj) { |
1614 |
|
|
1615 |
|
/** |
1616 |
|
* Liste des contraintes |
1617 |
|
*/ |
1618 |
|
// |
1619 |
|
$listContrainte = $this->getListContrainte($this->getVal('dossier')); |
1620 |
|
|
1621 |
|
// Si le dossier possède des contraintes |
1622 |
|
if ($listContrainte->numRows() != 0) { |
1623 |
|
|
1624 |
|
// Affiche du fieldset |
1625 |
|
printf("<div id=\"liste_contrainte\" class=\"demande_hidden_bloc col_12\">"); |
1626 |
|
printf("<fieldset class=\"cadre ui-corner-all ui-widget-content\">"); |
1627 |
|
printf(" <legend class=\"ui-corner-all ui-widget-content ui-state-active\">" |
1628 |
|
._("dossier_contrainte")."</legend>"); |
1629 |
|
|
1630 |
|
// Entête pour le groupe |
1631 |
|
$groupeHeader = " |
1632 |
|
<div class='dossier_contrainte_groupe'> |
1633 |
|
<div class='dossier_contrainte_groupe_header'> |
1634 |
|
<span class='name'> |
1635 |
|
%s |
1636 |
|
</span> |
1637 |
|
</div> |
1638 |
|
"; |
1639 |
|
|
1640 |
|
// Entête pour le sous-groupe |
1641 |
|
$sousgroupeHeader = " |
1642 |
|
<div class='dossier_contrainte_sousgroupe'> |
1643 |
|
<div class='dossier_contrainte_sousgroupe_header'> |
1644 |
|
<span class='name'> |
1645 |
|
%s |
1646 |
|
</span> |
1647 |
|
</div> |
1648 |
|
"; |
1649 |
|
|
1650 |
|
// Titres des colonnes |
1651 |
|
$tableHeader = " |
1652 |
|
<thead> |
1653 |
|
<tr class='ui-tabs-nav ui-accordion ui-state-default tab-title'> |
1654 |
|
<th class='title col-0 firstcol'> |
1655 |
|
<span class='name'> |
1656 |
|
"._('texte_complete')." |
1657 |
|
</span> |
1658 |
|
</th> |
1659 |
|
<th class='title col-1'> |
1660 |
|
<span class='name'> |
1661 |
|
"._('reference')." |
1662 |
|
</span> |
1663 |
|
</th> |
1664 |
|
<th class='title col-2'> |
1665 |
|
<span class='name'> |
1666 |
|
"._('nature')." |
1667 |
|
</span> |
1668 |
|
</th> |
1669 |
|
</tr> |
1670 |
|
</thead> |
1671 |
|
"; |
1672 |
|
|
1673 |
|
// Ligne de données |
1674 |
|
$line = " |
1675 |
|
<tr class='tab-data %s'> |
1676 |
|
<td class='col-0 firstcol'> |
1677 |
|
%s |
1678 |
|
</td> |
1679 |
|
<td class='col-1'> |
1680 |
|
%s |
1681 |
|
</td> |
1682 |
|
<td class='col-2'> |
1683 |
|
%s |
1684 |
|
</td> |
1685 |
|
"; |
1686 |
|
|
1687 |
|
// Sauvegarde des données pour les comparer |
1688 |
|
$lastRow = array(); |
1689 |
|
$lastRow['contrainte_groupe'] = ''; |
1690 |
|
$lastRow['contrainte_sousgroupe'] = ''; |
1691 |
|
|
1692 |
|
// Tant qu'il y a des résultats |
1693 |
|
while($row = &$listContrainte->fetchRow(DB_FETCHMODE_ASSOC)) { |
1694 |
|
// Si l'identifiant du groupe de la contrainte présente et |
1695 |
|
// celle d'avant est différent |
1696 |
|
if ($row['contrainte_groupe'] != $lastRow['contrainte_groupe']) { |
1697 |
|
|
1698 |
|
// Si l'identifiant du groupe d'avant est vide |
1699 |
|
if ($lastRow['contrainte_groupe'] != '') { |
1700 |
|
// Ferme le tableau |
1701 |
|
printf("</table>"); |
1702 |
|
// Ferme le div |
1703 |
|
printf("</div>"); |
1704 |
|
// Ferme le div |
1705 |
|
printf("</div>"); |
1706 |
|
} |
1707 |
|
|
1708 |
|
// Affiche le header du groupe |
1709 |
|
printf($groupeHeader, $row['contrainte_groupe']); |
1710 |
|
} |
1711 |
|
|
1712 |
|
// Si l'identifiant du sous-groupe de la contrainte présente et |
1713 |
|
// celle d'avant est différent |
1714 |
|
if ($row['contrainte_sousgroupe'] != $lastRow['contrainte_sousgroupe']) { |
1715 |
|
|
1716 |
|
// |
1717 |
|
if($row['contrainte_groupe'] == $lastRow['contrainte_groupe']) { |
1718 |
|
// Si l'identifiant de la sous-groupe d'avant est vide |
1719 |
|
if ($lastRow['contrainte_sousgroupe'] != '') { |
1720 |
|
// Ferme le tableau |
1721 |
|
printf("</table>"); |
1722 |
|
// Ferme le div |
1723 |
|
printf("</div>"); |
1724 |
|
} |
1725 |
|
} |
1726 |
|
|
1727 |
|
// Affiche le header du sous-groupe |
1728 |
|
printf($sousgroupeHeader, $row['contrainte_sousgroupe']); |
1729 |
|
|
1730 |
|
// Ouvre le tableau |
1731 |
|
printf("<table id='sousgroupe_".$row['contrainte_sousgroupe']."' class='tab-tab dossier_contrainte_view'>"); |
1732 |
|
|
1733 |
|
// Affiche le header des données |
1734 |
|
printf($tableHeader); |
1735 |
|
|
1736 |
|
// Définis le style des lignes |
1737 |
|
$style = 'odd'; |
1738 |
|
} |
1739 |
|
|
1740 |
|
// Si toujours dans la même groupe et même sous-groupe, |
1741 |
|
// on change le style de la ligne |
1742 |
|
if ($row['contrainte_groupe'] == $lastRow['contrainte_groupe'] |
1743 |
|
&& $row['contrainte_sousgroupe'] == $lastRow['contrainte_sousgroupe']) { |
1744 |
|
// Définis le style |
1745 |
|
$style = ($style=='even')?'odd':'even'; |
1746 |
|
} |
1747 |
|
|
1748 |
|
// Affiche "Oui" ou "Non" pour le bouléen |
1749 |
|
if ($row['dossier_contrainte_reference'] == 1 |
1750 |
|
|| $row['dossier_contrainte_reference'] == "t" |
1751 |
|
|| $row['dossier_contrainte_reference'] == "Oui") { |
1752 |
|
// |
1753 |
|
$contrainte_reference = "Oui"; |
1754 |
|
} else { |
1755 |
|
// |
1756 |
|
$contrainte_reference = "Non"; |
1757 |
|
} |
1758 |
|
|
1759 |
|
// Affiche les données |
1760 |
|
printf($line, $style, |
1761 |
|
$row['dossier_contrainte_texte'], |
1762 |
|
$contrainte_reference, |
1763 |
|
$row['contrainte_nature'] |
1764 |
|
); |
1765 |
|
|
1766 |
|
// Sauvegarde les données |
1767 |
|
$lastRow['contrainte_groupe'] = $row['contrainte_groupe']; |
1768 |
|
$lastRow['contrainte_sousgroupe'] = $row['contrainte_sousgroupe']; |
1769 |
|
|
1770 |
|
} |
1771 |
|
// Ferme le tableau |
1772 |
|
printf("</table>"); |
1773 |
|
// Ferme le sous-groupe |
1774 |
|
printf("</div>"); |
1775 |
|
// Ferme le groupe |
1776 |
|
printf("</div>"); |
1777 |
|
|
1778 |
|
printf("</div>"); |
1779 |
|
printf("</fieldset>"); |
1780 |
|
} |
1781 |
|
/** |
1782 |
|
* Fin Liste des contraintes |
1783 |
|
*/ |
1784 |
|
|
1785 |
|
/** |
1786 |
|
* Liste des demandeurs |
1787 |
|
*/ |
1788 |
$this->listeDemandeur("dossier", $this->getVal('dossier')); |
$this->listeDemandeur("dossier", $this->getVal('dossier')); |
1789 |
|
|
1790 |
if($maj < 2 AND !$this->correct AND !$this->f->isUserQualificateur()) { |
if($maj < 2 AND !$this->correct AND !$this->f->isUserQualificateur()) { |
1890 |
echo "</div>"; |
echo "</div>"; |
1891 |
echo "</fieldset>"; |
echo "</fieldset>"; |
1892 |
echo "</div>"; |
echo "</div>"; |
1893 |
|
/** |
1894 |
|
* Fin liste des demandeurs |
1895 |
|
*/ |
1896 |
} |
} |
1897 |
|
|
1898 |
/** |
/** |
1984 |
} else { |
} else { |
1985 |
echo "obj=".get_class($this); |
echo "obj=".get_class($this); |
1986 |
} |
} |
1987 |
|
if (isset($_GET['retourformulaire2']) && $_GET['retourformulaire2'] != '') { |
1988 |
|
echo "&retourformulaire=".$_GET['retourformulaire2']; |
1989 |
|
} |
1990 |
if($this->getParameter("retour")=="form") { |
if($this->getParameter("retour")=="form") { |
1991 |
echo "&idx=".$this->getParameter("idx"); |
echo "&idx=".$this->getParameter("idx"); |
1992 |
echo "&idz=".$this->getParameter("idz"); |
echo "&idz=".$this->getParameter("idz"); |
2031 |
$demandeur = $this->get_demandeur($this->getVal("dossier")); |
$demandeur = $this->get_demandeur($this->getVal("dossier")); |
2032 |
// Si le demandeur existe |
// Si le demandeur existe |
2033 |
if (isset($demandeur) && trim($demandeur) != '') { |
if (isset($demandeur) && trim($demandeur) != '') { |
2034 |
$ent .= " ".strtoupper($demandeur); |
$ent .= " ".mb_strtoupper($demandeur, "UTF-8"); |
2035 |
} |
} |
2036 |
} |
} |
2037 |
} |
} |
2071 |
} |
} |
2072 |
|
|
2073 |
/** |
/** |
2074 |
* Récupère la durée de validité du type détaillé du dossier d'autorisation |
* Récupère la durée de validité |
2075 |
* @param string $dossier_autorisation Identifiant dossier d'autorisation |
* @param string $dossier_autorisation Identifiant dossier d'autorisation |
2076 |
* @return intger Durée de validité |
* @return intger Durée de validité |
2077 |
*/ |
*/ |
2080 |
// init de la variable de retour |
// init de la variable de retour |
2081 |
$duree_validite = ""; |
$duree_validite = ""; |
2082 |
|
|
2083 |
// Récupération de la duree de validite du dossier d'autorisation |
// Récupère le numéro de version |
2084 |
$sql = "SELECT duree_validite_parametrage |
$numeroVersion = $this->getNumeroVersion($dossier_autorisation); |
2085 |
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
|
2086 |
LEFT JOIN ".DB_PREFIXE."dossier_autorisation |
// Si c'est l'ajout du dossier initial |
2087 |
ON dossier_autorisation.dossier_autorisation_type_detaille = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
if ($numeroVersion < 0) { |
2088 |
WHERE dossier_autorisation.dossier_autorisation='".$dossier_autorisation."'"; |
|
2089 |
$duree_validite = $this->db->getOne($sql); |
// Récupération de la duree de validite depuis la table |
2090 |
$this->f->addToLog("get_duree_validite(): db->getOne(\"".$sql."\");", VERBOSE_MODE); |
// "dossier_autorisation_type_detaille" |
2091 |
database::isError($duree_validite); |
$sql = "SELECT duree_validite_parametrage |
2092 |
|
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
2093 |
|
LEFT JOIN ".DB_PREFIXE."dossier_autorisation |
2094 |
|
ON dossier_autorisation.dossier_autorisation_type_detaille = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
2095 |
|
WHERE dossier_autorisation.dossier_autorisation='".$dossier_autorisation."'"; |
2096 |
|
$duree_validite = $this->db->getOne($sql); |
2097 |
|
$this->f->addToLog("get_duree_validite(): db->getOne(\"".$sql."\");", VERBOSE_MODE); |
2098 |
|
database::isError($duree_validite); |
2099 |
|
|
2100 |
|
} else { |
2101 |
|
|
2102 |
|
// Récupération de la duree de validite depuis le P0 |
2103 |
|
$sql = "SELECT duree_validite |
2104 |
|
FROM ".DB_PREFIXE."dossier |
2105 |
|
LEFT JOIN ".DB_PREFIXE."dossier_autorisation |
2106 |
|
ON dossier_autorisation.dossier_autorisation = dossier.dossier_autorisation |
2107 |
|
WHERE dossier_autorisation.dossier_autorisation='".$dossier_autorisation."' |
2108 |
|
AND dossier.version = 0"; |
2109 |
|
$duree_validite = $this->db->getOne($sql); |
2110 |
|
$this->f->addToLog("get_duree_validite(): db->getOne(\"".$sql."\");", VERBOSE_MODE); |
2111 |
|
database::isError($duree_validite); |
2112 |
|
} |
2113 |
|
|
2114 |
// retourne le résultat |
// retourne le résultat |
2115 |
return $duree_validite; |
return $duree_validite; |