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", |
37 |
"evenement.accord_tacite", |
"evenement.accord_tacite", |
38 |
"evenement.delai_notification", |
"evenement.delai_notification", |
39 |
"evenement.avis_decision", |
"evenement.avis_decision", |
|
"evenement.evenement_suivant_tacite", |
|
|
"evenement.evenement_retour_ar", |
|
40 |
"evenement.lettretype", |
"evenement.lettretype", |
41 |
"evenement.consultation", |
"evenement.consultation", |
42 |
|
"evenement.autorite_competente", |
43 |
|
"evenement.evenement_suivant_tacite", |
44 |
|
"evenement.evenement_retour_ar", |
45 |
|
"evenement.evenement_retour_signature", |
46 |
); |
); |
47 |
|
|
48 |
$tableSelect = DB_PREFIXE."evenement |
// |
49 |
LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement |
$tableSelect = " |
50 |
|
".DB_PREFIXE."evenement |
51 |
|
LEFT JOIN ".DB_PREFIXE."lien_dossier_instruction_type_evenement |
52 |
ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement |
ON lien_dossier_instruction_type_evenement.evenement=evenement.evenement |
53 |
LEFT JOIN ".DB_PREFIXE."transition |
LEFT JOIN ".DB_PREFIXE."transition |
54 |
ON transition.evenement=evenement.evenement"; |
ON transition.evenement=evenement.evenement"; |
55 |
|
|
56 |
$selection = " GROUP BY evenement.evenement,libelle"; |
// |
57 |
|
$selection = " GROUP BY evenement.evenement, evenement.libelle "; |
58 |
|
|
59 |
$sql_dossier_instruction_type="SELECT |
// FKEY - OM_LETTRETYPE |
60 |
dossier_instruction_type.dossier_instruction_type, |
$sql_om_lettretype = " |
61 |
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
SELECT |
62 |
FROM |
id, |
63 |
".DB_PREFIXE."dossier_instruction_type |
(id||' '||libelle) as lib |
64 |
LEFT JOIN |
FROM ".DB_PREFIXE."om_lettretype |
65 |
".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"; |
|
66 |
|
|
67 |
$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"; |
68 |
$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"; |
69 |
$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"; |
70 |
$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"; |
71 |
$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"; |
72 |
|
$sql_evenement_retour_signature="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib"; |
73 |
|
|
74 |
|
|
75 |
$sql_etats_depuis_lequel_l_evenement_est_disponible="SELECT |
// LIAISON NaN - DOSSIER_INSTRUCTION_TYPE (LIEN_DOSSIER_INSTRUCTION_TYPE_EVENEMENT) |
76 |
etat.etat, |
$sql_dossier_instruction_type = " |
77 |
etat.libelle as lib |
SELECT |
78 |
|
dossier_instruction_type.dossier_instruction_type, |
79 |
|
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
80 |
|
FROM ".DB_PREFIXE."dossier_instruction_type |
81 |
|
LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille |
82 |
|
ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
83 |
|
ORDER BY dossier_autorisation_type_detaille.code"; |
84 |
|
$sql_dossier_instruction_type_by_id = " |
85 |
|
SELECT |
86 |
|
dossier_instruction_type.dossier_instruction_type, |
87 |
|
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
88 |
|
FROM ".DB_PREFIXE."dossier_instruction_type |
89 |
|
LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille |
90 |
|
ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
91 |
|
WHERE dossier_instruction_type IN (<idx>) |
92 |
|
ORDER BY dossier_autorisation_type_detaille.code"; |
93 |
|
|
94 |
|
// LIAISON NaN - ETAT (TRANSITION) |
95 |
|
$sql_etats_depuis_lequel_l_evenement_est_disponible = " |
96 |
|
SELECT |
97 |
|
etat.etat, |
98 |
|
etat.libelle as lib |
99 |
FROM ".DB_PREFIXE."etat |
FROM ".DB_PREFIXE."etat |
100 |
ORDER BY lib"; |
ORDER BY lib"; |
101 |
$sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = "SELECT |
$sql_etats_depuis_lequel_l_evenement_est_disponible_by_id = " |
102 |
etat.etat, |
SELECT |
103 |
etat.libelle as lib |
etat.etat, |
104 |
|
etat.libelle as lib |
105 |
FROM ".DB_PREFIXE."etat |
FROM ".DB_PREFIXE."etat |
106 |
WHERE etat.etat IN (<idx>) |
WHERE etat.etat IN (<idx>) |
107 |
ORDER BY lib"; |
ORDER BY lib"; |
108 |
|
|
|
?> |
|
109 |
|
?> |