/[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 1133 by vpihour, Mon Dec 31 15:05:55 2012 UTC revision 1540 by fmichon, Thu Mar 21 06:50:50 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']) &&  $sep = (isset($_GET['action']) &&
9          ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;          ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;
10    
11  $champs=array(  $champs=array(
12      "evenement.evenement",      "evenement.evenement",
13      "libelle",      "evenement.libelle",
14      "nature",      "array_to_string(array_agg(transition.etat ORDER BY transition.etat), '$sep') as etats_depuis_lequel_l_evenement_est_disponible",
15      "action",      "array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type",
16      "etat",      "evenement.restriction",
17      "delai",      "evenement.action",
18      "accord_tacite",      "evenement.etat",
19      "delai_notification",      "evenement.delai",
20      "lettretype",      "evenement.accord_tacite",
21      "consultation",      "evenement.evenement_suivant_tacite",
22      "avis_decision",      "evenement.delai_notification",
23      "restriction",      "evenement.evenement_retour_ar",
24      "type",      "evenement.lettretype",
25      "evenement_retour_ar",      "evenement.consultation",
26      "evenement_suivant_tacite",      "evenement.avis_decision",
27      "array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type");      "evenement.type",
28    );
29    
30  $tableSelect = DB_PREFIXE."evenement  $tableSelect = DB_PREFIXE."evenement
31                  LEFT JOIN  LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement
32                      ".DB_PREFIXE."lien_dossier_instruction_type_evenement      ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement
33                      ON  LEFT JOIN ".DB_PREFIXE."transition
34                          lien_dossier_instruction_type_evenement.evenement=evenement.evenement";      ON transition.evenement=evenement.evenement";
35    
36  $selection = " GROUP BY evenement.evenement,libelle";  $selection = " GROUP BY evenement.evenement,libelle";
37    
38  $sql_dossier_instruction_type="SELECT  $sql_dossier_instruction_type="SELECT
39                      dossier_instruction_type.dossier_instruction_type,                      dossier_instruction_type.dossier_instruction_type,
40                      CONCAT( dossier_instruction_type.code ,' - ',dossier_instruction_type.libelle)                      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
41                  FROM                  FROM
42                      ".DB_PREFIXE."dossier_instruction_type                      ".DB_PREFIXE."dossier_instruction_type
43                    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                  ORDER BY                  ORDER BY
49                      dossier_instruction_type.libelle";                      dossier_autorisation_type_detaille.code";
50  $sql_dossier_instruction_type_by_id = "SELECT  $sql_dossier_instruction_type_by_id = "SELECT
51                              dossier_instruction_type.dossier_instruction_type,                              dossier_instruction_type.dossier_instruction_type,
52                              CONCAT( dossier_instruction_type.code ,' - ',dossier_instruction_type.libelle)                              CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
53                          FROM                          FROM
54                              ".DB_PREFIXE."dossier_instruction_type                              ".DB_PREFIXE."dossier_instruction_type
55                            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                          WHERE                          WHERE
61                              dossier_instruction_type IN (<idx>)                              dossier_instruction_type IN (<idx>)
62                          ORDER BY                          ORDER BY
63                              dossier_instruction_type.libelle";                              dossier_autorisation_type_detaille.code";
64    
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    $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  ?>  ?>

Legend:
Removed from v.1133  
changed lines
  Added in v.1540

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26