| Line 1... |
Line 1... |
| 1 |
<?php
|
1 |
<?php
|
| 2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
| 3 |
// +------------------------------------------------------------------------------------------------------+
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
| 4 |
// | PHP version 4.1 |
|
4 |
// | PHP version 4.1 |
|
| 5 |
// +------------------------------------------------------------------------------------------------------+
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
| 6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
| 7 |
// +------------------------------------------------------------------------------------------------------+
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 63... |
Line 63... |
| 63 |
|
63 |
|
| Line 64... |
Line 64... |
| 64 |
$valeur_acceptable_tri = array ('p_titre', 'ps_pourcent', 'ps_nombre_inscrit', 'ps_doc_derniere_semaine', 'psu_id_statut'); // Securite
|
64 |
$valeur_acceptable_tri = array ('p_titre', 'ps_pourcent', 'ps_nombre_inscrit', 'ps_doc_derniere_semaine', 'psu_id_statut'); // Securite
|
| 65 |
|
65 |
|
| 66 |
if (isset($_GET[PROJET_VARIABLE_TRI]) && $_GET[PROJET_VARIABLE_TRI] != '' && in_array($_GET[PROJET_VARIABLE_TRI], $valeur_acceptable_tri)) {
|
66 |
if (isset($_GET[PROJET_VARIABLE_TRI]) && $_GET[PROJET_VARIABLE_TRI] != '' && in_array($_GET[PROJET_VARIABLE_TRI], $valeur_acceptable_tri)) {
|
| 67 |
$tri = $_GET[PROJET_VARIABLE_TRI];
|
67 |
$tri = $_GET[PROJET_VARIABLE_TRI];
|
| 68 |
|
68 |
|
| 69 |
} else {
|
69 |
} else {
|
| Line 70... |
Line 70... |
| 70 |
$tri = 'p_titre';
|
70 |
$tri = 'p_titre';
|
| Line 71... |
Line 71... |
| 71 |
}
|
71 |
}
|
| 72 |
|
72 |
|
| 73 |
$valeur_acceptable_ordre_tri = array ('asc', 'desc'); // securite
|
73 |
$valeur_acceptable_ordre_tri = array ('asc', 'desc'); // securite
|
| 74 |
|
74 |
|
| 75 |
if (isset($_GET[PROJET_VARIABLE_ORDRE_TRI]) && $_GET[PROJET_VARIABLE_ORDRE_TRI] != ''
|
75 |
if (isset($_GET[PROJET_VARIABLE_ORDRE_TRI]) && $_GET[PROJET_VARIABLE_ORDRE_TRI] != ''
|
| 76 |
&& in_array ($_GET[PROJET_VARIABLE_ORDRE_TRI], $valeur_acceptable_ordre_tri)) {
|
76 |
&& in_array ($_GET[PROJET_VARIABLE_ORDRE_TRI], $valeur_acceptable_ordre_tri)) {
|
| 77 |
$ordre_tri = $_GET[PROJET_VARIABLE_ORDRE_TRI];
|
77 |
$ordre_tri = $_GET[PROJET_VARIABLE_ORDRE_TRI];
|
| Line 78... |
Line 78... |
| 78 |
|
78 |
|
| 79 |
} else {
|
79 |
} else {
|
| 80 |
$ordre_tri = '';
|
80 |
$ordre_tri = '';
|
| 81 |
}
|
81 |
}
|
| Line 82... |
Line 82... |
| 82 |
|
82 |
|
| 83 |
// variable de session pour se rappeler des choix du visiteur
|
83 |
// variable de session pour se rappeler des choix du visiteur
|
| 84 |
if (!isset ($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && isset($_SESSION['_PROJET_']['projet_affichage']) && ($_SESSION['_PROJET_']['projet_affichage'] == 'simple' || $_SESSION['_PROJET_']['projet_affichage'] == 'expert')) {
|
84 |
if (!isset ($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && isset($_SESSION['_PROJET_']['projet_affichage']) && ($_SESSION['_PROJET_']['projet_affichage'] == 'simple' || $_SESSION['_PROJET_']['projet_affichage'] == 'expert')) {
|
| Line 158... |
Line 158... |
| 158 |
// soit la liste des projets
|
158 |
// soit la liste des projets
|
| 159 |
if (isset($_GET['projet_recherche']) && $_GET['projet_recherche'] != '') {
|
159 |
if (isset($_GET['projet_recherche']) && $_GET['projet_recherche'] != '') {
|
| 160 |
$_SESSION['_PROJET_']['motif_recherche'] = $_GET['projet_recherche'];
|
160 |
$_SESSION['_PROJET_']['motif_recherche'] = $_GET['projet_recherche'];
|
| 161 |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche.class.php';
|
161 |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche.class.php';
|
| 162 |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche_projet.class.php';
|
162 |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche_projet.class.php';
|
| 163 |
|
163 |
|
| 164 |
$moteur = new More_Recherche($_SESSION['_PROJET_']['motif_recherche']);
|
164 |
$moteur = new More_Recherche($_SESSION['_PROJET_']['motif_recherche']);
|
| 165 |
$recherche_projet = new More_Recherche_Projet($_SESSION['_PROJET_']['motif_recherche']);
|
165 |
$recherche_projet = new More_Recherche_Projet($_SESSION['_PROJET_']['motif_recherche']);
|
| 166 |
$moteur->ajouterRecherche($recherche_projet);
|
166 |
$moteur->ajouterRecherche($recherche_projet);
|
| 167 |
$resultats = $moteur->rechercherMotif();
|
167 |
$resultats = $moteur->rechercherMotif();
|
| 168 |
|
168 |
|
| 169 |
// $chaine_id_projet contient une liste d identifiant separer par une virgule
|
169 |
// $chaine_id_projet contient une liste d identifiant separer par une virgule
|
| 170 |
if (!empty($resultats)) {
|
170 |
if (!empty($resultats)) {
|
| 171 |
$chaine_id_projet = '';
|
171 |
$chaine_id_projet = '';
|
| 172 |
foreach ($resultats as $projet) {
|
172 |
foreach ($resultats as $projet) {
|
| 173 |
$chaine_id_projet .= $projet['id'].',';
|
173 |
$chaine_id_projet .= $projet['id'].',';
|
| 174 |
}
|
174 |
}
|
| 175 |
$chaine_id_projet = substr($chaine_id_projet, 0, -1);
|
175 |
$chaine_id_projet = substr($chaine_id_projet, 0, -1);
|
| 176 |
$where_recherche = ' where p_id in ('.$chaine_id_projet.')';
|
176 |
$where_recherche = ' where p_id in ('.$chaine_id_projet.')';
|
| 177 |
|
177 |
|
| 178 |
$valeur_projet_recherche = $_GET['projet_recherche'];
|
178 |
$valeur_projet_recherche = $_GET['projet_recherche'];
|
| 179 |
}
|
179 |
}
|
| 180 |
} else {
|
180 |
} else {
|
| 181 |
$where_recherche = '';
|
181 |
$where_recherche = '';
|
| 182 |
$valeur_projet_recherche = '';
|
182 |
$valeur_projet_recherche = '';
|
| Line 196... |
Line 196... |
| 196 |
// On recherche les projets auquels l utilisateur participe
|
196 |
// On recherche les projets auquels l utilisateur participe
|
| 197 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php';
|
197 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php';
|
| 198 |
$participant = new participe ($this->_db);
|
198 |
$participant = new participe ($this->_db);
|
| 199 |
$tableau_projet = $participant->getInformationsUtilisateurs($this->_auth->getAuthData(PROJET_CHAMPS_ID));
|
199 |
$tableau_projet = $participant->getInformationsUtilisateurs($this->_auth->getAuthData(PROJET_CHAMPS_ID));
|
| 200 |
$chaine_id_projet = '';
|
200 |
$chaine_id_projet = '';
|
| - |
|
201 |
if (count ($tableau_projet) == 0) {
|
| 201 |
if (count ($tableau_projet) == 0) return '<p class="information">Vous n\'êtes inscrit à aucun projet</p>';
|
202 |
return '<p class="information">Vous n\'êtes inscrit à aucun projet</p>';
|
| - |
|
203 |
}
|
| 202 |
foreach ($tableau_projet as $projet) $chaine_id_projet .= $projet[3].',';
|
204 |
foreach ($tableau_projet as $projet) {
|
| - |
|
205 |
$chaine_id_projet .= $projet[3].',';
|
| - |
|
206 |
}
|
| 203 |
$chaine_id_projet = substr($chaine_id_projet, 0, -1);
|
207 |
$chaine_id_projet = substr($chaine_id_projet, 0, -1);
|
| 204 |
$where_recherche .= ' where p_id in ('.$chaine_id_projet.')';
|
208 |
$where_recherche .= ' where p_id in ('.$chaine_id_projet.')';
|
| 205 |
|
209 |
|
| 206 |
$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID)).
|
210 |
$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID)).
|
| 207 |
' left join projet_statut on psu_id_statut=ps_id_statut';
|
211 |
' left join projet_statut on psu_id_statut=ps_id_statut';
|
| 208 |
$select = 'psu_id_statut, ps_statut_nom,';
|
212 |
$select = 'psu_id_statut, ps_statut_nom,';
|
| 209 |
}
|
213 |
}
|
| 210 |
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'.
|
214 |
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'.
|
| 211 |
' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
|
215 |
' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
|
| 212 |
' ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
|
216 |
' ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
|
| 213 |
' projet left join projet_lien_liste on p_id=pl_id_projet'.
|
217 |
' projet left join projet_lien_liste on p_id=pl_id_projet'.
|
| 214 |
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
|
218 |
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
|
| 215 |
' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
|
219 |
' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
|
| 216 |
$from_recherche.
|
220 |
$from_recherche.
|
| 217 |
$where_recherche.
|
221 |
$where_recherche.
|
| 218 |
' group by p_id order by '.$tri.' '.$ordre_tri ;
|
222 |
' group by p_id order by '.$tri.' '.$ordre_tri ;
|
| - |
|
223 |
|
| - |
|
224 |
if ($ordre_tri == '') {
|
| - |
|
225 |
$ordre_tri = 'desc';
|
| - |
|
226 |
}
|
| Line 219... |
Line -... |
| 219 |
|
- |
|
| 220 |
if ($ordre_tri == '') $ordre_tri = 'desc';
|
- |
|
| 221 |
|
227 |
|
| 222 |
$resultat = $this->_db->query($requete) ;
|
228 |
$resultat = $this->_db->query($requete) ;
|
| 223 |
if (DB::isError($resultat)) {
|
229 |
if (DB::isError($resultat)) {
|
| 224 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
230 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
| Line 225... |
Line 231... |
| 225 |
}
|
231 |
}
|
| Line 226... |
Line 232... |
| 226 |
|
232 |
|
| 227 |
$nombre_resultat = $resultat->numRows();
|
233 |
$nombre_resultat = $resultat->numRows();
|
| 228 |
|
234 |
|
| 229 |
/* Si l utilisateur est loggue, on recherche son statut par rapport aux projets */
|
235 |
/* Si l utilisateur est loggue, on recherche son statut par rapport aux projets */
|
| 230 |
if ($this->_auth->getAuth()) {
|
236 |
if ($this->_auth->getAuth()) {
|
| 231 |
$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'.
|
237 |
$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'.
|
| 232 |
' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID));
|
238 |
' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID));
|
| 233 |
$resultat_statut = $GLOBALS['projet_db']->query($requete_statut);
|
239 |
$resultat_statut = $GLOBALS['projet_db']->query($requete_statut);
|
| 234 |
while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) {
|
240 |
while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) {
|
| 235 |
$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut;
|
241 |
$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut;
|
| Line 236... |
Line 242... |
| 236 |
$tableau_statut[$ligne_statut->psu_id_projet]['nom_statut'] = $ligne_statut->ps_statut_nom;
|
242 |
$tableau_statut[$ligne_statut->psu_id_projet]['nom_statut'] = $ligne_statut->ps_statut_nom;
|
| Line 237... |
Line 243... |
| 237 |
}
|
243 |
}
|
| 238 |
}
|
- |
|
| 239 |
|
244 |
}
|
| 240 |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php';
|
245 |
|
| 241 |
|
246 |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php';
|
| 242 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
247 |
|
| 243 |
|
248 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
| 244 |
// Si le projet est en dormance, on ne l affiche pas dans le mode normal
|
249 |
// Si le projet est en dormance, on ne l affiche pas dans le mode normal
|
| 245 |
// Sauf si le theme choisit est "en dormance"
|
250 |
// Sauf si le theme choisit est "en dormance"
|
| 246 |
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1 && $theme_selectionne != 9) {
|
251 |
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1 && $theme_selectionne != 9) {
|
| 247 |
|
252 |
|
| Line 248... |
Line 253... |
| 248 |
} else {
|
253 |
} else {
|
| - |
|
254 |
$donnees[] = $ligne;
|
| - |
|
255 |
}
|
| - |
|
256 |
|
| - |
|
257 |
}
|
| 249 |
$donnees[] = $ligne;
|
258 |
|
| 250 |
}
|
259 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') {
|
| 251 |
|
260 |
$perpage = $nombre_resultat;
|
| 252 |
}
|
261 |
} else {
|
| 253 |
|
262 |
$perpage = 20;
|
| Line 262... |
Line 271... |
| 262 |
'spacesBeforeSeparator' => 0,
|
271 |
'spacesBeforeSeparator' => 0,
|
| 263 |
'spacesAfterSeparator' => 0,
|
272 |
'spacesAfterSeparator' => 0,
|
| 264 |
'separator' => '',
|
273 |
'separator' => '',
|
| 265 |
'prevImg' => '<< Page précédente',
|
274 |
'prevImg' => '<< Page précédente',
|
| 266 |
'nextImg' => 'Page suivante >>',
|
275 |
'nextImg' => 'Page suivante >>',
|
| 267 |
'extraVars' => array ('projet_recherche' => $_SESSION['_PROJET_']['motif_recherche'],
|
276 |
'extraVars' => array ('projet_recherche' => $_SESSION['_PROJET_']['motif_recherche'],
|
| 268 |
PROJET_VARIABLE_MODE_AFFICHAGE => $_SESSION['_PROJET_']['projet_affichage']),
|
277 |
PROJET_VARIABLE_MODE_AFFICHAGE => $_SESSION['_PROJET_']['projet_affichage']),
|
| 269 |
'itemData' => $donnees
|
278 |
'itemData' => $donnees
|
| 270 |
);
|
279 |
);
|
| 271 |
$pager = & Pager::factory($params);
|
280 |
$pager = & Pager::factory($params);
|
| 272 |
$links = $pager->getLinks();
|
281 |
$links = $pager->getLinks();
|
| 273 |
$data = $pager->getPageData();
|
282 |
$data = $pager->getPageData();
|
| 274 |
$nombre_projets = $pager->numItems();
|
283 |
$nombre_projets = $pager->numItems();
|
| 275 |
$range = $pager->getOffsetByPageId();
|
284 |
$range = $pager->getOffsetByPageId();
|
| 276 |
|
- |
|
| Line 277... |
Line 285... |
| 277 |
|
285 |
|
| 278 |
// On inclue un fichier local
|
286 |
// On inclue un fichier local
|
| 279 |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
|
287 |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
|
| 280 |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
|
288 |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
|
| Line 287... |
Line 295... |
| 287 |
// La liste
|
295 |
// La liste
|
| Line 288... |
Line 296... |
| 288 |
|
296 |
|
| 289 |
|
297 |
|
| 290 |
$tableau_donnees = array();
|
298 |
$tableau_donnees = array();
|
| Line 291... |
Line 299... |
| 291 |
foreach ($data as $ligne) {
|
299 |
foreach ($data as $ligne) {
|
| 292 |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
|
300 |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
|
| Line 293... |
Line 301... |
| 293 |
|
301 |
|
| Line 294... |
Line 302... |
| 294 |
$tableau_donnees[$ligne->p_id]['lien'] = $this->_url->getURL();
|
302 |
$tableau_donnees[$ligne->p_id]['lien'] = $this->_url->getURL();
|
| 295 |
$tableau_donnees[$ligne->p_id]['titre'] = $ligne->p_titre;
|
303 |
$tableau_donnees[$ligne->p_id]['titre'] = $ligne->p_titre;
|
| 296 |
|
304 |
|
| 297 |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_inscrit;
|
305 |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_inscrit;
|
| 298 |
|
306 |
|
| 299 |
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
|
- |
|
| 300 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
|
307 |
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
|
| 301 |
if ($ligne->ps_pourcent <33) {
|
308 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
|
| 302 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif';
|
309 |
if ($ligne->ps_pourcent < 33) {
|
| 303 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible';
|
- |
|
| 304 |
}
|
310 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif';
|
| 305 |
else if ($ligne->ps_pourcent < 66) {
|
311 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible';
|
| 306 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif';
|
312 |
} else if ($ligne->ps_pourcent < 66) {
|
| 307 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne';
|
313 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif';
|
| 308 |
}
|
314 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne';
|
| 309 |
else if ($ligne->ps_pourcent <= 100) {
|
315 |
} else if ($ligne->ps_pourcent <= 100) {
|
| 310 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Très actif';
|
316 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Très actif';
|
| 311 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee';
|
317 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee';
|
| 312 |
}
|
318 |
}
|
| 313 |
} else {
|
319 |
} else {
|
| 314 |
$tableau_donnees[$ligne->p_id]['activite'] = $ligne->ps_pourcent.'%';
|
320 |
$tableau_donnees[$ligne->p_id]['activite'] = $ligne->ps_pourcent.'%';
|
| 315 |
}
|
321 |
}
|
| 316 |
$res .= $ligne->p_resume ;
|
322 |
$res .= $ligne->p_resume ;
|
| 317 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
|
323 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
|
| Line 318... |
Line 324... |
| 318 |
$res .= '(<a href="'.$this->_url->getURL().'">Rejoindre ce projet</a>)'."\n";
|
324 |
$res .= '(<a href="'.$this->_url->getURL().'">Rejoindre ce projet</a>)'."\n";
|
| 319 |
|
325 |
|
| 320 |
// Recherche du forum
|
326 |
// Recherche du forum
|
| 321 |
if ($ligne->pl_id_liste != null && $ligne->plle_id_liste == null) {
|
327 |
if ($ligne->pl_id_liste != null && $ligne->plle_id_liste == null) {
|
| 322 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
|
328 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
|
| 323 |
|
329 |
|
| 324 |
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /></a>'."\n";
|
330 |
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /></a>'."\n";
|
| 325 |
$res .= $forum;
|
331 |
$res .= $forum;
|
| 326 |
|
332 |
|
| 327 |
} else {
|
333 |
} else {
|
| 328 |
|
334 |
|
| 329 |
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
|
335 |
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
|
| 330 |
$listes_ext = new liste_externe ($this->_db) ;
|
336 |
$listes_ext = new liste_externe ($this->_db) ;
|
| 331 |
if ($ligne->plle_id_liste != null) {
|
337 |
if ($ligne->plle_id_liste != null) {
|
| 332 |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
|
338 |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
|
| 333 |
|
339 |
|
| 334 |
$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
|
340 |
$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
|
| 335 |
'"><img src="sites/commun/generique/images/icones/yahoo.png" alt="Yahoo"/></a>';
|
341 |
'"><img src="sites/commun/generique/images/icones/yahoo.png" alt="Yahoo"/></a>';
|
| 336 |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_membre_yahoo;
|
- |
|
| 337 |
} else {
|
342 |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_membre_yahoo;
|
| 338 |
$forum = '-';
|
343 |
} else {
|
| 339 |
}
|
344 |
$forum = '-';
|
| 340 |
}
|
345 |
}
|
| 341 |
if ($ligne->ps_msg_derniere_semaine != 0) {
|
346 |
}
|
| 342 |
|
347 |
if ($ligne->ps_msg_derniere_semaine != 0) {
|
| 343 |
$tableau_donnees[$ligne->p_id]['nombre_message'] = $ligne->ps_msg_derniere_semaine;
|
348 |
$tableau_donnees[$ligne->p_id]['nombre_message'] = $ligne->ps_msg_derniere_semaine;
|
| 344 |
} else {
|
349 |
} else {
|
| 345 |
$tableau_donnees[$ligne->p_id]['nombre_message'] = 0;
|
350 |
$tableau_donnees[$ligne->p_id]['nombre_message'] = 0;
|
| 346 |
}
|
351 |
}
|
| 347 |
$tableau_donnees[$ligne->p_id]['forum'] = $forum;
|
352 |
$tableau_donnees[$ligne->p_id]['forum'] = $forum;
|
| 348 |
if ($ligne->p_wikini) {
|
353 |
if ($ligne->p_wikini) {
|
| 349 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
354 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
| 350 |
$link=$this->_url->getURL();
|
355 |
$link=$this->_url->getURL();
|
| 351 |
$wiki_res = '<a href="'.$link.'">voir</a>' ;
|
356 |
$wiki_res = '<a href="'.$link.'">voir</a>' ;
|
| 352 |
if ($ligne->ps_modifwiki_derniere_semaine != 0) {
|
357 |
if ($ligne->ps_modifwiki_derniere_semaine != 0) {
|
| 353 |
$wiki_res .= ' <span title="Nouvelles contributions cette semaine"> ( +'.$ligne->ps_modifwiki_derniere_semaine.' )</span>';
|
358 |
$wiki_res .= ' <span title="Nouvelles contributions cette semaine"> ( +'.$ligne->ps_modifwiki_derniere_semaine.' )</span>';
|
| 354 |
}
|
359 |
}
|
| 355 |
$this->_url->removeQueryString ('act');
|
360 |
$this->_url->removeQueryString ('act');
|
| 356 |
} else {
|
361 |
} else {
|
| 357 |
$wiki_res = '-' ;
|
362 |
$wiki_res = '-' ;
|
| 358 |
}
|
363 |
}
|
| 359 |
$tableau_donnees[$ligne->p_id]['wikini'] = $wiki_res;
|
364 |
$tableau_donnees[$ligne->p_id]['wikini'] = $wiki_res;
|
| 360 |
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
|
365 |
$titre = '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
|
| 361 |
|
366 |
|
| 362 |
if ($ligne->p_avoir_document != 0) {
|
367 |
if ($ligne->p_avoir_document != 0) {
|
| 363 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
|
368 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
|
| 364 |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
369 |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
| 365 |
if ($ligne->ps_doc_derniere_semaine != 0) {
|
370 |
if ($ligne->ps_doc_derniere_semaine != 0) {
|
| 366 |
$document .= ' <span title="Nouveaux documents cette semaine">( + '.$ligne->ps_doc_derniere_semaine.')</span>';
|
371 |
$document .= ' <span title="Nouveaux documents cette semaine">( + '.$ligne->ps_doc_derniere_semaine.')</span>';
|
| 367 |
}
|
372 |
}
|
| 368 |
} else {
|
373 |
} else {
|
| 369 |
$document = '-' ;
|
374 |
$document = '-' ;
|
| 370 |
}
|
375 |
}
|
| 371 |
$tableau_donnees[$ligne->p_id]['document'] = $document;
|
376 |
$tableau_donnees[$ligne->p_id]['document'] = $document;
|
| 372 |
|
377 |
|
| 373 |
if ($ligne->p_wikini) {
|
378 |
if ($ligne->p_wikini) {
|
| 374 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
379 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
| 375 |
$link=$this->_url->getURL();
|
380 |
$link=$this->_url->getURL();
|
| 376 |
$this->_url->addQueryString('wiki', 'DerniersChangementsRSS/xml');
|
381 |
$this->_url->addQueryString('wiki', 'DerniersChangementsRSS/xml');
|
| 377 |
$wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
|
382 |
$wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
|
| 378 |
$this->_url->removeQueryString ('act');
|
383 |
$this->_url->removeQueryString ('act');
|
| 379 |
$this->_url->removeQueryString ('wiki');
|
384 |
$this->_url->removeQueryString ('wiki');
|
| 380 |
} else {
|
385 |
} else {
|
| 381 |
$wiki_rss = '-' ;
|
386 |
$wiki_rss = '-' ;
|
| 382 |
}
|
387 |
}
|
| 383 |
$tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
|
388 |
$tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
|
| 384 |
|
389 |
|
| 385 |
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
|
390 |
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
|
| 386 |
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
391 |
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
| 387 |
$tableau_donnees[$ligne->p_id]['lien_participants'] = $this->_url->getURL();
|
392 |
$tableau_donnees[$ligne->p_id]['lien_participants'] = $this->_url->getURL();
|
| 388 |
if ($ligne->ps_nombre_inscrit_derniere_semaine != 0) {
|
393 |
if ($ligne->ps_nombre_inscrit_derniere_semaine != 0) {
|
| 389 |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '<span title="Nouveaux inscrits cette semaine">( + '.$ligne->ps_nombre_inscrit_derniere_semaine.' )</span>';
|
394 |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '<span title="Nouveaux inscrits cette semaine">( + '.$ligne->ps_nombre_inscrit_derniere_semaine.' )</span>';
|
| 390 |
} else {
|
395 |
} else {
|
| 391 |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '';
|
396 |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '';
|
| 392 |
}
|
397 |
}
|
| 393 |
|
398 |
|
| 394 |
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
|
399 |
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
|
| 395 |
$wiki_res, $wiki_rss,$document, $participant) ;
|
400 |
$wiki_res, $wiki_rss,$document, $participant);
|
| 396 |
|
401 |
|
| 397 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
|
402 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
|
| 398 |
array_push ($liste_projet, $ligne_projet) ;
|
403 |
array_push ($liste_projet, $ligne_projet) ;
|
| 399 |
|
404 |
|
| 400 |
if ($loggue) {
|
405 |
if ($loggue) {
|
| 401 |
switch ($ligne->psu_id_statut) {
|
406 |
switch ($ligne->psu_id_statut) {
|
| 402 |
case 1 : $icone_statut = 'etoile_rouge';
|
407 |
case 1 : $icone_statut = 'etoile_rouge';
|
| 403 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 3;
|
408 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 3;
|
| 404 |
break;
|
409 |
break;
|
| - |
|
410 |
case 2 : $icone_statut = 'etoile_verte';
|
| 405 |
case 2 : $icone_statut = 'etoile_verte';
|
411 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
|
| 406 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
|
412 |
break;
|
| 407 |
break;
|
413 |
case 3 : $icone_statut = 'etoile_grise';
|
| 408 |
case 3 : $icone_statut = 'etoile_grise';
|
414 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
|
| - |
|
415 |
break;
|
| 409 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
|
416 |
default :
|
| - |
|
417 |
$tableau_donnees[$ligne->p_id]['statut_icone'] = '';
|
| 410 |
break;
|
418 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0;
|
| 411 |
default : $tableau_donnees[$ligne->p_id]['statut_icone'] = '';
|
419 |
$icone_statut = false;
|
| 412 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0;
|
420 |
}
|
| 413 |
$icone_statut = false;
|
421 |
if ($icone_statut) {
|
| 414 |
}
|
422 |
$tableau_donnees[$ligne->p_id]['statut_icone'] = '<img src="'.PROJET_CHEMIN_ICONES.$icone_statut.'.png" alt="'.$ligne->ps_statut_nom.'" title="'.$ligne->ps_statut_nom.'" />';
|
| 415 |
if ($icone_statut) $tableau_donnees[$ligne->p_id]['statut_icone'] = '<img src="'.PROJET_CHEMIN_ICONES.$icone_statut.'.png" alt="'.$ligne->ps_statut_nom.'" title="'.$ligne->ps_statut_nom.'" />';
|
423 |
}
|
| 416 |
|
424 |
|
| Line 417... |
Line 425... |
| 417 |
}
|
425 |
}
|
| 418 |
$res .= '</li>'."\n";
|
426 |
$res .= '</li>'."\n";
|
| 419 |
}
|
427 |
}
|
| 420 |
$res .= '</ul>'."\n";
|
428 |
$res .= '</ul>'."\n";
|
| 421 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
|
429 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
|
| 422 |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
|
430 |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
|
| - |
|
431 |
|
| - |
|
432 |
// Correction bug tri par participant
|
| - |
|
433 |
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') {
|
| - |
|
434 |
foreach ($tableau_donnees as $key => $row) {
|
| 423 |
|
435 |
$nombre_inscrit[$key] = $row['nombre_participants'];
|
| 424 |
// Correction bug tri par participant
|
436 |
}
|
| Line 425... |
Line 437... |
| 425 |
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') {
|
437 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
|
| 426 |
foreach ($tableau_donnees as $key => $row) {
|
438 |
$flag = SORT_ASC ;
|
| 427 |
$nombre_inscrit[$key] = $row['nombre_participants'];
|
439 |
} else {
|
| 428 |
}
|
440 |
$flag = SORT_DESC ;
|
| 429 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ;
|
441 |
}
|
| 430 |
array_multisort($nombre_inscrit, $flag, $tableau_donnees);
|
442 |
array_multisort($nombre_inscrit, $flag, $tableau_donnees);
|
| - |
|
443 |
}
|
| - |
|
444 |
|
| - |
|
445 |
// Correction bug tri sur les statuts
|
| - |
|
446 |
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') {
|
| 431 |
}
|
447 |
foreach ($tableau_donnees as $key => $row) {
|
| 432 |
|
448 |
$id_statut[$key] = $row['id_statut'];
|
| Line 433... |
Line 449... |
| 433 |
// Correction bug tri sur les statuts
|
449 |
}
|
| Line 434... |
Line 450... |
| 434 |
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') {
|
450 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
|
| 435 |
foreach ($tableau_donnees as $key => $row) {
|
451 |
$flag = SORT_ASC ;
|
| 436 |
$id_statut[$key] = $row['id_statut'];
|
452 |
} else {
|
| 437 |
}
|
453 |
$flag = SORT_DESC ;
|
| 438 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ;
|
454 |
}
|
| 439 |
array_multisort($id_statut, $flag, $tableau_donnees);
|
455 |
array_multisort($id_statut, $flag, $tableau_donnees);
|
| 440 |
}
|
456 |
}
|
| 441 |
|
457 |
|
| 442 |
$pair = true;
|
458 |
$pair = true;
|
| 443 |
|
459 |
|
| 444 |
ob_start();
|
460 |
ob_start();
|
| 445 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') {
|
- |
|
| 446 |
GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js');
|
461 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') {
|
| Line 447... |
Line 462... |
| 447 |
GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js');
|
462 |
GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js');
|
| 448 |
GEN_stockerCodeScript('animatedcollapse.addDiv(\'legende\', \'fade=1, height="100px"\');' ."\n".
|
463 |
GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js');
|
| 449 |
'animatedcollapse.init();' ."\n");
|
464 |
GEN_stockerCodeScript('animatedcollapse.addDiv(\'legende\', \'fade=1, height="100px"\');' ."\n".
|
| Line 467... |
Line 482... |
| 467 |
$res = ob_get_contents();
|
482 |
$res = ob_get_contents();
|
| 468 |
ob_end_clean();
|
483 |
ob_end_clean();
|
| Line 469... |
Line 484... |
| 469 |
|
484 |
|
| 470 |
|
485 |
|
| 471 |
// Nettoyage de l'url
|
486 |
// Nettoyage de l'url
|
| 472 |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
|
487 |
$this->_url->removeQueryString(PROJET_VARIABLE_ID_PROJET);
|
| 473 |
$this->_url->removeQueryString (PROJET_VARIABLE_MODE_AFFICHAGE);
|
488 |
$this->_url->removeQueryString(PROJET_VARIABLE_MODE_AFFICHAGE);
|
| 474 |
$this->_url->removeQueryString (PROJET_VARIABLE_ORDRE_TRI);
|
489 |
$this->_url->removeQueryString(PROJET_VARIABLE_ORDRE_TRI);
|
| Line 475... |
Line 490... |
| 475 |
$this->_url->removeQueryString (PROJET_VARIABLE_TRI);
|
490 |
$this->_url->removeQueryString(PROJET_VARIABLE_TRI);
|
| 476 |
return $res ;
|
491 |
return $res;
|
| 477 |
|
492 |
|
| 478 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
493 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|