/[openfoncier]/branches/3.14.x/sql/pgsql/evenement.form.inc.php
ViewVC logotype

Annotation of /branches/3.14.x/sql/pgsql/evenement.form.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1540 - (hide annotations)
Thu Mar 21 06:50:50 2013 UTC (11 years, 10 months ago) by fmichon
Original Path: trunk/sql/pgsql/evenement.form.inc.php
File size: 3889 byte(s)
Nettoyage de la classe instruction + Ajout d'un select multiple pour sélectionner les états depuis le formulaire de l'événement

1 fraynaud 3 <?php
2     //$Id$
3     //gen openMairie le 10/02/2011 20:33
4     include('../gen/sql/pgsql/evenement.form.inc.php');
5 fmichon 1502 $sql_om_lettretype="select id,(id||' '||libelle) as lib from ".
6     DB_PREFIXE."om_lettretype ORDER BY lib";
7 vpihour 1133
8     $sep = (isset($_GET['action']) &&
9     ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;
10    
11     $champs=array(
12     "evenement.evenement",
13 fmichon 1540 "evenement.libelle",
14     "array_to_string(array_agg(transition.etat ORDER BY transition.etat), '$sep') as etats_depuis_lequel_l_evenement_est_disponible",
15 fmichon 1506 "array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type",
16 fmichon 1540 "evenement.restriction",
17     "evenement.action",
18     "evenement.etat",
19     "evenement.delai",
20     "evenement.accord_tacite",
21     "evenement.evenement_suivant_tacite",
22     "evenement.delai_notification",
23     "evenement.evenement_retour_ar",
24     "evenement.lettretype",
25     "evenement.consultation",
26     "evenement.avis_decision",
27     "evenement.type",
28 fmichon 1506 );
29 vpihour 1133
30     $tableSelect = DB_PREFIXE."evenement
31 fmichon 1540 LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement
32     ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement
33     LEFT JOIN ".DB_PREFIXE."transition
34     ON transition.evenement=evenement.evenement";
35 vpihour 1133
36     $selection = " GROUP BY evenement.evenement,libelle";
37    
38     $sql_dossier_instruction_type="SELECT
39     dossier_instruction_type.dossier_instruction_type,
40 fmichon 1410 CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
41 vpihour 1133 FROM
42     ".DB_PREFIXE."dossier_instruction_type
43 vpihour 1143 LEFT JOIN
44     ".DB_PREFIXE."dossier_autorisation_type_detaille
45     ON
46     dossier_instruction_type.dossier_autorisation_type_detaille=
47     dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
48 vpihour 1133 ORDER BY
49 fmichon 1410 dossier_autorisation_type_detaille.code";
50 vpihour 1133 $sql_dossier_instruction_type_by_id = "SELECT
51     dossier_instruction_type.dossier_instruction_type,
52 fmichon 1410 CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
53 vpihour 1133 FROM
54     ".DB_PREFIXE."dossier_instruction_type
55 vpihour 1143 LEFT JOIN
56     ".DB_PREFIXE."dossier_autorisation_type_detaille
57     ON
58     dossier_instruction_type.dossier_autorisation_type_detaille=
59     dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
60 vpihour 1133 WHERE
61     dossier_instruction_type IN (<idx>)
62     ORDER BY
63 fmichon 1410 dossier_autorisation_type_detaille.code";
64 fmichon 1502
65     $sql_action="SELECT action.action, action.libelle as lib FROM ".DB_PREFIXE."action ORDER BY lib";
66     $sql_etat="SELECT etat.etat, etat.libelle as lib FROM ".DB_PREFIXE."etat ORDER BY lib";
67     $sql_avis_decision="SELECT avis_decision.avis_decision, avis_decision.libelle as lib FROM ".DB_PREFIXE."avis_decision ORDER BY lib";
68     $sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
69     $sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
70    
71 fmichon 1540 $sql_etats_depuis_lequel_l_evenement_est_disponible="SELECT
72     etat.etat,
73     etat.libelle as lib
74     FROM ".DB_PREFIXE."etat
75     ORDER BY lib";
76     $sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "SELECT
77     etat.etat,
78     etat.libelle as lib
79     FROM ".DB_PREFIXE."etat
80     WHERE etat.etat IN (<idx>)
81     ORDER BY lib";
82    
83 fraynaud 3 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26