2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 10/02/2011 20:39 |
//gen openMairie le 10/02/2011 20:39 |
4 |
include('../gen/sql/pgsql/dossier.inc.php'); |
include('../gen/sql/pgsql/dossier.inc.php'); |
5 |
$table=DB_PREFIXE."dossier left join ". |
|
6 |
DB_PREFIXE."instructeur on dossier.instructeur = instructeur.instructeur left join ". |
/*Tables sur lesquels la requête va s'effectuer*/ |
7 |
DB_PREFIXE."avis_decision on avis_decision.avis_decision=dossier.avis_decision"; |
$table = DB_PREFIXE."dossier |
8 |
|
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
9 |
|
ON lien_dossier_demandeur.dossier=dossier.dossier |
10 |
|
AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
11 |
|
LEFT JOIN ".DB_PREFIXE."demandeur |
12 |
|
ON lien_dossier_demandeur.demandeur=demandeur.demandeur |
13 |
|
LEFT JOIN ".DB_PREFIXE."instructeur |
14 |
|
ON dossier.instructeur = instructeur.instructeur |
15 |
|
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
16 |
|
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur |
17 |
|
LEFT JOIN ".DB_PREFIXE."avis_decision |
18 |
|
ON avis_decision.avis_decision=dossier.avis_decision |
19 |
|
LEFT JOIN ".DB_PREFIXE."division |
20 |
|
ON dossier.division=division.division"; |
21 |
|
|
22 |
|
/*Champs du début de la requête*/ |
23 |
$champAffiche=array( |
$champAffiche=array( |
24 |
'dossier.dossier as "'._("dossier").'"', |
'dossier.dossier as "'._("dossier").'"', |
25 |
'dossier.demandeur_nom as "'._("demandeur_nom").'"', |
'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"', |
26 |
'instructeur.nom as "'._("instructeur").'"', |
'instructeur.nom as "'._("instructeur").'"', |
27 |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
28 |
'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"', |
'dossier.date_dernier_depot as "'._("date_dernier_depot").'"', |
29 |
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
30 |
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
31 |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
32 |
'etat as "'._("etat").'"', |
'etat as "'._("etat").'"', |
33 |
'avis_decision.libelle as "'._("avis_decision").'"', |
'avis_decision.libelle as "'._("avis_decision").'"', |
34 |
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END || |
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END || |
35 |
CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END |
CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_urba-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END |
36 |
as "'._("enjeu").'"', |
as "'._("enjeu").'"', |
37 |
); |
); |
38 |
|
|
39 |
|
/*Tri*/ |
40 |
$tri= "order by dossier.dossier"; |
$tri= "order by dossier.dossier"; |
41 |
|
|
42 |
$champRecherche=array("dossier","demandeur_nom"); |
/*Recherche simple*/ |
43 |
|
$champRecherche=array( 'dossier.dossier as "'._("dossier").'"', |
44 |
|
'personne_morale_denomination as "'._("personne_morale_denomination").'"', |
45 |
|
'particulier_nom as "'._("particulier_nom").'"', |
46 |
|
); |
47 |
|
|
48 |
|
/*Icone*/ |
49 |
$ico = "../img/ico_dossier.png"; |
$ico = "../img/ico_dossier.png"; |
50 |
|
|
51 |
$edition=""; |
$edition=""; |
52 |
|
|
53 |
if ($retourformulaire== 'architecte'){ |
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
|
$tab_actions['corner']['ajouter'] = NULL; |
|
|
$tab_actions['left']['consulter'] = NULL; |
|
|
$tab_actions['content'] =NULL; |
|
|
$selection=" where dossier.architecte ='".$idx."'"; |
|
|
} |
|
|
if ($retourformulaire== 'travaux'){ |
|
|
$tab_actions['corner']['ajouter'] = NULL; |
|
|
$tab_actions['left']['consulter'] = NULL; |
|
|
$tab_actions['content'] =NULL; |
|
|
$selection=" where dossier.travaux ='".$idx."'"; |
|
|
} |
|
|
|
|
54 |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
55 |
// Configuration de la recherche avancee |
// Configuration de la recherche avancee |
56 |
if (!isset($options)) { |
if (!isset($options)) { |
61 |
0 => array("", "Oui", "Non", ), |
0 => array("", "Oui", "Non", ), |
62 |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
63 |
); |
); |
64 |
// |
/*Champs pour la recherche avancée*/ |
65 |
$champs['dossier'] = array( |
$champs['dossier'] = array( |
66 |
'table' => 'dossier', |
'table' => 'dossier', |
67 |
'colonne' => 'dossier', |
'colonne' => 'dossier', |
69 |
'taille' => 30, |
'taille' => 30, |
70 |
'libelle' => _('dossier')); |
'libelle' => _('dossier')); |
71 |
// |
// |
72 |
$champs['nature'] = array( |
$champs['dossier_autorisation_type_detaille'] = array( |
73 |
'table' => 'dossier', |
'table' => 'dossier_autorisation_type_detaille', |
74 |
'colonne' => 'nature', |
'colonne' => 'dossier_autorisation_type_detaille', |
75 |
'type' => 'select', |
'type' => 'select', |
76 |
'taille' => 30, |
'taille' => 30, |
77 |
'libelle' => _('nature')); |
'libelle' => _('dossier_autorisation_type_detaille')); |
|
|
|
|
|
|
78 |
|
|
79 |
// |
// |
|
$champs['delegataire_nom'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'delegataire_nom', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('nom delegataire')); |
|
|
// |
|
|
$champs['demandeur_nom'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'demandeur_nom', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('nom demandeur')); |
|
|
|
|
|
|
|
|
// |
|
|
$champs['demandeur_societe'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'demandeur_societe', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('demandeur_societe')); |
|
|
// |
|
80 |
$champs['parcelle'] = array( |
$champs['parcelle'] = array( |
81 |
'table' => 'dossier', |
'table' => 'dossier', |
82 |
'colonne' => 'parcelle', |
'colonne' => 'parcelle', |
83 |
'type' => 'text', |
'type' => 'text', |
84 |
'taille' => 30, |
'taille' => 30, |
85 |
'libelle' => _('parcelle')); |
'libelle' => _('parcelle')); |
|
|
|
|
// |
|
|
$champs['rivoli'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'rivoli', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('rivoli')); |
|
|
// |
|
|
$champs['terrain_adresse'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'terrain_adresse', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('terrain_adresse')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// |
|
|
$champs['terrain_adresse_complement'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'terrain_adresse_complement', |
|
|
'type' => 'text', |
|
|
'taille' => 30, |
|
|
'libelle' => _('terrain_adresse_complement')); |
|
86 |
//// COL2 |
//// COL2 |
87 |
|
|
88 |
// |
// |
101 |
"args" => $args, |
"args" => $args, |
102 |
); |
); |
103 |
|
|
|
// |
|
|
$champs['travaux'] = array( |
|
|
'table' => 'dossier', |
|
|
'colonne' => 'travaux', |
|
|
'type' => 'select', |
|
|
'libelle' => _('travaux')); |
|
|
|
|
|
|
|
104 |
//// COL3 |
//// COL3 |
105 |
|
|
106 |
|
|
217 |
'type' => 'date', |
'type' => 'date', |
218 |
'taille' => 8, |
'taille' => 8, |
219 |
'where' => 'intervaldate'); |
'where' => 'intervaldate'); |
220 |
// |
/*Configuration de la recherche avancée*/ |
221 |
$options[] = array( |
$options[] = array( |
222 |
'type' => 'search', |
'type' => 'search', |
223 |
'display' => true, |
'display' => true, |
226 |
'absolute_object' => 'dossier'); |
'absolute_object' => 'dossier'); |
227 |
} |
} |
228 |
|
|
229 |
|
/*Ajout de sous-formulaire à notre objet*/ |
230 |
|
$sousformulaire=array( |
231 |
|
//"donnees_techniques", |
232 |
|
"instruction", |
233 |
|
"consultation", |
234 |
|
"lot", |
235 |
|
"dossier_message", |
236 |
|
"dossier_commission", |
237 |
|
//"rapport_instruction", |
238 |
|
"dossier_autorisation", |
239 |
|
); |
240 |
|
|
241 |
$sousformulaire=array("instruction", |
/*Ajout de paramètre à certains sous-formulaire*/ |
242 |
"consultation", |
$sousformulaire_parameters = array( |
243 |
"terrain", |
"consultation" => array( |
244 |
"blocnote", |
"title" => _("consultation(s)"), |
245 |
"destination_shon", |
), |
246 |
"statistique", |
"dossier_message" => array( |
247 |
"messages"); |
"title" => _("message(s)"), |
248 |
|
), |
249 |
|
"dossier_commission" => array( |
250 |
|
"title" => _("commission(s)"), |
251 |
|
), |
252 |
|
"rapport_instruction" => array( |
253 |
|
"title" => _("rapport d'instruction"), |
254 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
255 |
|
), |
256 |
|
"lot" => array( |
257 |
|
"title" => _("lot(s)"), |
258 |
|
), |
259 |
|
"donnees_techniques" => array( |
260 |
|
"title" => _("donnees techniques"), |
261 |
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
262 |
|
), |
263 |
|
"dossier_autorisation" => array( |
264 |
|
"title" => _("DA"), |
265 |
|
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
266 |
|
), |
267 |
|
); |
268 |
?> |
?> |