1 |
<?php |
2 |
//$Id$ |
3 |
//gen openMairie le 10/02/2011 20:39 |
4 |
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 |
$champs['parcelle'] = array( |
92 |
'table' => 'dossier', |
93 |
'colonne' => 'parcelle', |
94 |
'type' => 'text', |
95 |
'taille' => 30, |
96 |
'libelle' => _('parcelle')); |
97 |
//// COL2 |
98 |
|
99 |
// |
100 |
$champs['etat'] = array( |
101 |
'table' => 'dossier', |
102 |
'colonne' => 'etat', |
103 |
'type' => 'select', |
104 |
'libelle' => _('etat')); |
105 |
// |
106 |
$champs['accord_tacite'] = array( |
107 |
'table' => 'dossier', |
108 |
'colonne' => 'accord_tacite', |
109 |
'type' => 'select', |
110 |
"subtype" => "manualselect", |
111 |
'libelle' => _('accord_tacite'), |
112 |
"args" => $args, |
113 |
); |
114 |
|
115 |
//// COL3 |
116 |
|
117 |
|
118 |
|
119 |
|
120 |
// |
121 |
$champs['instructeur'] = array( |
122 |
'table' => 'dossier', |
123 |
'colonne' => 'instructeur', |
124 |
'type' => 'select', |
125 |
'libelle' => _('instructeur')); |
126 |
// |
127 |
//$champs['architecte'] = array( |
128 |
// 'table' => 'dossier', |
129 |
// 'colonne' => 'architecte', |
130 |
// 'type' => 'select', |
131 |
// 'libelle' => _('architecte')); |
132 |
|
133 |
// |
134 |
$champs['date_depot'] = array( |
135 |
'colonne' => 'date_depot', |
136 |
'table' => 'dossier', |
137 |
'libelle' => _('date_depot'), |
138 |
'lib1'=> _("debut"), |
139 |
'lib2' => _("fin"), |
140 |
'type' => 'date', |
141 |
'taille' => 8, |
142 |
'where' => 'intervaldate'); |
143 |
// |
144 |
$champs['date_rejet'] = array( |
145 |
'colonne' => 'date_rejet', |
146 |
'table' => 'dossier', |
147 |
'libelle' => _('date_rejet'), |
148 |
'lib1'=> _("debut"), |
149 |
'lib2' => _("fin"), |
150 |
'type' => 'date', |
151 |
'taille' => 8, |
152 |
'where' => 'intervaldate'); |
153 |
|
154 |
// |
155 |
$champs['date_validite'] = array( |
156 |
'colonne' => 'date_validite', |
157 |
'table' => 'dossier', |
158 |
'libelle' => _('date_validite'), |
159 |
'lib1'=> _("debut"), |
160 |
'lib2' => _("fin"), |
161 |
'type' => 'date', |
162 |
'taille' => 8, |
163 |
'where' => 'intervaldate'); |
164 |
|
165 |
|
166 |
|
167 |
// |
168 |
$champs['date_complet'] = array( |
169 |
'colonne' => 'date_complet', |
170 |
'table' => 'dossier', |
171 |
'libelle' => _('date_complet'), |
172 |
'lib1'=> _("debut"), |
173 |
'lib2' => _("fin"), |
174 |
'type' => 'date', |
175 |
'taille' => 8, |
176 |
'where' => 'intervaldate'); |
177 |
// |
178 |
$champs['date_decision'] = array( |
179 |
'colonne' => 'date_decision', |
180 |
'table' => 'dossier', |
181 |
'libelle' => _('date_decision'), |
182 |
'lib1'=> _("debut"), |
183 |
'lib2' => _("fin"), |
184 |
'type' => 'date', |
185 |
'taille' => 8, |
186 |
'where' => 'intervaldate'); |
187 |
// |
188 |
$champs['date_limite'] = array( |
189 |
'colonne' => 'date_limite', |
190 |
'table' => 'dossier', |
191 |
'libelle' => _('date_limite'), |
192 |
'lib1'=> _("debut"), |
193 |
'lib2' => _("fin"), |
194 |
'type' => 'date', |
195 |
'taille' => 8, |
196 |
'where' => 'intervaldate'); |
197 |
|
198 |
|
199 |
|
200 |
|
201 |
// |
202 |
$champs['date_chantier'] = array( |
203 |
'colonne' => 'date_chantier', |
204 |
'table' => 'dossier', |
205 |
'libelle' => _('date_chantier'), |
206 |
'lib1'=> _("debut"), |
207 |
'lib2' => _("fin"), |
208 |
'type' => 'date', |
209 |
'taille' => 8, |
210 |
'where' => 'intervaldate'); |
211 |
// |
212 |
$champs['date_achevement'] = array( |
213 |
'colonne' => 'date_achevement', |
214 |
'table' => 'dossier', |
215 |
'libelle' => _('date_achevement'), |
216 |
'lib1'=> _("debut"), |
217 |
'lib2' => _("fin"), |
218 |
'type' => 'date', |
219 |
'taille' => 8, |
220 |
'where' => 'intervaldate'); |
221 |
// |
222 |
$champs['date_conformite'] = array( |
223 |
'colonne' => 'date_conformite', |
224 |
'table' => 'dossier', |
225 |
'libelle' => _('date_conformite'), |
226 |
'lib1'=> _("debut"), |
227 |
'lib2' => _("fin"), |
228 |
'type' => 'date', |
229 |
'taille' => 8, |
230 |
'where' => 'intervaldate'); |
231 |
/*Configuration de la recherche avancée*/ |
232 |
$options[] = array( |
233 |
'type' => 'search', |
234 |
'display' => true, |
235 |
'advanced' => $champs, |
236 |
'default_form' => 'advanced', |
237 |
'absolute_object' => 'dossier'); |
238 |
} |
239 |
|
240 |
/*Ajout de sous-formulaire à notre objet*/ |
241 |
$sousformulaire=array("donnees_techniques", |
242 |
"instruction", |
243 |
"consultation", |
244 |
"lot", |
245 |
"dossier_message", |
246 |
"dossier_commission", |
247 |
"rapport_instruction", |
248 |
"dossier_autorisation",); |
249 |
|
250 |
/*Ajout de paramètre à certains sous-formulaire*/ |
251 |
$sousformulaire_parameters = array( |
252 |
"consultation" => array( |
253 |
"title" => _("consultation(s)"), |
254 |
), |
255 |
"dossier_message" => array( |
256 |
"title" => _("message(s)"), |
257 |
), |
258 |
"dossier_commission" => array( |
259 |
"title" => _("commission(s)"), |
260 |
), |
261 |
"rapport_instruction" => array( |
262 |
"title" => _("rapport d'instruction"), |
263 |
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
264 |
), |
265 |
"lot" => array( |
266 |
"title" => _("lot(s)"), |
267 |
), |
268 |
"donnees_techniques" => array( |
269 |
"title" => _("donnees techniques"), |
270 |
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
271 |
), |
272 |
"dossier_autorisation" => array( |
273 |
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
274 |
), |
275 |
); |
276 |
?> |