2 |
jpm |
1 |
<?php
|
22 |
jpm |
2 |
//==================================== GTT v4 ==================================
|
|
|
3 |
// Niveau d'erreur
|
5 |
jpm |
4 |
error_reporting(E_ALL);
|
2 |
jpm |
5 |
|
29 |
jpm |
6 |
// Identification
|
|
|
7 |
define('GTT_AUTH_SESSION_NOM', 'gtt_v4');
|
|
|
8 |
$tps = 3600*24*30;
|
|
|
9 |
define('GTT_AUTH_SESSION_DUREE', (int)$tps);
|
|
|
10 |
|
22 |
jpm |
11 |
// Base de données
|
|
|
12 |
define('GTT_BDD_NOM', 'gestion_v4');
|
|
|
13 |
define('GTT_BDD_DSN', 'mysql://root:0000@localhost/'.GTT_BDD_NOM);
|
|
|
14 |
|
9 |
jpm |
15 |
// Les constantes d'action
|
11 |
jpm |
16 |
define ('GTT_ACTION_CONNEXION', 'gestion');
|
|
|
17 |
define ('GTT_ACTION_DECONNEXION', 'identification_deconnexion');
|
|
|
18 |
define ('GTT_ACTION_IDENTIFICATION', 'identification');
|
9 |
jpm |
19 |
define ('GTT_ACTION_PREFERENCE', 'preferences');
|
|
|
20 |
define ('GTT_ACTION_PREFERENCE_VALIDER', 'preferences_valider');
|
10 |
jpm |
21 |
define ('GTT_ACTION_GESTION', 'gestion');
|
11 |
jpm |
22 |
define ('GTT_ACTION_GESTION_VALIDER', 'gestion_valider');
|
10 |
jpm |
23 |
define ('GTT_ACTION_UTILISATEUR', 'utilisateur');
|
9 |
jpm |
24 |
|
22 |
jpm |
25 |
// Les chemins d'accès
|
10 |
jpm |
26 |
define('GTT_CHEMIN_APPLI', '');
|
|
|
27 |
define('GTT_CHEMIN_CLASSE', GTT_CHEMIN_APPLI.'classes/');
|
|
|
28 |
define('GTT_CHEMIN_PEAR', GTT_CHEMIN_CLASSE.'pear/');
|
|
|
29 |
define('GTT_CHEMIN_METIER', GTT_CHEMIN_CLASSE.'metiers/');
|
|
|
30 |
define('GTT_CHEMIN_ACTION', GTT_CHEMIN_APPLI.'actions/');
|
|
|
31 |
define('GTT_CHEMIN_PRESENTATION', GTT_CHEMIN_APPLI.'presentation/');
|
45 |
jpm |
32 |
//define('GTT_CHEMIN_MODULE', GTT_CHEMIN_APPLI.'modules/');
|
|
|
33 |
//define('GTT_CHEMIN_VUE', GTT_CHEMIN_APPLI.'vues/');
|
9 |
jpm |
34 |
|
22 |
jpm |
35 |
// Inclusion des chemins des bibliothèques
|
26 |
jpm |
36 |
ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.GTT_CHEMIN_PEAR);
|
10 |
jpm |
37 |
|
45 |
jpm |
38 |
// Tableau des chemins pour la fonction autoload
|
|
|
39 |
$GLOBALS['_GTT_']['tab_chemin_autoload'] = array(GTT_CHEMIN_CLASSE, GTT_CHEMIN_METIER, GTT_CHEMIN_ACTION);
|
|
|
40 |
|
22 |
jpm |
41 |
// Les valeur de la bdd
|
|
|
42 |
define('GTT_ABSCENCE_ID_CP', 1);
|
|
|
43 |
define('GTT_ABSCENCE_ID_RTT', 2);
|
|
|
44 |
define('GTT_ABSCENCE_ID_MALADIE', 3);
|
|
|
45 |
define('GTT_ABSCENCE_ID_GREVE', 4);
|
10 |
jpm |
46 |
|
48 |
jpm |
47 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
48 |
// Débogage
|
|
|
49 |
/** Constante stockant si oui ou non on veut afficher le débogage.*/
|
|
|
50 |
define('GTT_DEBOGAGE', false);
|
|
|
51 |
/** Constante stockant si oui ou non on veut afficher le débogage des fichiers PEAR.*/
|
|
|
52 |
define('GTT_DEBOGAGE_PEAR', false);
|
|
|
53 |
/** Constante stockant la chaine permettant de repérer en se basabt sur le chemin, les fichiers provenant de la bibliothèque PEAR.*/
|
|
|
54 |
define('GTT_DEBOGAGE_PEAR_CHAINE', '/lib/php/');
|
|
|
55 |
/** Constante stockant si oui ou non on veut afficher le contexte de débogage.*/
|
|
|
56 |
define('GTT_DEBOGAGE_CONTEXTE', false);
|
|
|
57 |
/** Constante stockant une valeur correspondant au niveau d'erreur à employer pour le code PHP.*/
|
|
|
58 |
define('GTT_DEBOGAGE_NIVEAU', 2048);// Voir le manuel de PHP pour les différents niveaux disponibles.
|
|
|
59 |
/** Constante stockant si oui ou nom on veut afficher le tableau de chronométrage de l'application.*/
|
|
|
60 |
define('GTT_DEBOGAGE_CHRONO', false);
|
|
|
61 |
|
22 |
jpm |
62 |
//==================================== GTT v3 ==================================
|
|
|
63 |
/* definition des chemins d'acces */
|
|
|
64 |
define ("CHEMIN",'');
|
|
|
65 |
define("CHEMIN_PRESENTATION",CHEMIN.'presentation/');
|
|
|
66 |
define("CHEMIN_CALENDRIER",CHEMIN_PRESENTATION);
|
|
|
67 |
define("CHEMIN_CSS",CHEMIN.'presentation/');
|
|
|
68 |
define("CHEMIN_CLASSES_METIER",CHEMIN.'classes_metier/');
|
|
|
69 |
define("CHEMIN_CLASSES",CHEMIN.'classes/');
|
|
|
70 |
define("CHEMIN_LANGUES",CHEMIN.'langues/');
|
|
|
71 |
define("CHEMIN_MENU",CHEMIN.'menu/');
|
|
|
72 |
define("CHEMIN_CONTROLEUR",CHEMIN.'controleur/');
|
10 |
jpm |
73 |
|
22 |
jpm |
74 |
// Définition des constantes d'action v3
|
|
|
75 |
define ('GESTION_TRAVAIL', 1);
|
|
|
76 |
define ('GESTION_ADMIN_UTILISATEUR', 13);
|
|
|
77 |
define ('GESTION_EDITER_UTILISATEUR', 14);
|
|
|
78 |
define ('GESTION_ADMIN_PROJET', 15);
|
|
|
79 |
define ('GESTION_ADMIN_CATEGORIE', 16);
|
|
|
80 |
define ('GESTION_ADMIN_MOTIF_ABSENCE', 17);
|
|
|
81 |
define ('GESTION_ADMIN_STATUT', 18);
|
|
|
82 |
define ('GESTION_ADMIN_FRAIS', 19);
|
|
|
83 |
define ('GESTION_ADMIN_TACHE', 20);
|
|
|
84 |
define ('GESTION_EDITER_PREFERENCES', 21);
|
|
|
85 |
define ('GESTION_DECONNEXION', 22);
|
|
|
86 |
|
|
|
87 |
/* definition des constantes de plusieurs tests et divers */
|
10 |
jpm |
88 |
$GLOBALS['dsn_v3'] = 'mysql://root:0000@localhost/gestion_v3';
|
5 |
jpm |
89 |
$GLOBALS['urlBase'] = 'http://localhost/gestion/index.php?action=';
|
2 |
jpm |
90 |
//on suppose que le nombre d'heure maximum par jour de travail est 23
|
5 |
jpm |
91 |
$GLOBALS['limiteJourTravail'] = 24;
|
2 |
jpm |
92 |
//on suppose que le nombre d'heure maximumde par jour de recuperation partielle est 11
|
5 |
jpm |
93 |
$GLOBALS['limiteJourRecupPart'] = 12;
|
22 |
jpm |
94 |
|
|
|
95 |
/* definition des constantes de nom de table et de leurs champs */
|
2 |
jpm |
96 |
define ("GEST_UTILISATEUR", "gestion_utilisateur");
|
7 |
jpm |
97 |
define ("GEST_CHAMPS_ID_UTILISATEUR","gu_id_utilisateur");
|
2 |
jpm |
98 |
define("GEST_CHAMPS_NOM","gu_nom");
|
|
|
99 |
define("GEST_CHAMPS_PRENOM", "gu_prenom");
|
|
|
100 |
define("GEST_CHAMPS_PASSWORD","gu_password");
|
22 |
jpm |
101 |
define("GEST_CHAMPS_EMAIL","gu_email");
|
2 |
jpm |
102 |
define("GEST_CHAMPS_TELEPHONE","gu_telephone");
|
|
|
103 |
define("GEST_CHAMPS_ADRESSE","gu_adresse");
|
|
|
104 |
define("GEST_CHAMPS_CODE_POSTAL","gu_code_postal");
|
|
|
105 |
define("GEST_CHAMPS_VILLE","gu_ville");
|
|
|
106 |
define("GEST_CHAMPS_QUOTA_HEURES_SUPP","gu_quota_heures_supp");
|
|
|
107 |
define("GEST_CHAMPS_CONGES_PAYES","gu_conges_payes");
|
|
|
108 |
define("GEST_CHAMPS_TEMPS_DE_TRAVAIL","gu_temps_de_travail");
|
|
|
109 |
define("GEST_CHAMPS_ADMIN","gu_admin");
|
|
|
110 |
define("GEST_CHAMPS_ADMIN2","gu_admin2");
|
|
|
111 |
define("GEST_CHAMPS_STATUT","gs_id_statut");
|
|
|
112 |
define("GEST_CHAMPS_NOTES", "gu_notes");
|
|
|
113 |
|
|
|
114 |
//******************motif absence***********************//
|
|
|
115 |
|
|
|
116 |
define("GEST_MOTIF_ABSENCE","gestion_motif_absence");
|
|
|
117 |
define("GEST_CHAMPS_ID_MOTIF","gma_id_motif");
|
|
|
118 |
define("GEST_CHAMPS_LIBELLE_MOTIF","gma_libelle_motif");
|
22 |
jpm |
119 |
define("GEST_CHAMPS_TYPE_RTT","gma_type_rtt");
|
2 |
jpm |
120 |
|
|
|
121 |
//******************note frais***********************//
|
|
|
122 |
|
|
|
123 |
define("GEST_FRAIS","gestion_note_frais");
|
|
|
124 |
define("GEST_CHAMPS_ID_FRAIS","gnf_if_frais");
|
|
|
125 |
define("GEST_CHAMPS_LIBELLE_FRAIS","gnf_libelle_frais");
|
|
|
126 |
|
|
|
127 |
//******************depenses***********************//
|
|
|
128 |
|
|
|
129 |
define("GEST_DEPENSE","gestion_depense");
|
|
|
130 |
define("GEST_CHAMPS_DATE_FRAIS","gd_date_depense");
|
|
|
131 |
define("GEST_CHAMPS_MONTANT_HT","gd_montant_ht");
|
|
|
132 |
define("GEST_CHAMPS_MONTANT_TTC","gd_montant_ttc");
|
|
|
133 |
|
|
|
134 |
//******************statut***********************//
|
|
|
135 |
|
|
|
136 |
define("GEST_STATUT","gestion_statut");
|
|
|
137 |
define("GEST_CHAMPS_ID_STATUT","gs_id_statut");
|
|
|
138 |
define("GEST_CHAMPS_LIBELLE_STATUT","gs_libelle_statut");
|
|
|
139 |
|
|
|
140 |
//******************categorie***********************//
|
|
|
141 |
|
|
|
142 |
define("GEST_CATEGORIE","gestion_categorie");
|
|
|
143 |
define("GEST_CHAMPS_ID_CATEGORIE","gc_id_categorie");
|
|
|
144 |
define("GEST_CHAMPS_LIBELLE_CATEGORIE","gc_libelle_categorie");
|
|
|
145 |
|
|
|
146 |
//******************projet***********************//
|
|
|
147 |
|
|
|
148 |
define("GEST_PROJET","gestion_projet");
|
|
|
149 |
define("GEST_CHAMPS_ID_PROJET","gp_id_projet");
|
|
|
150 |
define("GEST_CHAMPS_NOM_PROJET","gp_nom_projet");
|
|
|
151 |
define("GEST_CHAMPS_DESCRIPTION_PROJET","gp_description");
|
|
|
152 |
define("GEST_CHAMPS_DATE_DEBUT_PROJET","gp_date_debut");
|
|
|
153 |
define("GEST_CHAMPS_DUREE_PREVUE_PROJET","gp_duree_prevue");
|
|
|
154 |
define("GEST_CHAMPS_AVANCEMENT_PROJET","gp_avancement");
|
|
|
155 |
|
|
|
156 |
//******************absence***********************//
|
|
|
157 |
|
|
|
158 |
define("GEST_ABSENCE","gestion_absence");
|
|
|
159 |
define("GEST_CHAMPS_DATE_DEBUT_ABSENCE","ga_date_debut");
|
|
|
160 |
define("GEST_CHAMPS_DATE_FIN_ABSENCE","ga_date_fin");
|
|
|
161 |
define("GEST_CHAMPS_DATE_ENVOI_LETTRE","ga_date_envoi_lettre");
|
|
|
162 |
|
|
|
163 |
//******************travail***********************//
|
|
|
164 |
|
|
|
165 |
define("GEST_TRAVAIL","gestion_travail");
|
|
|
166 |
define("GEST_CHAMPS_DATE_TRAVAIL","gt_date_travail");
|
|
|
167 |
define("GEST_CHAMPS_DUREE_TRAVAIL","gt_duree_travail");
|
|
|
168 |
|
|
|
169 |
//******************preferences***********************//
|
|
|
170 |
|
|
|
171 |
define("GEST_PREFERENCES","gestion_preferences");
|
|
|
172 |
|
|
|
173 |
//******************taches***********************//
|
|
|
174 |
|
|
|
175 |
define("GEST_TACHES","gestion_taches");
|
|
|
176 |
define("GEST_CHAMPS_ID_TACHE","gt_id_tache");
|
|
|
177 |
define("GEST_CHAMPS_NOM_TACHE","gt_nom_tache");
|
|
|
178 |
define("GEST_CHAMPS_DESCRIPTION_TACHE","gt_description_tache");
|
|
|
179 |
define("GEST_CHAMPS_DATE_DEB_TACHE","gt_date_debut_tache");
|
|
|
180 |
define("GEST_CHAMPS_DUREE_PREVUE_TACHE","gt_duree_prevue");
|
|
|
181 |
define("GEST_CHAMPS_AVANCEMENT_TACHE","gt_avancement_tache");
|
|
|
182 |
define("GEST_CHAMPS_TEMPS_REEL_TACHE","gt_duree_reelle_tache");
|
|
|
183 |
|
|
|
184 |
//******************prevision***********************//
|
|
|
185 |
define ("GEST_PREVISION","gestion_prevision_tache");
|
|
|
186 |
define ("GEST_CHAMPS_DATE_PREVISION","gpt_date_prevision");
|
|
|
187 |
define ("GEST_CHAMPS_DUREE_PREVISION","gpt_duree_prevision");
|
|
|
188 |
|
|
|
189 |
?>
|