/[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 1543 by fmichon, Thu Mar 21 07:41:17 2013 UTC revision 2453 by softime, Fri Nov 8 19:13:11 2013 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id$  /**
3  //gen openMairie le 10/02/2011 20:33   *
4  include('../gen/sql/pgsql/evenement.form.inc.php');   *
5  $sql_om_lettretype="select id,(id||' '||libelle) as lib from ".   * @package openfoncier
6                      DB_PREFIXE."om_lettretype ORDER BY lib";   * @version SVN : $Id$
7                         */
8  $sep = (isset($_GET['action']) &&  
9          ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;  //
10    include "../gen/sql/pgsql/evenement.form.inc.php";
11    
12    //
13    $sep = (isset($_GET['action']) && ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;
14    
15    // Récupère le paramètre "retourformulaire"
16    $retourformulaire = (isset($_GET['retourformulaire'])) ? $_GET['retourformulaire'] : "";
17    
18    // XXX Si c'est un sous-formulaire, alors le bouton "Modifier" n'est pas affiché
19    // pour éviter le bug concernant les tableaux multi-select
20    // À retirer lorsque le bug sera résolu dans OpenMairie
21    if (isset($retourformulaire) && $retourformulaire != '') {
22        // Actions du porrtlet : modifier
23        $portlet_actions['modifier'] = null;
24    }
25    
26  $champs=array(  //
27    $champs = array(
28      "evenement.evenement",      "evenement.evenement",
29      "evenement.libelle",      "evenement.libelle",
30      "evenement.type",      "evenement.type",
31        "evenement.retour",
32      "array_to_string(array_agg(transition.etat ORDER BY transition.etat), '$sep') as etats_depuis_lequel_l_evenement_est_disponible",      "array_to_string(array_agg(transition.etat ORDER BY transition.etat), '$sep') as etats_depuis_lequel_l_evenement_est_disponible",
33      "array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type",      "array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type",
34      "evenement.restriction",      "evenement.restriction",
# Line 21  $champs=array( Line 38  $champs=array(
38      "evenement.accord_tacite",      "evenement.accord_tacite",
39      "evenement.delai_notification",      "evenement.delai_notification",
40      "evenement.avis_decision",      "evenement.avis_decision",
41      "evenement.evenement_suivant_tacite",      "evenement.autorite_competente",
     "evenement.evenement_retour_ar",  
42      "evenement.lettretype",      "evenement.lettretype",
43      "evenement.consultation",      "evenement.consultation",
44        "evenement.evenement_suivant_tacite",
45        "evenement.evenement_retour_ar",
46        "evenement.evenement_retour_signature",
47  );  );
48    
49  $tableSelect = DB_PREFIXE."evenement  //
50  LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement  $tableSelect = "
51    ".DB_PREFIXE."evenement
52      LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement
53      ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement      ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement
54  LEFT JOIN ".DB_PREFIXE."transition    LEFT JOIN ".DB_PREFIXE."transition
55      ON transition.evenement=evenement.evenement";      ON transition.evenement=evenement.evenement";
56    
57  $selection = " GROUP BY evenement.evenement,libelle";  //
58    $selection = " GROUP BY evenement.evenement, evenement.libelle ";
59    
60  $sql_dossier_instruction_type="SELECT  // FKEY - OM_LETTRETYPE
61                      dossier_instruction_type.dossier_instruction_type,  $sql_om_lettretype = "
62                      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib  SELECT
63                  FROM    id,
64                      ".DB_PREFIXE."dossier_instruction_type    (id||' '||libelle) as lib
65                  LEFT JOIN  FROM ".DB_PREFIXE."om_lettretype
66                      ".DB_PREFIXE."dossier_autorisation_type_detaille  ORDER BY lib";
                     ON  
                         dossier_instruction_type.dossier_autorisation_type_detaille=  
                         dossier_autorisation_type_detaille.dossier_autorisation_type_detaille  
                 ORDER BY  
                     dossier_autorisation_type_detaille.code";  
 $sql_dossier_instruction_type_by_id = "SELECT  
                             dossier_instruction_type.dossier_instruction_type,  
                             CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib  
                         FROM  
                             ".DB_PREFIXE."dossier_instruction_type  
                         LEFT JOIN  
                             ".DB_PREFIXE."dossier_autorisation_type_detaille  
                             ON  
                                 dossier_instruction_type.dossier_autorisation_type_detaille=  
                                 dossier_autorisation_type_detaille.dossier_autorisation_type_detaille  
                         WHERE  
                             dossier_instruction_type IN (<idx>)  
                         ORDER BY  
                             dossier_autorisation_type_detaille.code";  
67    
68  $sql_action="SELECT action.action, action.libelle as lib FROM ".DB_PREFIXE."action ORDER BY lib";  $sql_action="SELECT action.action, action.libelle as lib FROM ".DB_PREFIXE."action ORDER BY lib";
69  $sql_etat="SELECT etat.etat, etat.libelle as lib FROM ".DB_PREFIXE."etat ORDER BY lib";  $sql_etat="SELECT etat.etat, etat.libelle as lib FROM ".DB_PREFIXE."etat ORDER BY lib";
70  $sql_avis_decision="SELECT avis_decision.avis_decision, avis_decision.libelle as lib FROM ".DB_PREFIXE."avis_decision ORDER BY lib";  $sql_avis_decision="SELECT avis_decision.avis_decision, avis_decision.libelle as lib FROM ".DB_PREFIXE."avis_decision ORDER BY lib";
71  $sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";  $sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
72  $sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";  $sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
73    $sql_evenement_retour_signature="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
74    
75  $sql_etats_depuis_lequel_l_evenement_est_disponible="SELECT  
76  etat.etat,  // LIAISON NaN - DOSSIER_INSTRUCTION_TYPE (LIEN_DOSSIER_INSTRUCTION_TYPE_EVENEMENT)
77  etat.libelle as lib  $sql_dossier_instruction_type = "
78    SELECT
79      dossier_instruction_type.dossier_instruction_type,
80      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
81    FROM ".DB_PREFIXE."dossier_instruction_type
82      LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
83        ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
84    ORDER BY dossier_autorisation_type_detaille.code";
85    $sql_dossier_instruction_type_by_id = "
86    SELECT
87      dossier_instruction_type.dossier_instruction_type,
88      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
89    FROM ".DB_PREFIXE."dossier_instruction_type
90      LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
91        ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
92    WHERE dossier_instruction_type IN (<idx>)
93    ORDER BY dossier_autorisation_type_detaille.code";
94    
95    // LIAISON NaN - ETAT (TRANSITION)
96    $sql_etats_depuis_lequel_l_evenement_est_disponible = "
97    SELECT
98      etat.etat,
99      etat.libelle as lib
100  FROM ".DB_PREFIXE."etat  FROM ".DB_PREFIXE."etat
101  ORDER BY lib";  ORDER BY lib";
102  $sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "SELECT  $sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "
103  etat.etat,  SELECT
104  etat.libelle as lib    etat.etat,
105      etat.libelle as lib
106  FROM ".DB_PREFIXE."etat  FROM ".DB_PREFIXE."etat
107  WHERE etat.etat IN (<idx>)  WHERE etat.etat IN (<idx>)
108  ORDER BY lib";  ORDER BY lib";
109    
110    // Filtre le select evenement_retour_signature pour n'afficher que les
111    // événements "retour"
112    $sql_evenement_retour_signature="SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement.retour = 't' ORDER BY evenement.libelle ASC";
113    $sql_evenement_retour_signature_by_id = "SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement = <idx>";
114    
115    // Filtre le select evenement_retour_ar pour n'afficher que les
116    // événements "retour"
117    $sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement.retour = 't' ORDER BY evenement.libelle ASC";
118    $sql_evenement_retour_ar_by_id = "SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement = <idx>";
119    
120    // Filtre le select evenement_suivant_tacite pour ne pas afficher les
121    // événements "retour"
122    $sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement.retour = 'f' ORDER BY evenement.libelle ASC";
123    $sql_evenement_suivant_tacite_by_id = "SELECT evenement.evenement, evenement.libelle FROM ".DB_PREFIXE."evenement WHERE evenement = <idx>";
124    
125  ?>  ?>

Legend:
Removed from v.1543  
changed lines
  Added in v.2453

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26