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."om_utilisateur on instructeur.om_utilisateur = om_utilisateur.om_utilisateur left join ". |
$table = DB_PREFIXE."dossier |
8 |
DB_PREFIXE."avis_decision on avis_decision.avis_decision=dossier.avis_decision"; |
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( |
$champAffiche=array( |
19 |
'dossier.dossier as "'._("dossier").'"', |
'dossier.dossier as "'._("dossier").'"', |
20 |
'dossier.demandeur_nom as "'._("demandeur_nom").'"', |
'dossier.demandeur_nom as "'._("demandeur_nom").'"', |
26 |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
27 |
'etat as "'._("etat").'"', |
'etat as "'._("etat").'"', |
28 |
'avis_decision.libelle as "'._("avis_decision").'"', |
'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"; |
$tri= "order by dossier.dossier"; |
36 |
|
|
37 |
$champRecherche=array("dossier","demandeur_nom"); |
/*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"; |
$ico = "../img/ico_dossier.png"; |
43 |
|
|
44 |
$edition=""; |
$edition=""; |
45 |
|
|
46 |
|
/*Si l'on se trouve dans le formulaire architecte, mettre certaines actions |
47 |
|
* au tableau*/ |
48 |
if ($retourformulaire== 'architecte'){ |
if ($retourformulaire== 'architecte'){ |
49 |
$tab_actions['corner']['ajouter'] = NULL; |
$tab_actions['corner']['ajouter'] = NULL; |
50 |
$tab_actions['left']['consulter'] = NULL; |
$tab_actions['left']['consulter'] = NULL; |
51 |
$tab_actions['content'] =NULL; |
$tab_actions['content'] =NULL; |
52 |
$selection=" where dossier.architecte ='".$idx."'"; |
$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'){ |
if ($retourformulaire== 'travaux'){ |
57 |
$tab_actions['corner']['ajouter'] = NULL; |
$tab_actions['corner']['ajouter'] = NULL; |
58 |
$tab_actions['left']['consulter'] = NULL; |
$tab_actions['left']['consulter'] = NULL; |
60 |
$selection=" where dossier.travaux ='".$idx."'"; |
$selection=" where dossier.travaux ='".$idx."'"; |
61 |
} |
} |
62 |
|
|
63 |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier") { |
// Liste des autres dossiers d'instructions |
64 |
|
if ($retourformulaire== 'dossier_instruction'){ |
65 |
|
$champAffiche=array( |
66 |
|
'dossier.dossier as "'._("dossier").'"', |
67 |
|
'dossier_instruction_type.libelle as "'._("dossier").'"', |
68 |
|
'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"', |
69 |
|
'etat as "'._("etat").'"', |
70 |
|
); |
71 |
|
|
72 |
|
$table =DB_PREFIXE.'dossier |
73 |
|
JOIN '.DB_PREFIXE.'dossier_instruction_type |
74 |
|
ON dossier_instruction_type.dossier_instruction_type = dossier.dossier_instruction_type'; |
75 |
|
$selection = 'WHERE dossier.dossier=\''.$idx.'\''; |
76 |
|
$tri= "order by dossier.date_depot ASC"; |
77 |
|
|
78 |
|
//Suppression du bouton d'ajout |
79 |
|
$tab_actions['corner']['ajouter'] = NULL; |
80 |
|
|
81 |
|
//Suppression du bouton d'ajout |
82 |
|
$tab_actions['left']["consulter"] = |
83 |
|
array('lien' => 'form.php?obj=dossier_instruction&action=3'.'&idx=', |
84 |
|
'id' => '', |
85 |
|
'lib' => '<span class="om-icon om-icon-16 om-icon-fix consult-16" title="'._('Consulter').'">'._('Consulter').'</span>', |
86 |
|
'rights' => array('list' => array('dossier_instruction', 'dossier_instruction_consulter'), 'operator' => 'OR'), |
87 |
|
'ordre' => 10, |
88 |
|
'ajax' => false); |
89 |
|
|
90 |
|
$tab_actions['content'] = $tab_actions['left']["consulter"]; |
91 |
|
$options[] = array( |
92 |
|
"type"=>"pagination", |
93 |
|
"display"=>false, |
94 |
|
); |
95 |
|
} |
96 |
|
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
97 |
|
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
98 |
// Configuration de la recherche avancee |
// Configuration de la recherche avancee |
99 |
if (!isset($options)) { |
if (!isset($options)) { |
100 |
$options = array(); |
$options = array(); |
104 |
0 => array("", "Oui", "Non", ), |
0 => array("", "Oui", "Non", ), |
105 |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
106 |
); |
); |
107 |
// |
/*Champs pour la recherche avancée*/ |
108 |
$champs['dossier'] = array( |
$champs['dossier'] = array( |
109 |
'table' => 'dossier', |
'table' => 'dossier', |
110 |
'colonne' => 'dossier', |
'colonne' => 'dossier', |
112 |
'taille' => 30, |
'taille' => 30, |
113 |
'libelle' => _('dossier')); |
'libelle' => _('dossier')); |
114 |
// |
// |
115 |
$champs['nature'] = array( |
$champs['dossier_autorisation_type_detaille'] = array( |
116 |
'table' => 'dossier', |
'table' => 'dossier_autorisation_type_detaille', |
117 |
'colonne' => 'nature', |
'colonne' => 'dossier_autorisation_type_detaille', |
118 |
'type' => 'select', |
'type' => 'select', |
119 |
'taille' => 30, |
'taille' => 30, |
120 |
'libelle' => _('nature')); |
'libelle' => _('dossier_autorisation_type_detaille')); |
121 |
|
|
122 |
|
|
123 |
|
|
319 |
'type' => 'date', |
'type' => 'date', |
320 |
'taille' => 8, |
'taille' => 8, |
321 |
'where' => 'intervaldate'); |
'where' => 'intervaldate'); |
322 |
// |
/*Configuration de la recherche avancée*/ |
323 |
$options[] = array( |
$options[] = array( |
324 |
'type' => 'search', |
'type' => 'search', |
325 |
'display' => true, |
'display' => true, |
328 |
'absolute_object' => 'dossier'); |
'absolute_object' => 'dossier'); |
329 |
} |
} |
330 |
|
|
331 |
|
/*Ajout de sous-formulaire à notre objet*/ |
332 |
$sousformulaire=array("instruction", |
$sousformulaire=array("donnees_techniques", |
333 |
|
"instruction", |
334 |
"consultation", |
"consultation", |
335 |
|
"lot", |
336 |
"terrain", |
"terrain", |
337 |
"blocnote", |
"blocnote", |
338 |
"destination_shon", |
"destination_shon", |
339 |
"statistique", |
"statistique", |
340 |
"messages"); |
"dossier_message", |
341 |
|
"dossier_commission", |
342 |
|
"rapport_instruction", |
343 |
|
"dossier_autorisation",); |
344 |
|
|
345 |
|
/*Ajout de paramètre à certains sous-formulaire*/ |
346 |
|
$sousformulaire_parameters = array( |
347 |
|
"consultation" => array( |
348 |
|
"title" => _("consultation(s)"), |
349 |
|
), |
350 |
|
"dossier_message" => array( |
351 |
|
"title" => _("message(s)"), |
352 |
|
), |
353 |
|
"dossier_commission" => array( |
354 |
|
"title" => _("commission(s)"), |
355 |
|
), |
356 |
|
"rapport_instruction" => array( |
357 |
|
"title" => _("rapport d'instruction"), |
358 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
359 |
|
), |
360 |
|
"lot" => array( |
361 |
|
"title" => _("lot(s)"), |
362 |
|
), |
363 |
|
"donnees_techniques" => array( |
364 |
|
"title" => _("donnees techniques"), |
365 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
366 |
|
), |
367 |
|
"dossier_autorisation" => array( |
368 |
|
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
369 |
|
), |
370 |
|
); |
371 |
?> |
?> |