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 |
$table=DB_PREFIXE."dossier left join ". |
|
6 |
DB_PREFIXE."instructeur on dossier.instructeur = instructeur.instructeur left join ". |
/*Tables sur lesquels la requête va s'effectuer*/ |
7 |
DB_PREFIXE."avis_decision on avis_decision.avis_decision=dossier.avis_decision"; |
$table = DB_PREFIXE."dossier |
8 |
|
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
9 |
|
ON lien_dossier_demandeur.dossier=dossier.dossier |
10 |
|
AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
11 |
|
LEFT JOIN ".DB_PREFIXE."demandeur |
12 |
|
ON lien_dossier_demandeur.demandeur=demandeur.demandeur |
13 |
|
LEFT JOIN ".DB_PREFIXE."instructeur |
14 |
|
ON dossier.instructeur = instructeur.instructeur |
15 |
|
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
16 |
|
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur |
17 |
|
LEFT JOIN ".DB_PREFIXE."avis_decision |
18 |
|
ON avis_decision.avis_decision=dossier.avis_decision |
19 |
|
LEFT JOIN ".DB_PREFIXE."division |
20 |
|
ON dossier.division=division.division"; |
21 |
|
|
22 |
|
/*Champs du début de la requête*/ |
23 |
$champAffiche=array( |
$champAffiche=array( |
24 |
'dossier.dossier as "'._("dossier").'"', |
'dossier.dossier as "'._("dossier").'"', |
25 |
'dossier.demandeur_nom as "'._("demandeur_nom").'"', |
'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"', |
26 |
'instructeur.nom as "'._("instructeur").'"', |
'instructeur.nom as "'._("instructeur").'"', |
27 |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
28 |
'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"', |
'dossier.date_dernier_depot as "'._("date_dernier_depot").'"', |
29 |
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
30 |
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
31 |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
36 |
as "'._("enjeu").'"', |
as "'._("enjeu").'"', |
37 |
); |
); |
38 |
|
|
39 |
$tri= "order by dossier.dossier"; |
/*Tri*/ |
40 |
|
$triOrder= "order by dossier.dossier"; |
41 |
$champRecherche=array("dossier","demandeur_nom"); |
$tri = $triOrder; |
42 |
|
|
43 |
|
/*Recherche simple*/ |
44 |
|
$champRecherche=array( 'dossier.dossier as "'._("dossier").'"', |
45 |
|
'personne_morale_denomination as "'._("personne_morale_denomination").'"', |
46 |
|
'particulier_nom as "'._("particulier_nom").'"', |
47 |
|
); |
48 |
|
|
49 |
|
/*Icone*/ |
50 |
$ico = "../img/ico_dossier.png"; |
$ico = "../img/ico_dossier.png"; |
51 |
|
|
52 |
$edition=""; |
$edition=""; |
53 |
|
|
54 |
if ($retourformulaire== 'architecte'){ |
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
|
$tab_actions['corner']['ajouter'] = NULL; |
|
|
$tab_actions['left']['consulter'] = NULL; |
|
|
$tab_actions['content'] =NULL; |
|
|
$selection=" where dossier.architecte ='".$idx."'"; |
|
|
} |
|
|
if ($retourformulaire== 'travaux'){ |
|
|
$tab_actions['corner']['ajouter'] = NULL; |
|
|
$tab_actions['left']['consulter'] = NULL; |
|
|
$tab_actions['content'] =NULL; |
|
|
$selection=" where dossier.travaux ='".$idx."'"; |
|
|
} |
|
|
|
|
55 |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
56 |
// Configuration de la recherche avancee |
// Configuration de la recherche avancee |
57 |
if (!isset($options)) { |
if (!isset($options)) { |
62 |
0 => array("", "Oui", "Non", ), |
0 => array("", "Oui", "Non", ), |
63 |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
64 |
); |
); |
65 |
// |
/*Champs pour la recherche avancée*/ |
66 |
$champs['dossier'] = array( |
$champs['dossier'] = array( |
67 |
'table' => 'dossier', |
'table' => 'dossier', |
68 |
'colonne' => 'dossier', |
'colonne' => 'dossier', |
70 |
'taille' => 30, |
'taille' => 30, |
71 |
'libelle' => _('dossier')); |
'libelle' => _('dossier')); |
72 |
// |
// |
73 |
$champs['nature'] = array( |
$champs['dossier_autorisation_type_detaille'] = array( |
74 |
'table' => 'dossier', |
'table' => 'dossier_autorisation_type_detaille', |
75 |
'colonne' => 'nature', |
'colonne' => 'dossier_autorisation_type_detaille', |
76 |
'type' => 'select', |
'type' => 'select', |
77 |
'taille' => 30, |
'taille' => 30, |
78 |
'libelle' => _('nature')); |
'libelle' => _('dossier_autorisation_type_detaille')); |
|
|
|
79 |
|
|
80 |
|
$champs['particulier'] = array( |
81 |
// |
'table' => 'demandeur', |
82 |
$champs['delegataire_nom'] = array( |
'colonne' => array('particulier_nom','particulier_prenom','particulier_nom','personne_morale_nom','personne_morale_prenom','personne_morale_denomination'), |
|
'table' => 'dossier', |
|
|
'colonne' => 'delegataire_nom', |
|
83 |
'type' => 'text', |
'type' => 'text', |
84 |
'taille' => 30, |
'taille' => 30, |
85 |
'libelle' => _('nom delegataire')); |
'libelle' => _('Demandeur')); |
|
// |
|
|
$champs['demandeur_nom'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'demandeur_nom', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('nom demandeur')); |
|
|
|
|
|
|
|
|
// |
|
|
$champs['demandeur_societe'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'demandeur_societe', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('demandeur_societe')); |
|
86 |
// |
// |
87 |
$champs['parcelle'] = array( |
$champs['parcelle'] = array( |
88 |
'table' => 'dossier', |
'table' => 'dossier_parcelle', |
89 |
'colonne' => 'parcelle', |
'where' => 'injoin', |
90 |
|
'tablejoin' => 'INNER JOIN (SELECT DISTINCT dossier FROM '.DB_PREFIXE.'dossier_parcelle WHERE lower(dossier_parcelle.libelle) like %s ) AS A1 ON A1.dossier = dossier.dossier' , |
91 |
|
'colonne' => 'libelle', |
92 |
'type' => 'text', |
'type' => 'text', |
93 |
'taille' => 30, |
'taille' => 30, |
94 |
'libelle' => _('parcelle')); |
'libelle' => _('parcelle')); |
|
|
|
|
// |
|
|
$champs['rivoli'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'rivoli', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('rivoli')); |
|
|
// |
|
|
$champs['terrain_adresse'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'terrain_adresse', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('terrain_adresse')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// |
|
|
$champs['terrain_adresse_complement'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'terrain_adresse_complement', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('terrain_adresse_complement')); |
|
95 |
//// COL2 |
//// COL2 |
96 |
|
|
97 |
|
|
98 |
// |
// |
99 |
$champs['etat'] = array( |
$champs['etat'] = array( |
100 |
'table' => 'dossier', |
'table' => 'dossier', |
111 |
"args" => $args, |
"args" => $args, |
112 |
); |
); |
113 |
|
|
|
// |
|
|
$champs['travaux'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'travaux', |
|
|
'type' => 'select', |
|
|
'libelle' => _('travaux')); |
|
|
|
|
|
|
|
114 |
//// COL3 |
//// COL3 |
115 |
|
|
116 |
|
|
227 |
'type' => 'date', |
'type' => 'date', |
228 |
'taille' => 8, |
'taille' => 8, |
229 |
'where' => 'intervaldate'); |
'where' => 'intervaldate'); |
230 |
// |
|
231 |
|
/*Configuration de la recherche avancée*/ |
232 |
$options[] = array( |
$options[] = array( |
233 |
'type' => 'search', |
'type' => 'search', |
234 |
'display' => true, |
'display' => true, |
235 |
'advanced' => $champs, |
'advanced' => $champs, |
236 |
'default_form' => 'advanced', |
'default_form' => 'advanced', |
237 |
'absolute_object' => 'dossier'); |
'absolute_object' => 'dossier'); |
238 |
|
|
239 |
|
/* désactivation du sélecteur de pages */ |
240 |
|
$options[] = array( |
241 |
|
'type' => 'pagination_select', |
242 |
|
'display' => ''); |
243 |
} |
} |
244 |
|
|
245 |
|
/*Ajout de sous-formulaire à notre objet*/ |
246 |
|
$sousformulaire=array( |
247 |
|
//"donnees_techniques", |
248 |
|
"document_numerise", |
249 |
|
"instruction", |
250 |
|
"consultation", |
251 |
|
"lot", |
252 |
|
"dossier_message", |
253 |
|
"dossier_commission", |
254 |
|
//"rapport_instruction", |
255 |
|
"blocnote", |
256 |
|
"dossier_autorisation", |
257 |
|
); |
258 |
|
|
259 |
|
/*Ajout de paramètre à certains sous-formulaire*/ |
260 |
|
$sousformulaire_parameters = array( |
261 |
|
"consultation" => array( |
262 |
|
"title" => _("consultation(s)"), |
263 |
|
), |
264 |
|
"dossier_message" => array( |
265 |
|
"title" => _("message(s)"), |
266 |
|
), |
267 |
|
"dossier_commission" => array( |
268 |
|
"title" => _("commission(s)"), |
269 |
|
), |
270 |
|
"rapport_instruction" => array( |
271 |
|
"title" => _("rapport d'instruction"), |
272 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
273 |
|
), |
274 |
|
"lot" => array( |
275 |
|
"title" => _("lot(s)"), |
276 |
|
), |
277 |
|
"donnees_techniques" => array( |
278 |
|
"title" => _("donnees techniques"), |
279 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
280 |
|
), |
281 |
|
"dossier_autorisation" => array( |
282 |
|
"title" => _("DA"), |
283 |
|
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
284 |
|
), |
285 |
|
"document_numerise" => array( |
286 |
|
"title" => _("Piece(s)"), |
287 |
|
"href" => "../app/document_numerise.view.php", |
288 |
|
), |
289 |
|
); |
290 |
|
|
291 |
|
// Si le paramètre 'option_sig' n'est pas désactivé |
292 |
|
if ($f->getParameter('option_sig') != 'aucun') { |
293 |
|
// On redéclare les sousformulaire |
294 |
|
$sousformulaire=array( |
295 |
|
//"donnees_techniques", |
296 |
|
"document_numerise", |
297 |
|
"dossier_contrainte", |
298 |
|
"instruction", |
299 |
|
"consultation", |
300 |
|
"lot", |
301 |
|
"dossier_message", |
302 |
|
"dossier_commission", |
303 |
|
//"rapport_instruction", |
304 |
|
"blocnote", |
305 |
|
"dossier_autorisation", |
306 |
|
); |
307 |
|
// On modifie le lien du paramètre dossier_contrainte |
308 |
|
$sousformulaire_parameters["dossier_contrainte"] = array( |
309 |
|
"title" => _("Contrainte(s)"), |
310 |
|
"href" => "../app/dossier_contrainte.view.php", |
311 |
|
); |
312 |
|
} |
313 |
|
|
|
$sousformulaire=array("instruction", |
|
|
"consultation", |
|
|
"terrain", |
|
|
"blocnote", |
|
|
"destination_shon", |
|
|
"statistique", |
|
|
"messages"); |
|
314 |
?> |
?> |