/[openfoncier]/trunk/sql/pgsql/evenement.form.inc.php
ViewVC logotype

Diff of /trunk/sql/pgsql/evenement.form.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.312  
changed lines
  Added in v.1544

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26