2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 10/02/2011 20:39 |
//gen openMairie le 10/02/2011 20:39 |
4 |
include('../gen/sql/pgsql/dossier.inc.php'); |
include('../gen/sql/pgsql/dossier.inc.php'); |
|
?> |
|
5 |
|
|
6 |
|
/*Tables sur lesquels la requête va s'effectuer*/ |
7 |
|
$table = DB_PREFIXE."dossier |
8 |
|
LEFT JOIN ".DB_PREFIXE."instructeur |
9 |
|
ON dossier.instructeur = instructeur.instructeur |
10 |
|
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
11 |
|
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur |
12 |
|
LEFT JOIN ".DB_PREFIXE."avis_decision |
13 |
|
ON avis_decision.avis_decision=dossier.avis_decision |
14 |
|
LEFT JOIN ".DB_PREFIXE."division |
15 |
|
ON dossier.division=division.division"; |
16 |
|
|
17 |
|
/*Champs du début de la requête*/ |
18 |
|
$champAffiche=array( |
19 |
|
'dossier.dossier as "'._("dossier").'"', |
20 |
|
'dossier.demandeur_nom as "'._("demandeur_nom").'"', |
21 |
|
'instructeur.nom as "'._("instructeur").'"', |
22 |
|
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
23 |
|
'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"', |
24 |
|
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
25 |
|
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
26 |
|
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
27 |
|
'etat as "'._("etat").'"', |
28 |
|
'avis_decision.libelle as "'._("avis_decision").'"', |
29 |
|
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END || |
30 |
|
CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_urba-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END |
31 |
|
as "'._("enjeu").'"', |
32 |
|
); |
33 |
|
|
34 |
|
/*Tri*/ |
35 |
|
$tri= "order by dossier.dossier"; |
36 |
|
|
37 |
|
/*Recherche simple*/ |
38 |
|
$champRecherche=array( 'dossier.dossier as "'._("dossier").'"', |
39 |
|
'dossier.demandeur_nom as "'._("demandeur_nom").'"',); |
40 |
|
|
41 |
|
/*Icone*/ |
42 |
|
$ico = "../img/ico_dossier.png"; |
43 |
|
|
44 |
|
$edition=""; |
45 |
|
|
46 |
|
/*Si l'on se trouve dans le formulaire architecte, mettre certaines actions |
47 |
|
* au tableau*/ |
48 |
|
if ($retourformulaire== 'architecte'){ |
49 |
|
$tab_actions['corner']['ajouter'] = NULL; |
50 |
|
$tab_actions['left']['consulter'] = NULL; |
51 |
|
$tab_actions['content'] =NULL; |
52 |
|
$selection=" where dossier.architecte ='".$idx."'"; |
53 |
|
} |
54 |
|
/*Si l'on se trouve dans le formulaire travaux, mettre certaines actions |
55 |
|
* au tableau*/ |
56 |
|
if ($retourformulaire== 'travaux'){ |
57 |
|
$tab_actions['corner']['ajouter'] = NULL; |
58 |
|
$tab_actions['left']['consulter'] = NULL; |
59 |
|
$tab_actions['content'] =NULL; |
60 |
|
$selection=" where dossier.travaux ='".$idx."'"; |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
65 |
|
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
66 |
|
// Configuration de la recherche avancee |
67 |
|
if (!isset($options)) { |
68 |
|
$options = array(); |
69 |
|
} |
70 |
|
// Options pour les select de faux booléens |
71 |
|
$args = array( |
72 |
|
0 => array("", "Oui", "Non", ), |
73 |
|
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
74 |
|
); |
75 |
|
/*Champs pour la recherche avancée*/ |
76 |
|
$champs['dossier'] = array( |
77 |
|
'table' => 'dossier', |
78 |
|
'colonne' => 'dossier', |
79 |
|
'type' => 'text', |
80 |
|
'taille' => 30, |
81 |
|
'libelle' => _('dossier')); |
82 |
|
// |
83 |
|
$champs['dossier_autorisation_type_detaille'] = array( |
84 |
|
'table' => 'dossier_autorisation_type_detaille', |
85 |
|
'colonne' => 'dossier_autorisation_type_detaille', |
86 |
|
'type' => 'select', |
87 |
|
'taille' => 30, |
88 |
|
'libelle' => _('dossier_autorisation_type_detaille')); |
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
// |
93 |
|
$champs['delegataire_nom'] = array( |
94 |
|
'table' => 'dossier', |
95 |
|
'colonne' => 'delegataire_nom', |
96 |
|
'type' => 'text', |
97 |
|
'taille' => 30, |
98 |
|
'libelle' => _('nom delegataire')); |
99 |
|
// |
100 |
|
$champs['demandeur_nom'] = array( |
101 |
|
'table' => 'dossier', |
102 |
|
'colonne' => 'demandeur_nom', |
103 |
|
'type' => 'text', |
104 |
|
'taille' => 30, |
105 |
|
'libelle' => _('nom demandeur')); |
106 |
|
|
107 |
|
|
108 |
|
// |
109 |
|
$champs['demandeur_societe'] = array( |
110 |
|
'table' => 'dossier', |
111 |
|
'colonne' => 'demandeur_societe', |
112 |
|
'type' => 'text', |
113 |
|
'taille' => 30, |
114 |
|
'libelle' => _('demandeur_societe')); |
115 |
|
// |
116 |
|
$champs['parcelle'] = array( |
117 |
|
'table' => 'dossier', |
118 |
|
'colonne' => 'parcelle', |
119 |
|
'type' => 'text', |
120 |
|
'taille' => 30, |
121 |
|
'libelle' => _('parcelle')); |
122 |
|
|
123 |
|
// |
124 |
|
$champs['rivoli'] = array( |
125 |
|
'table' => 'dossier', |
126 |
|
'colonne' => 'rivoli', |
127 |
|
'type' => 'text', |
128 |
|
'taille' => 30, |
129 |
|
'libelle' => _('rivoli')); |
130 |
|
// |
131 |
|
$champs['terrain_adresse'] = array( |
132 |
|
'table' => 'dossier', |
133 |
|
'colonne' => 'terrain_adresse', |
134 |
|
'type' => 'text', |
135 |
|
'taille' => 30, |
136 |
|
'libelle' => _('terrain_adresse')); |
137 |
|
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
// |
142 |
|
$champs['terrain_adresse_complement'] = array( |
143 |
|
'table' => 'dossier', |
144 |
|
'colonne' => 'terrain_adresse_complement', |
145 |
|
'type' => 'text', |
146 |
|
'taille' => 30, |
147 |
|
'libelle' => _('terrain_adresse_complement')); |
148 |
|
//// COL2 |
149 |
|
|
150 |
|
// |
151 |
|
$champs['etat'] = array( |
152 |
|
'table' => 'dossier', |
153 |
|
'colonne' => 'etat', |
154 |
|
'type' => 'select', |
155 |
|
'libelle' => _('etat')); |
156 |
|
// |
157 |
|
$champs['accord_tacite'] = array( |
158 |
|
'table' => 'dossier', |
159 |
|
'colonne' => 'accord_tacite', |
160 |
|
'type' => 'select', |
161 |
|
"subtype" => "manualselect", |
162 |
|
'libelle' => _('accord_tacite'), |
163 |
|
"args" => $args, |
164 |
|
); |
165 |
|
|
166 |
|
// |
167 |
|
$champs['travaux'] = array( |
168 |
|
'table' => 'dossier', |
169 |
|
'colonne' => 'travaux', |
170 |
|
'type' => 'select', |
171 |
|
'libelle' => _('travaux')); |
172 |
|
|
173 |
|
|
174 |
|
//// COL3 |
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
// |
180 |
|
$champs['instructeur'] = array( |
181 |
|
'table' => 'dossier', |
182 |
|
'colonne' => 'instructeur', |
183 |
|
'type' => 'select', |
184 |
|
'libelle' => _('instructeur')); |
185 |
|
// |
186 |
|
//$champs['architecte'] = array( |
187 |
|
// 'table' => 'dossier', |
188 |
|
// 'colonne' => 'architecte', |
189 |
|
// 'type' => 'select', |
190 |
|
// 'libelle' => _('architecte')); |
191 |
|
|
192 |
|
// |
193 |
|
$champs['date_depot'] = array( |
194 |
|
'colonne' => 'date_depot', |
195 |
|
'table' => 'dossier', |
196 |
|
'libelle' => _('date_depot'), |
197 |
|
'lib1'=> _("debut"), |
198 |
|
'lib2' => _("fin"), |
199 |
|
'type' => 'date', |
200 |
|
'taille' => 8, |
201 |
|
'where' => 'intervaldate'); |
202 |
|
// |
203 |
|
$champs['date_rejet'] = array( |
204 |
|
'colonne' => 'date_rejet', |
205 |
|
'table' => 'dossier', |
206 |
|
'libelle' => _('date_rejet'), |
207 |
|
'lib1'=> _("debut"), |
208 |
|
'lib2' => _("fin"), |
209 |
|
'type' => 'date', |
210 |
|
'taille' => 8, |
211 |
|
'where' => 'intervaldate'); |
212 |
|
|
213 |
|
// |
214 |
|
$champs['date_validite'] = array( |
215 |
|
'colonne' => 'date_validite', |
216 |
|
'table' => 'dossier', |
217 |
|
'libelle' => _('date_validite'), |
218 |
|
'lib1'=> _("debut"), |
219 |
|
'lib2' => _("fin"), |
220 |
|
'type' => 'date', |
221 |
|
'taille' => 8, |
222 |
|
'where' => 'intervaldate'); |
223 |
|
|
224 |
|
|
225 |
|
|
226 |
|
// |
227 |
|
$champs['date_complet'] = array( |
228 |
|
'colonne' => 'date_complet', |
229 |
|
'table' => 'dossier', |
230 |
|
'libelle' => _('date_complet'), |
231 |
|
'lib1'=> _("debut"), |
232 |
|
'lib2' => _("fin"), |
233 |
|
'type' => 'date', |
234 |
|
'taille' => 8, |
235 |
|
'where' => 'intervaldate'); |
236 |
|
// |
237 |
|
$champs['date_decision'] = array( |
238 |
|
'colonne' => 'date_decision', |
239 |
|
'table' => 'dossier', |
240 |
|
'libelle' => _('date_decision'), |
241 |
|
'lib1'=> _("debut"), |
242 |
|
'lib2' => _("fin"), |
243 |
|
'type' => 'date', |
244 |
|
'taille' => 8, |
245 |
|
'where' => 'intervaldate'); |
246 |
|
// |
247 |
|
$champs['date_limite'] = array( |
248 |
|
'colonne' => 'date_limite', |
249 |
|
'table' => 'dossier', |
250 |
|
'libelle' => _('date_limite'), |
251 |
|
'lib1'=> _("debut"), |
252 |
|
'lib2' => _("fin"), |
253 |
|
'type' => 'date', |
254 |
|
'taille' => 8, |
255 |
|
'where' => 'intervaldate'); |
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
|
// |
261 |
|
$champs['date_chantier'] = array( |
262 |
|
'colonne' => 'date_chantier', |
263 |
|
'table' => 'dossier', |
264 |
|
'libelle' => _('date_chantier'), |
265 |
|
'lib1'=> _("debut"), |
266 |
|
'lib2' => _("fin"), |
267 |
|
'type' => 'date', |
268 |
|
'taille' => 8, |
269 |
|
'where' => 'intervaldate'); |
270 |
|
// |
271 |
|
$champs['date_achevement'] = array( |
272 |
|
'colonne' => 'date_achevement', |
273 |
|
'table' => 'dossier', |
274 |
|
'libelle' => _('date_achevement'), |
275 |
|
'lib1'=> _("debut"), |
276 |
|
'lib2' => _("fin"), |
277 |
|
'type' => 'date', |
278 |
|
'taille' => 8, |
279 |
|
'where' => 'intervaldate'); |
280 |
|
// |
281 |
|
$champs['date_conformite'] = array( |
282 |
|
'colonne' => 'date_conformite', |
283 |
|
'table' => 'dossier', |
284 |
|
'libelle' => _('date_conformite'), |
285 |
|
'lib1'=> _("debut"), |
286 |
|
'lib2' => _("fin"), |
287 |
|
'type' => 'date', |
288 |
|
'taille' => 8, |
289 |
|
'where' => 'intervaldate'); |
290 |
|
/*Configuration de la recherche avancée*/ |
291 |
|
$options[] = array( |
292 |
|
'type' => 'search', |
293 |
|
'display' => true, |
294 |
|
'advanced' => $champs, |
295 |
|
'default_form' => 'advanced', |
296 |
|
'absolute_object' => 'dossier'); |
297 |
|
} |
298 |
|
|
299 |
|
/*Ajout de sous-formulaire à notre objet*/ |
300 |
|
$sousformulaire=array("donnees_techniques", |
301 |
|
"instruction", |
302 |
|
"consultation", |
303 |
|
"lot", |
304 |
|
"terrain", |
305 |
|
"blocnote", |
306 |
|
"destination_shon", |
307 |
|
"statistique", |
308 |
|
"dossier_message", |
309 |
|
"dossier_commission", |
310 |
|
"rapport_instruction", |
311 |
|
"dossier_autorisation",); |
312 |
|
|
313 |
|
/*Ajout de paramètre à certains sous-formulaire*/ |
314 |
|
$sousformulaire_parameters = array( |
315 |
|
"consultation" => array( |
316 |
|
"title" => _("consultation(s)"), |
317 |
|
), |
318 |
|
"dossier_message" => array( |
319 |
|
"title" => _("message(s)"), |
320 |
|
), |
321 |
|
"dossier_commission" => array( |
322 |
|
"title" => _("commission(s)"), |
323 |
|
), |
324 |
|
"rapport_instruction" => array( |
325 |
|
"title" => _("rapport d'instruction"), |
326 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
327 |
|
), |
328 |
|
"lot" => array( |
329 |
|
"title" => _("lot(s)"), |
330 |
|
), |
331 |
|
"donnees_techniques" => array( |
332 |
|
"title" => _("donnees techniques"), |
333 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
334 |
|
), |
335 |
|
"dossier_autorisation" => array( |
336 |
|
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
337 |
|
), |
338 |
|
); |
339 |
|
?> |