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.')';
|
Line 205... |
Line 209... |
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)).
|
Line 215... |
Line 219... |
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 ;
|
Line 219... |
Line 223... |
219 |
|
223 |
|
- |
|
224 |
if ($ordre_tri == '') {
|
- |
|
225 |
$ordre_tri = 'desc';
|
Line 220... |
Line 226... |
220 |
if ($ordre_tri == '') $ordre_tri = 'desc';
|
226 |
}
|
221 |
|
227 |
|
222 |
$resultat = $this->_db->query($requete) ;
|
228 |
$resultat = $this->_db->query($requete) ;
|
223 |
if (DB::isError($resultat)) {
|
229 |
if (DB::isError($resultat)) {
|
Line 238... |
Line 244... |
238 |
}
|
244 |
}
|
Line 239... |
Line 245... |
239 |
|
245 |
|
Line 240... |
Line 246... |
240 |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php';
|
246 |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php';
|
241 |
|
- |
|
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
|
Line 245... |
Line 250... |
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 {
|
Line 249... |
Line 254... |
249 |
$donnees[] = $ligne;
|
254 |
$donnees[] = $ligne;
|
- |
|
255 |
}
|
- |
|
256 |
|
- |
|
257 |
}
|
- |
|
258 |
|
250 |
}
|
259 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') {
|
251 |
|
260 |
$perpage = $nombre_resultat;
|
252 |
}
|
261 |
} else {
|
253 |
|
262 |
$perpage = 20;
|
254 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') $perpage = $nombre_resultat; else $perpage = 20;
|
263 |
}
|
Line 272... |
Line 281... |
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();
|
Line 276... |
Line -... |
276 |
|
- |
|
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 299... |
Line 307... |
299 |
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
|
307 |
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
|
300 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
|
308 |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
|
301 |
if ($ligne->ps_pourcent <33) {
|
309 |
if ($ligne->ps_pourcent < 33) {
|
302 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif';
|
310 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif';
|
303 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible';
|
311 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible';
|
304 |
}
|
- |
|
305 |
else if ($ligne->ps_pourcent < 66) {
|
312 |
} else if ($ligne->ps_pourcent < 66) {
|
306 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif';
|
313 |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif';
|
307 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne';
|
314 |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne';
|
308 |
}
|
- |
|
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.'%';
|
Line 337... |
Line 343... |
337 |
} else {
|
343 |
} else {
|
338 |
$forum = '-';
|
344 |
$forum = '-';
|
339 |
}
|
345 |
}
|
340 |
}
|
346 |
}
|
341 |
if ($ligne->ps_msg_derniere_semaine != 0) {
|
347 |
if ($ligne->ps_msg_derniere_semaine != 0) {
|
342 |
|
- |
|
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;
|
Line 406... |
Line 411... |
406 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
|
411 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
|
407 |
break;
|
412 |
break;
|
408 |
case 3 : $icone_statut = 'etoile_grise';
|
413 |
case 3 : $icone_statut = 'etoile_grise';
|
409 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
|
414 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
|
410 |
break;
|
415 |
break;
|
- |
|
416 |
default :
|
411 |
default : $tableau_donnees[$ligne->p_id]['statut_icone'] = '';
|
417 |
$tableau_donnees[$ligne->p_id]['statut_icone'] = '';
|
412 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0;
|
418 |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0;
|
413 |
$icone_statut = false;
|
419 |
$icone_statut = false;
|
414 |
}
|
420 |
}
|
- |
|
421 |
if ($icone_statut) {
|
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.'" />';
|
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.'" />';
|
- |
|
423 |
}
|
Line 416... |
Line 424... |
416 |
|
424 |
|
417 |
}
|
425 |
}
|
418 |
$res .= '</li>'."\n";
|
426 |
$res .= '</li>'."\n";
|
419 |
}
|
427 |
}
|
Line 424... |
Line 432... |
424 |
// Correction bug tri par participant
|
432 |
// Correction bug tri par participant
|
425 |
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') {
|
433 |
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') {
|
426 |
foreach ($tableau_donnees as $key => $row) {
|
434 |
foreach ($tableau_donnees as $key => $row) {
|
427 |
$nombre_inscrit[$key] = $row['nombre_participants'];
|
435 |
$nombre_inscrit[$key] = $row['nombre_participants'];
|
428 |
}
|
436 |
}
|
429 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ;
|
437 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
|
- |
|
438 |
$flag = SORT_ASC ;
|
- |
|
439 |
} else {
|
- |
|
440 |
$flag = SORT_DESC ;
|
- |
|
441 |
}
|
430 |
array_multisort($nombre_inscrit, $flag, $tableau_donnees);
|
442 |
array_multisort($nombre_inscrit, $flag, $tableau_donnees);
|
431 |
}
|
443 |
}
|
Line 432... |
Line 444... |
432 |
|
444 |
|
433 |
// Correction bug tri sur les statuts
|
445 |
// Correction bug tri sur les statuts
|
434 |
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') {
|
446 |
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') {
|
435 |
foreach ($tableau_donnees as $key => $row) {
|
447 |
foreach ($tableau_donnees as $key => $row) {
|
436 |
$id_statut[$key] = $row['id_statut'];
|
448 |
$id_statut[$key] = $row['id_statut'];
|
437 |
}
|
449 |
}
|
- |
|
450 |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
|
- |
|
451 |
$flag = SORT_ASC ;
|
- |
|
452 |
} else {
|
- |
|
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);
|
Line 440... |
Line 456... |
440 |
}
|
456 |
}
|
Line 450... |
Line 466... |
450 |
include_once PROJET_CHEMIN_CLASSES.'enteteColonneTriable.class.php';
|
466 |
include_once PROJET_CHEMIN_CLASSES.'enteteColonneTriable.class.php';
|
451 |
foreach ($valeur_acceptable_tri as $var_tri) {
|
467 |
foreach ($valeur_acceptable_tri as $var_tri) {
|
452 |
$enteteTri[$var_tri] = new enteteColonneTriable($var_tri);
|
468 |
$enteteTri[$var_tri] = new enteteColonneTriable($var_tri);
|
453 |
$enteteTri[$var_tri]->setColonneCliquee($tri, PROJET_VARIABLE_TRI);
|
469 |
$enteteTri[$var_tri]->setColonneCliquee($tri, PROJET_VARIABLE_TRI);
|
454 |
$enteteTri[$var_tri]->setOrdre($ordre_tri, PROJET_VARIABLE_ORDRE_TRI);
|
470 |
$enteteTri[$var_tri]->setOrdre($ordre_tri, PROJET_VARIABLE_ORDRE_TRI);
|
455 |
|
- |
|
456 |
}
|
471 |
}
|
Line 457... |
Line 472... |
457 |
|
472 |
|
458 |
$lien_tri_titre = $enteteTri['p_titre']->getLien($this->_url);
|
473 |
$lien_tri_titre = $enteteTri['p_titre']->getLien($this->_url);
|
459 |
$lien_tri_activite = $enteteTri['ps_pourcent']->getLien($this->_url);
|
474 |
$lien_tri_activite = $enteteTri['ps_pourcent']->getLien($this->_url);
|