/[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 1544 by fmichon, Thu Mar 21 07:46:23 2013 UTC revision 2099 by nhaye, Thu Jul 18 09:33:06 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                         */
 $sep = (isset($_GET['action']) &&  
         ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;  
8    
9  $champs=array(  //
10    include "../gen/sql/pgsql/evenement.form.inc.php";
11    
12    //
13    $sep = (isset($_GET['action']) && ($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ;
14    
15    //
16    $champs = array(
17      "evenement.evenement",      "evenement.evenement",
18      "evenement.libelle",      "evenement.libelle",
19      "evenement.type",      "evenement.type",
# Line 23  $champs=array( Line 28  $champs=array(
28      "evenement.avis_decision",      "evenement.avis_decision",
29      "evenement.lettretype",      "evenement.lettretype",
30      "evenement.consultation",      "evenement.consultation",
31        "evenement.autorite_competente",
32      "evenement.evenement_suivant_tacite",      "evenement.evenement_suivant_tacite",
33      "evenement.evenement_retour_ar",      "evenement.evenement_retour_ar",
34        "evenement.evenement_retour_signature",
   
35  );  );
36    
37  $tableSelect = DB_PREFIXE."evenement  //
38  LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement  $tableSelect = "
39    ".DB_PREFIXE."evenement
40      LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement
41      ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement      ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement
42  LEFT JOIN ".DB_PREFIXE."transition    LEFT JOIN ".DB_PREFIXE."transition
43      ON transition.evenement=evenement.evenement";      ON transition.evenement=evenement.evenement";
44    
45  $selection = " GROUP BY evenement.evenement,libelle";  //
46    $selection = " GROUP BY evenement.evenement, evenement.libelle ";
47    
48  $sql_dossier_instruction_type="SELECT  // FKEY - OM_LETTRETYPE
49                      dossier_instruction_type.dossier_instruction_type,  $sql_om_lettretype = "
50                      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib  SELECT
51                  FROM    id,
52                      ".DB_PREFIXE."dossier_instruction_type    (id||' '||libelle) as lib
53                  LEFT JOIN  FROM ".DB_PREFIXE."om_lettretype
54                      ".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";  
55    
56  $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";
57  $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";
58  $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";
59  $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";
60  $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";
61    $sql_evenement_retour_signature="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib";
62    
63    
64  $sql_etats_depuis_lequel_l_evenement_est_disponible="SELECT  // LIAISON NaN - DOSSIER_INSTRUCTION_TYPE (LIEN_DOSSIER_INSTRUCTION_TYPE_EVENEMENT)
65  etat.etat,  $sql_dossier_instruction_type = "
66  etat.libelle as lib  SELECT
67      dossier_instruction_type.dossier_instruction_type,
68      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
69    FROM ".DB_PREFIXE."dossier_instruction_type
70      LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
71        ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
72    ORDER BY dossier_autorisation_type_detaille.code";
73    $sql_dossier_instruction_type_by_id = "
74    SELECT
75      dossier_instruction_type.dossier_instruction_type,
76      CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib
77    FROM ".DB_PREFIXE."dossier_instruction_type
78      LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
79        ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
80    WHERE dossier_instruction_type IN (<idx>)
81    ORDER BY dossier_autorisation_type_detaille.code";
82    
83    // LIAISON NaN - ETAT (TRANSITION)
84    $sql_etats_depuis_lequel_l_evenement_est_disponible = "
85    SELECT
86      etat.etat,
87      etat.libelle as lib
88  FROM ".DB_PREFIXE."etat  FROM ".DB_PREFIXE."etat
89  ORDER BY lib";  ORDER BY lib";
90  $sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "SELECT  $sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "
91  etat.etat,  SELECT
92  etat.libelle as lib    etat.etat,
93      etat.libelle as lib
94  FROM ".DB_PREFIXE."etat  FROM ".DB_PREFIXE."etat
95  WHERE etat.etat IN (<idx>)  WHERE etat.etat IN (<idx>)
96  ORDER BY lib";  ORDER BY lib";
97    
 ?>  
98    ?>

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26