198,8 → 198,12 |
$participant = new participe ($this->_db); |
$tableau_projet = $participant->getInformationsUtilisateurs($this->_auth->getAuthData(PROJET_CHAMPS_ID)); |
$chaine_id_projet = ''; |
if (count ($tableau_projet) == 0) return '<p class="information">Vous n\'êtes inscrit à aucun projet</p>'; |
foreach ($tableau_projet as $projet) $chaine_id_projet .= $projet[3].','; |
if (count ($tableau_projet) == 0) { |
return '<p class="information">Vous n\'êtes inscrit à aucun projet</p>'; |
} |
foreach ($tableau_projet as $projet) { |
$chaine_id_projet .= $projet[3].','; |
} |
$chaine_id_projet = substr($chaine_id_projet, 0, -1); |
$where_recherche .= ' where p_id in ('.$chaine_id_projet.')'; |
|
217,7 → 221,9 |
$where_recherche. |
' group by p_id order by '.$tri.' '.$ordre_tri ; |
|
if ($ordre_tri == '') $ordre_tri = 'desc'; |
if ($ordre_tri == '') { |
$ordre_tri = 'desc'; |
} |
|
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) { |
240,7 → 246,6 |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php'; |
|
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
|
// Si le projet est en dormance, on ne l affiche pas dans le mode normal |
// Sauf si le theme choisit est "en dormance" |
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1 && $theme_selectionne != 9) { |
251,7 → 256,11 |
|
} |
|
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') $perpage = $nombre_resultat; else $perpage = 20; |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') { |
$perpage = $nombre_resultat; |
} else { |
$perpage = 20; |
} |
// Parametre du pager |
$params = array ( |
'mode' => 'Sliding', |
274,7 → 283,6 |
$nombre_projets = $pager->numItems(); |
$range = $pager->getOffsetByPageId(); |
|
|
// On inclue un fichier local |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php')) |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ; |
301,12 → 309,10 |
if ($ligne->ps_pourcent <33) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible'; |
} |
else if ($ligne->ps_pourcent < 66) { |
} else if ($ligne->ps_pourcent < 66) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne'; |
} |
else if ($ligne->ps_pourcent <= 100) { |
} else if ($ligne->ps_pourcent <= 100) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Très actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee'; |
} |
339,7 → 345,6 |
} |
} |
if ($ligne->ps_msg_derniere_semaine != 0) { |
|
$tableau_donnees[$ligne->p_id]['nombre_message'] = $ligne->ps_msg_derniere_semaine; |
} else { |
$tableau_donnees[$ligne->p_id]['nombre_message'] = 0; |
408,11 → 413,14 |
case 3 : $icone_statut = 'etoile_grise'; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1; |
break; |
default : $tableau_donnees[$ligne->p_id]['statut_icone'] = ''; |
default : |
$tableau_donnees[$ligne->p_id]['statut_icone'] = ''; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0; |
$icone_statut = false; |
} |
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.'" />'; |
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.'" />'; |
} |
|
} |
$res .= '</li>'."\n"; |
426,7 → 434,11 |
foreach ($tableau_donnees as $key => $row) { |
$nombre_inscrit[$key] = $row['nombre_participants']; |
} |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ; |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') { |
$flag = SORT_ASC ; |
} else { |
$flag = SORT_DESC ; |
} |
array_multisort($nombre_inscrit, $flag, $tableau_donnees); |
} |
|
435,7 → 447,11 |
foreach ($tableau_donnees as $key => $row) { |
$id_statut[$key] = $row['id_statut']; |
} |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ; |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') { |
$flag = SORT_ASC ; |
} else { |
$flag = SORT_DESC ; |
} |
array_multisort($id_statut, $flag, $tableau_donnees); |
} |
|
452,7 → 468,6 |
$enteteTri[$var_tri] = new enteteColonneTriable($var_tri); |
$enteteTri[$var_tri]->setColonneCliquee($tri, PROJET_VARIABLE_TRI); |
$enteteTri[$var_tri]->setOrdre($ordre_tri, PROJET_VARIABLE_ORDRE_TRI); |
|
} |
|
$lien_tri_titre = $enteteTri['p_titre']->getLien($this->_url); |