1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
nhaye |
2099 |
//gen openMairie le 17/07/2013 18:52 |
4 |
nhaye |
428 |
|
5 |
fraynaud |
3 |
$DEBUG=0; |
6 |
|
|
$serie=15; |
7 |
|
|
$ico="../img/ico_application.png"; |
8 |
atreal |
307 |
$ent = _("application")." -> "._("instruction"); |
9 |
fraynaud |
3 |
if(!isset($premier)) $premier=''; |
10 |
|
|
if(!isset($recherche1)) $recherche1=''; |
11 |
|
|
if(!isset($tricolsf)) $tricolsf=''; |
12 |
|
|
if(!isset($premiersf)) $premiersf=''; |
13 |
|
|
if(!isset($selection)) $selection=''; |
14 |
|
|
if(!isset($retourformulaire)) $retourformulaire=''; |
15 |
nhaye |
428 |
if (isset($idx) && $idx != ']' && trim($idx) != '') { |
16 |
|
|
$ent .= "-> ".$idx." "; |
17 |
fraynaud |
3 |
} |
18 |
nhaye |
428 |
if (isset($idz) && trim($idz) != '') { |
19 |
|
|
$ent .= " ".strtoupper($idz)." "; |
20 |
|
|
} |
21 |
|
|
// FROM |
22 |
|
|
$table = DB_PREFIXE."instruction |
23 |
fmichon |
455 |
LEFT JOIN ".DB_PREFIXE."action |
24 |
|
|
ON instruction.action=action.action |
25 |
nhaye |
1717 |
LEFT JOIN ".DB_PREFIXE."etat as etat1 |
26 |
|
|
ON instruction.archive_etat_pendant_incompletude=etat1.etat |
27 |
|
|
LEFT JOIN ".DB_PREFIXE."evenement as evenement2 |
28 |
|
|
ON instruction.archive_evenement_suivant_tacite=evenement2.evenement |
29 |
|
|
LEFT JOIN ".DB_PREFIXE."evenement as evenement3 |
30 |
|
|
ON instruction.archive_evenement_suivant_tacite_incompletude=evenement3.evenement |
31 |
vpihour |
489 |
LEFT JOIN ".DB_PREFIXE."avis_decision |
32 |
|
|
ON instruction.avis_decision=avis_decision.avis_decision |
33 |
softime |
2030 |
LEFT JOIN ".DB_PREFIXE."document_numerise |
34 |
|
|
ON instruction.document_numerise=document_numerise.document_numerise |
35 |
nhaye |
428 |
LEFT JOIN ".DB_PREFIXE."dossier |
36 |
|
|
ON instruction.dossier=dossier.dossier |
37 |
softime |
2030 |
LEFT JOIN ".DB_PREFIXE."etat as etat7 |
38 |
|
|
ON instruction.etat=etat7.etat |
39 |
|
|
LEFT JOIN ".DB_PREFIXE."evenement as evenement8 |
40 |
|
|
ON instruction.evenement=evenement8.evenement |
41 |
vpihour |
1226 |
LEFT JOIN ".DB_PREFIXE."signataire_arrete |
42 |
|
|
ON instruction.signataire_arrete=signataire_arrete.signataire_arrete "; |
43 |
nhaye |
428 |
// SELECT |
44 |
|
|
$champAffiche = array( |
45 |
|
|
'instruction.instruction as "'._("instruction").'"', |
46 |
|
|
'instruction.destinataire as "'._("destinataire").'"', |
47 |
vpihour |
1127 |
'to_char(instruction.date_evenement ,\'DD/MM/YYYY\') as "'._("date_evenement").'"', |
48 |
softime |
2030 |
'evenement8.libelle as "'._("evenement").'"', |
49 |
nhaye |
428 |
'instruction.lettretype as "'._("lettretype").'"', |
50 |
nhaye |
1144 |
'dossier.annee as "'._("dossier").'"', |
51 |
nhaye |
428 |
'action.libelle as "'._("action").'"', |
52 |
|
|
'instruction.delai as "'._("delai").'"', |
53 |
softime |
2030 |
'etat7.libelle as "'._("etat").'"', |
54 |
nhaye |
428 |
'instruction.accord_tacite as "'._("accord_tacite").'"', |
55 |
|
|
'instruction.delai_notification as "'._("delai_notification").'"', |
56 |
|
|
'instruction.archive_delai as "'._("archive_delai").'"', |
57 |
|
|
'to_char(instruction.archive_date_complet ,\'DD/MM/YYYY\') as "'._("archive_date_complet").'"', |
58 |
|
|
'to_char(instruction.archive_date_rejet ,\'DD/MM/YYYY\') as "'._("archive_date_rejet").'"', |
59 |
|
|
'to_char(instruction.archive_date_limite ,\'DD/MM/YYYY\') as "'._("archive_date_limite").'"', |
60 |
|
|
'to_char(instruction.archive_date_notification_delai ,\'DD/MM/YYYY\') as "'._("archive_date_notification_delai").'"', |
61 |
|
|
'instruction.archive_accord_tacite as "'._("archive_accord_tacite").'"', |
62 |
|
|
'instruction.archive_etat as "'._("archive_etat").'"', |
63 |
|
|
'to_char(instruction.archive_date_decision ,\'DD/MM/YYYY\') as "'._("archive_date_decision").'"', |
64 |
|
|
'instruction.archive_avis as "'._("archive_avis").'"', |
65 |
|
|
'to_char(instruction.archive_date_validite ,\'DD/MM/YYYY\') as "'._("archive_date_validite").'"', |
66 |
|
|
'to_char(instruction.archive_date_achevement ,\'DD/MM/YYYY\') as "'._("archive_date_achevement").'"', |
67 |
|
|
'to_char(instruction.archive_date_chantier ,\'DD/MM/YYYY\') as "'._("archive_date_chantier").'"', |
68 |
|
|
'to_char(instruction.archive_date_conformite ,\'DD/MM/YYYY\') as "'._("archive_date_conformite").'"', |
69 |
vpihour |
489 |
'avis_decision.libelle as "'._("avis_decision").'"', |
70 |
vpihour |
1128 |
'to_char(instruction.date_finalisation_courrier ,\'DD/MM/YYYY\') as "'._("date_finalisation_courrier").'"', |
71 |
vpihour |
1127 |
'to_char(instruction.date_envoi_signature ,\'DD/MM/YYYY\') as "'._("date_envoi_signature").'"', |
72 |
|
|
'to_char(instruction.date_retour_signature ,\'DD/MM/YYYY\') as "'._("date_retour_signature").'"', |
73 |
|
|
'to_char(instruction.date_envoi_rar ,\'DD/MM/YYYY\') as "'._("date_envoi_rar").'"', |
74 |
|
|
'to_char(instruction.date_retour_rar ,\'DD/MM/YYYY\') as "'._("date_retour_rar").'"', |
75 |
|
|
'to_char(instruction.date_envoi_controle_legalite ,\'DD/MM/YYYY\') as "'._("date_envoi_controle_legalite").'"', |
76 |
|
|
'to_char(instruction.date_retour_controle_legalite ,\'DD/MM/YYYY\') as "'._("date_retour_controle_legalite").'"', |
77 |
vpihour |
1226 |
'signataire_arrete.civilite as "'._("signataire_arrete").'"', |
78 |
vpihour |
1289 |
'instruction.numero_arrete as "'._("numero_arrete").'"', |
79 |
nhaye |
1571 |
'to_char(instruction.archive_date_dernier_depot ,\'DD/MM/YYYY\') as "'._("archive_date_dernier_depot").'"', |
80 |
nhaye |
1717 |
"case instruction.archive_incompletude when 't' then 'Oui' else 'Non' end as \""._("archive_incompletude")."\"", |
81 |
|
|
'evenement2.libelle as "'._("archive_evenement_suivant_tacite").'"', |
82 |
|
|
'evenement3.libelle as "'._("archive_evenement_suivant_tacite_incompletude").'"', |
83 |
|
|
'etat1.libelle as "'._("archive_etat_pendant_incompletude").'"', |
84 |
|
|
'to_char(instruction.archive_date_limite_incompletude ,\'DD/MM/YYYY\') as "'._("archive_date_limite_incompletude").'"', |
85 |
|
|
'instruction.archive_delai_incompletude as "'._("archive_delai_incompletude").'"', |
86 |
vpihour |
1782 |
'instruction.code_barres as "'._("code_barres").'"', |
87 |
vpihour |
1894 |
'instruction.om_fichier_instruction as "'._("om_fichier_instruction").'"', |
88 |
|
|
"case instruction.om_final_instruction when 't' then 'Oui' else 'Non' end as \""._("om_final_instruction")."\"", |
89 |
softime |
2030 |
'document_numerise.uid as "'._("document_numerise").'"', |
90 |
nhaye |
2099 |
'instruction.archive_autorite_competente as "'._("archive_autorite_competente").'"', |
91 |
atreal |
307 |
); |
92 |
nhaye |
428 |
// |
93 |
|
|
$champNonAffiche = array( |
94 |
|
|
'instruction.complement as "'._("complement").'"', |
95 |
|
|
'instruction.complement2 as "'._("complement2").'"', |
96 |
|
|
'instruction.complement3 as "'._("complement3").'"', |
97 |
|
|
'instruction.complement4 as "'._("complement4").'"', |
98 |
|
|
'instruction.complement5 as "'._("complement5").'"', |
99 |
|
|
'instruction.complement6 as "'._("complement6").'"', |
100 |
|
|
'instruction.complement7 as "'._("complement7").'"', |
101 |
|
|
'instruction.complement8 as "'._("complement8").'"', |
102 |
|
|
'instruction.complement9 as "'._("complement9").'"', |
103 |
|
|
'instruction.complement10 as "'._("complement10").'"', |
104 |
|
|
'instruction.complement11 as "'._("complement11").'"', |
105 |
|
|
'instruction.complement12 as "'._("complement12").'"', |
106 |
|
|
'instruction.complement13 as "'._("complement13").'"', |
107 |
|
|
'instruction.complement14 as "'._("complement14").'"', |
108 |
|
|
'instruction.complement15 as "'._("complement15").'"', |
109 |
atreal |
307 |
); |
110 |
nhaye |
428 |
// |
111 |
|
|
$champRecherche = array( |
112 |
|
|
'instruction.instruction as "'._("instruction").'"', |
113 |
|
|
'instruction.destinataire as "'._("destinataire").'"', |
114 |
softime |
2030 |
'evenement8.libelle as "'._("evenement").'"', |
115 |
nhaye |
428 |
'instruction.lettretype as "'._("lettretype").'"', |
116 |
nhaye |
1295 |
'dossier.annee as "'._("dossier").'"', |
117 |
nhaye |
428 |
'action.libelle as "'._("action").'"', |
118 |
|
|
'instruction.delai as "'._("delai").'"', |
119 |
softime |
2030 |
'etat7.libelle as "'._("etat").'"', |
120 |
nhaye |
428 |
'instruction.accord_tacite as "'._("accord_tacite").'"', |
121 |
|
|
'instruction.delai_notification as "'._("delai_notification").'"', |
122 |
|
|
'instruction.archive_delai as "'._("archive_delai").'"', |
123 |
|
|
'instruction.archive_accord_tacite as "'._("archive_accord_tacite").'"', |
124 |
|
|
'instruction.archive_etat as "'._("archive_etat").'"', |
125 |
|
|
'instruction.archive_avis as "'._("archive_avis").'"', |
126 |
vpihour |
489 |
'avis_decision.libelle as "'._("avis_decision").'"', |
127 |
nhaye |
1295 |
'signataire_arrete.civilite as "'._("signataire_arrete").'"', |
128 |
vpihour |
1289 |
'instruction.numero_arrete as "'._("numero_arrete").'"', |
129 |
nhaye |
1717 |
'evenement2.libelle as "'._("archive_evenement_suivant_tacite").'"', |
130 |
|
|
'evenement3.libelle as "'._("archive_evenement_suivant_tacite_incompletude").'"', |
131 |
|
|
'etat1.libelle as "'._("archive_etat_pendant_incompletude").'"', |
132 |
|
|
'instruction.archive_delai_incompletude as "'._("archive_delai_incompletude").'"', |
133 |
vpihour |
1782 |
'instruction.code_barres as "'._("code_barres").'"', |
134 |
vpihour |
1894 |
'instruction.om_fichier_instruction as "'._("om_fichier_instruction").'"', |
135 |
softime |
2030 |
'document_numerise.uid as "'._("document_numerise").'"', |
136 |
nhaye |
2099 |
'instruction.archive_autorite_competente as "'._("archive_autorite_competente").'"', |
137 |
atreal |
307 |
); |
138 |
nhaye |
428 |
$tri="ORDER BY instruction.destinataire ASC NULLS LAST"; |
139 |
fraynaud |
3 |
$edition="instruction"; |
140 |
|
|
$selection=''; |
141 |
fmichon |
455 |
if ($retourformulaire== 'action') { |
142 |
|
|
$selection=" WHERE (instruction.action ='".$idx."')"; |
143 |
|
|
} |
144 |
nhaye |
1717 |
if ($retourformulaire== 'etat') { |
145 |
|
|
$selection=" WHERE (instruction.archive_etat_pendant_incompletude ='".$idx."' OR instruction.etat ='".$idx."')"; |
146 |
|
|
} |
147 |
|
|
if ($retourformulaire== 'evenement') { |
148 |
|
|
$selection=" WHERE (instruction.archive_evenement_suivant_tacite ='".$idx."' OR instruction.archive_evenement_suivant_tacite_incompletude ='".$idx."' OR instruction.evenement ='".$idx."')"; |
149 |
|
|
} |
150 |
vpihour |
489 |
if ($retourformulaire== 'avis_decision') { |
151 |
|
|
$selection=" WHERE (instruction.avis_decision ='".$idx."')"; |
152 |
fmichon |
455 |
} |
153 |
softime |
2030 |
if ($retourformulaire== 'document_numerise') { |
154 |
|
|
$selection=" WHERE (instruction.document_numerise ='".$idx."')"; |
155 |
|
|
} |
156 |
nhaye |
428 |
if ($retourformulaire== 'dossier') { |
157 |
|
|
$selection=" WHERE (instruction.dossier ='".$idx."')"; |
158 |
|
|
} |
159 |
vpihour |
1226 |
if ($retourformulaire== 'signataire_arrete') { |
160 |
|
|
$selection=" WHERE (instruction.signataire_arrete ='".$idx."')"; |
161 |
|
|
} |
162 |
fmichon |
1005 |
$sousformulaire = array( |
163 |
|
|
'demande',); |
164 |
fraynaud |
3 |
?> |