1 |
<?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 ". |
6 |
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 |
"libelle", |
14 |
"array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type", |
15 |
"restriction", |
16 |
"action", |
17 |
"etat", |
18 |
"delai", |
19 |
"accord_tacite", |
20 |
"evenement_suivant_tacite", |
21 |
"delai_notification", |
22 |
"evenement_retour_ar", |
23 |
"lettretype", |
24 |
"consultation", |
25 |
"avis_decision", |
26 |
"type", |
27 |
); |
28 |
|
29 |
$tableSelect = DB_PREFIXE."evenement |
30 |
LEFT JOIN |
31 |
".DB_PREFIXE."lien_dossier_instruction_type_evenement |
32 |
ON |
33 |
lien_dossier_instruction_type_evenement.evenement=evenement.evenement"; |
34 |
|
35 |
$selection = " GROUP BY evenement.evenement,libelle"; |
36 |
|
37 |
$sql_dossier_instruction_type="SELECT |
38 |
dossier_instruction_type.dossier_instruction_type, |
39 |
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
40 |
FROM |
41 |
".DB_PREFIXE."dossier_instruction_type |
42 |
LEFT JOIN |
43 |
".DB_PREFIXE."dossier_autorisation_type_detaille |
44 |
ON |
45 |
dossier_instruction_type.dossier_autorisation_type_detaille= |
46 |
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
47 |
ORDER BY |
48 |
dossier_autorisation_type_detaille.code"; |
49 |
$sql_dossier_instruction_type_by_id = "SELECT |
50 |
dossier_instruction_type.dossier_instruction_type, |
51 |
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
52 |
FROM |
53 |
".DB_PREFIXE."dossier_instruction_type |
54 |
LEFT JOIN |
55 |
".DB_PREFIXE."dossier_autorisation_type_detaille |
56 |
ON |
57 |
dossier_instruction_type.dossier_autorisation_type_detaille= |
58 |
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
59 |
WHERE |
60 |
dossier_instruction_type IN (<idx>) |
61 |
ORDER BY |
62 |
dossier_autorisation_type_detaille.code"; |
63 |
|
64 |
$sql_action="SELECT action.action, action.libelle as lib FROM ".DB_PREFIXE."action ORDER BY lib"; |
65 |
$sql_etat="SELECT etat.etat, etat.libelle as lib FROM ".DB_PREFIXE."etat ORDER BY lib"; |
66 |
$sql_avis_decision="SELECT avis_decision.avis_decision, avis_decision.libelle as lib FROM ".DB_PREFIXE."avis_decision ORDER BY lib"; |
67 |
$sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib"; |
68 |
$sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib"; |
69 |
|
70 |
?> |