1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:33 |
4 |
|
|
include('../gen/sql/pgsql/evenement.form.inc.php'); |
5 |
fmichon |
1502 |
$sql_om_lettretype="select id,(id||' '||libelle) as lib from ". |
6 |
|
|
DB_PREFIXE."om_lettretype ORDER BY lib"; |
7 |
vpihour |
1133 |
|
8 |
|
|
$sep = (isset($_GET['action']) && |
9 |
|
|
($_GET['action'] == 1 || $_GET['action'] == 0 )) ? ';' : ',' ; |
10 |
|
|
|
11 |
|
|
$champs=array( |
12 |
|
|
"evenement.evenement", |
13 |
|
|
"libelle", |
14 |
|
|
"action", |
15 |
|
|
"etat", |
16 |
|
|
"delai", |
17 |
|
|
"accord_tacite", |
18 |
|
|
"delai_notification", |
19 |
|
|
"lettretype", |
20 |
|
|
"consultation", |
21 |
|
|
"avis_decision", |
22 |
|
|
"restriction", |
23 |
|
|
"type", |
24 |
|
|
"evenement_retour_ar", |
25 |
|
|
"evenement_suivant_tacite", |
26 |
|
|
"array_to_string(array_agg(dossier_instruction_type ORDER BY dossier_instruction_type), '$sep') as dossier_instruction_type"); |
27 |
|
|
|
28 |
|
|
$tableSelect = DB_PREFIXE."evenement |
29 |
|
|
LEFT JOIN |
30 |
|
|
".DB_PREFIXE."lien_dossier_instruction_type_evenement |
31 |
|
|
ON |
32 |
|
|
lien_dossier_instruction_type_evenement.evenement=evenement.evenement"; |
33 |
|
|
|
34 |
|
|
$selection = " GROUP BY evenement.evenement,libelle"; |
35 |
|
|
|
36 |
|
|
$sql_dossier_instruction_type="SELECT |
37 |
|
|
dossier_instruction_type.dossier_instruction_type, |
38 |
fmichon |
1410 |
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
39 |
vpihour |
1133 |
FROM |
40 |
|
|
".DB_PREFIXE."dossier_instruction_type |
41 |
vpihour |
1143 |
LEFT JOIN |
42 |
|
|
".DB_PREFIXE."dossier_autorisation_type_detaille |
43 |
|
|
ON |
44 |
|
|
dossier_instruction_type.dossier_autorisation_type_detaille= |
45 |
|
|
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
46 |
vpihour |
1133 |
ORDER BY |
47 |
fmichon |
1410 |
dossier_autorisation_type_detaille.code"; |
48 |
vpihour |
1133 |
$sql_dossier_instruction_type_by_id = "SELECT |
49 |
|
|
dossier_instruction_type.dossier_instruction_type, |
50 |
fmichon |
1410 |
CONCAT(dossier_autorisation_type_detaille.code,' - ',dossier_instruction_type.code,' - ',dossier_instruction_type.libelle) as lib |
51 |
vpihour |
1133 |
FROM |
52 |
|
|
".DB_PREFIXE."dossier_instruction_type |
53 |
vpihour |
1143 |
LEFT JOIN |
54 |
|
|
".DB_PREFIXE."dossier_autorisation_type_detaille |
55 |
|
|
ON |
56 |
|
|
dossier_instruction_type.dossier_autorisation_type_detaille= |
57 |
|
|
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
58 |
vpihour |
1133 |
WHERE |
59 |
|
|
dossier_instruction_type IN (<idx>) |
60 |
|
|
ORDER BY |
61 |
fmichon |
1410 |
dossier_autorisation_type_detaille.code"; |
62 |
fmichon |
1502 |
|
63 |
|
|
$sql_action="SELECT action.action, action.libelle as lib FROM ".DB_PREFIXE."action ORDER BY lib"; |
64 |
|
|
$sql_etat="SELECT etat.etat, etat.libelle as lib FROM ".DB_PREFIXE."etat ORDER BY lib"; |
65 |
|
|
$sql_avis_decision="SELECT avis_decision.avis_decision, avis_decision.libelle as lib FROM ".DB_PREFIXE."avis_decision ORDER BY lib"; |
66 |
|
|
$sql_evenement_retour_ar="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib"; |
67 |
|
|
$sql_evenement_suivant_tacite="SELECT evenement.evenement, evenement.libelle as lib FROM ".DB_PREFIXE."evenement ORDER BY lib"; |
68 |
|
|
|
69 |
fraynaud |
3 |
?> |