Subversion Repositories Applications.projet

Compare Revisions

Ignore whitespace Rev 426 → Rev 427

/trunk/squelettes/mes_projets.tpl.html
1,23 → 1,29
<h1>Liste des projets et forums de Tela Botanica</h1>
<div id="projet_choix_mode"><?= $lien_interface_simple; ?>&nbsp;&nbsp;<?= $lien_interface_expert; ?></div>
 
<p class="importance4">
Les projets en dormance sont affichés seulement sur l'interface <em>"expert"</em>.
Si vous souhaitez visualiser tous les projets auxquels vous ĂȘtes inscrit, passez en mode <em>"expert"</em>.
<span id="projet_choix_mode"><?= $lien_interface_simple; ?>&nbsp;&nbsp;<?= $lien_interface_expert; ?></span>
</p>
<div id="cartouche_liste_projet">
<div id="projet_range">Projets <span class="nombre"><?= $range[0]; ?></span> &agrave; <span class="nombre"><?= $range[1]; ?></span> sur <span class="nombre"><?= $nombre_projets; ?></span></div>
 
<div id="projet_range">
Projets <span class="nombre"><?= $range[0]; ?></span>
&agrave; <span class="nombre"><?= $range[1]; ?></span>
sur <span class="nombre"><?= $nombre_projets; ?></span>
</div>
</div>
 
<div class="pager"><?= $links['all']; ?></div>
<ul class="liste_projet">
<?php foreach ($tableau_donnees as $projet) : ?>
<li>
<h3><a href="<?= $projet['lien'] ;?>"><?= $projet['titre']; ?></a></h3>
<h4>(<?= $projet['nombre_participants']; ?> participants) <span class="<?= $projet['classe_projet_activite']; ?>">(<?= $projet['activite']; ?>)</span></h4>
<?= $projet['resume']; ?>
<?= $projet['forum'] ; ?>
<?php if ($projet['nombre_message']) : ?>
( + <span class="nombre_message"><?php echo $projet['nombre_message']; ?> nouveaux messages</span> )
<?php endif; ?>
</li>
<?php endforeach ; ?>
<?php foreach ($tableau_donnees as $projet) : ?>
<li>
<h3><a href="<?= $projet['lien'] ;?>"><?= $projet['titre']; ?></a></h3>
<h4>(<?= $projet['nombre_participants']; ?> participants) <span class="<?= $projet['classe_projet_activite']; ?>">(<?= $projet['activite']; ?>)</span></h4>
<?= $projet['resume']; ?>
<?= $projet['forum'] ; ?>
<?php if ($projet['nombre_message']) : ?>
( + <span class="nombre_message"><?php echo $projet['nombre_message']; ?> nouveaux messages</span> )
<?php endif; ?>
</li>
<?php endforeach ; ?>
</ul>
<div class="pager"><?= $links['all']; ?></div>
/trunk/presentation/mes_projets.php
1,5 → 1,5
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
65,7 → 65,7
 
if (isset($_GET[PROJET_VARIABLE_TRI]) && $_GET[PROJET_VARIABLE_TRI] != '' && in_array($_GET[PROJET_VARIABLE_TRI], $valeur_acceptable_tri)) {
$tri = $_GET[PROJET_VARIABLE_TRI];
 
} else {
$tri = 'p_titre';
}
72,10 → 72,10
 
$valeur_acceptable_ordre_tri = array ('asc', 'desc'); // securite
 
if (isset($_GET[PROJET_VARIABLE_ORDRE_TRI]) && $_GET[PROJET_VARIABLE_ORDRE_TRI] != ''
if (isset($_GET[PROJET_VARIABLE_ORDRE_TRI]) && $_GET[PROJET_VARIABLE_ORDRE_TRI] != ''
&& in_array ($_GET[PROJET_VARIABLE_ORDRE_TRI], $valeur_acceptable_ordre_tri)) {
$ordre_tri = $_GET[PROJET_VARIABLE_ORDRE_TRI];
 
} else {
$ordre_tri = '';
}
82,7 → 82,7
 
// variable de session pour se rappeler des choix du visiteur
if (!isset ($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && isset($_SESSION['_PROJET_']['projet_affichage']) && ($_SESSION['_PROJET_']['projet_affichage'] == 'simple' || $_SESSION['_PROJET_']['projet_affichage'] == 'expert')) {
$_GET[PROJET_VARIABLE_MODE_AFFICHAGE] = $_SESSION['_PROJET_']['projet_affichage'];
$_GET[PROJET_VARIABLE_MODE_AFFICHAGE] = $_SESSION['_PROJET_']['projet_affichage'];
}
 
if (isset($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && $_GET[PROJET_VARIABLE_MODE_AFFICHAGE] != '') {
160,12 → 160,12
$_SESSION['_PROJET_']['motif_recherche'] = $_GET['projet_recherche'];
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche.class.php';
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche_projet.class.php';
 
$moteur = new More_Recherche($_SESSION['_PROJET_']['motif_recherche']);
$recherche_projet = new More_Recherche_Projet($_SESSION['_PROJET_']['motif_recherche']);
$moteur->ajouterRecherche($recherche_projet);
$resultats = $moteur->rechercherMotif();
 
// $chaine_id_projet contient une liste d identifiant separer par une virgule
if (!empty($resultats)) {
$chaine_id_projet = '';
174,7 → 174,7
}
$chaine_id_projet = substr($chaine_id_projet, 0, -1);
$where_recherche = ' where p_id in ('.$chaine_id_projet.')';
 
$valeur_projet_recherche = $_GET['projet_recherche'];
}
} else {
198,27 → 198,33
$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\'&ecirc;tes inscrit &agrave; aucun projet</p>';
foreach ($tableau_projet as $projet) $chaine_id_projet .= $projet[3].',';
if (count ($tableau_projet) == 0) {
return '<p class="information">Vous n\'&ecirc;tes inscrit &agrave; 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.')';
 
$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)).
' left join projet_statut on psu_id_statut=ps_id_statut';
$select = 'psu_id_statut, ps_statut_nom,';
}
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'.
' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
' ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
' projet left join projet_lien_liste on p_id=pl_id_projet'.
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
$from_recherche.
$where_recherche.
' group by p_id order by '.$tri.' '.$ordre_tri ;
' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
' ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
' projet left join projet_lien_liste on p_id=pl_id_projet'.
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
$from_recherche.
$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)) {
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
229,7 → 235,7
/* Si l utilisateur est loggue, on recherche son statut par rapport aux projets */
if ($this->_auth->getAuth()) {
$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'.
' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID));
' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID));
$resultat_statut = $GLOBALS['projet_db']->query($requete_statut);
while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) {
$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut;
240,18 → 246,21
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) {
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1 && $theme_selectionne != 9) {
 
} else {
$donnees[] = $ligne;
}
 
}
 
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',
264,8 → 273,8
'separator' => '',
'prevImg' => '&lt;&lt; Page pr&eacute;c&eacute;dente',
'nextImg' => 'Page suivante &gt;&gt;',
'extraVars' => array ('projet_recherche' => $_SESSION['_PROJET_']['motif_recherche'],
PROJET_VARIABLE_MODE_AFFICHAGE => $_SESSION['_PROJET_']['projet_affichage']),
'extraVars' => array ('projet_recherche' => $_SESSION['_PROJET_']['motif_recherche'],
PROJET_VARIABLE_MODE_AFFICHAGE => $_SESSION['_PROJET_']['projet_affichage']),
'itemData' => $donnees
);
$pager = & Pager::factory($params);
272,9 → 281,8
$links = $pager->getLinks();
$data = $pager->getPageData();
$nombre_projets = $pager->numItems();
$range = $pager->getOffsetByPageId();
$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' ;
289,48 → 297,46
 
$tableau_donnees = array();
foreach ($data as $ligne) {
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
 
$tableau_donnees[$ligne->p_id]['lien'] = $this->_url->getURL();
$tableau_donnees[$ligne->p_id]['titre'] = $ligne->p_titre;
$tableau_donnees[$ligne->p_id]['lien'] = $this->_url->getURL();
$tableau_donnees[$ligne->p_id]['titre'] = $ligne->p_titre;
 
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_inscrit;
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_inscrit;
 
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
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) {
$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) {
$tableau_donnees[$ligne->p_id]['activite'] = 'Tr&egrave;s actif';
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee';
}
} else {
$tableau_donnees[$ligne->p_id]['activite'] = $ligne->ps_pourcent.'%';
}
$res .= $ligne->p_resume ;
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
$res .= '(<a href="'.$this->_url->getURL().'">Rejoindre ce projet</a>)'."\n";
// Recherche du forum
if ($ligne->pl_id_liste != null && $ligne->plle_id_liste == null) {
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume;
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') {
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) {
$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) {
$tableau_donnees[$ligne->p_id]['activite'] = 'Tr&egrave;s actif';
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee';
}
} else {
$tableau_donnees[$ligne->p_id]['activite'] = $ligne->ps_pourcent.'%';
}
$res .= $ligne->p_resume ;
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
$res .= '(<a href="'.$this->_url->getURL().'">Rejoindre ce projet</a>)'."\n";
 
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /></a>'."\n";
// Recherche du forum
if ($ligne->pl_id_liste != null && $ligne->plle_id_liste == null) {
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
 
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /></a>'."\n";
$res .= $forum;
} else {
 
} else {
 
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
$listes_ext = new liste_externe ($this->_db) ;
if ($ligne->plle_id_liste != null) {
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
 
$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
'"><img src="sites/commun/generique/images/icones/yahoo.png" alt="Yahoo"/></a>';
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_membre_yahoo;
337,96 → 343,102
} else {
$forum = '-';
}
}
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;
}
$tableau_donnees[$ligne->p_id]['forum'] = $forum;
if ($ligne->p_wikini) {
}
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;
}
$tableau_donnees[$ligne->p_id]['forum'] = $forum;
if ($ligne->p_wikini) {
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
$link=$this->_url->getURL();
$wiki_res = '<a href="'.$link.'">voir</a>' ;
$wiki_res = '<a href="'.$link.'">voir</a>' ;
if ($ligne->ps_modifwiki_derniere_semaine != 0) {
$wiki_res .= ' <span title="Nouvelles contributions cette semaine"> ( +'.$ligne->ps_modifwiki_derniere_semaine.' )</span>';
}
$this->_url->removeQueryString ('act');
$this->_url->removeQueryString ('act');
} else {
$wiki_res = '-' ;
$wiki_res = '-' ;
}
$tableau_donnees[$ligne->p_id]['wikini'] = $wiki_res;
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
if ($ligne->p_avoir_document != 0) {
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
if ($ligne->ps_doc_derniere_semaine != 0) {
$document .= ' <span title="Nouveaux documents cette semaine">( + '.$ligne->ps_doc_derniere_semaine.')</span>';
}
} else {
$document = '-' ;
}
$tableau_donnees[$ligne->p_id]['document'] = $document;
if ($ligne->p_wikini) {
$titre = '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
 
if ($ligne->p_avoir_document != 0) {
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
if ($ligne->ps_doc_derniere_semaine != 0) {
$document .= ' <span title="Nouveaux documents cette semaine">( + '.$ligne->ps_doc_derniere_semaine.')</span>';
}
} else {
$document = '-' ;
}
$tableau_donnees[$ligne->p_id]['document'] = $document;
 
if ($ligne->p_wikini) {
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
$link=$this->_url->getURL();
$this->_url->addQueryString('wiki', 'DerniersChangementsRSS/xml');
$wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
$this->_url->removeQueryString ('act');
$this->_url->removeQueryString ('wiki');
$wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
$this->_url->removeQueryString ('act');
$this->_url->removeQueryString ('wiki');
} else {
$wiki_rss = '-' ;
$wiki_rss = '-' ;
}
$tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
$tableau_donnees[$ligne->p_id]['lien_participants'] = $this->_url->getURL();
if ($ligne->ps_nombre_inscrit_derniere_semaine != 0) {
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '<span title="Nouveaux inscrits cette semaine">( + '.$ligne->ps_nombre_inscrit_derniere_semaine.' )</span>';
} else {
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '';
}
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
$wiki_res, $wiki_rss,$document, $participant) ;
$tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
 
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
array_push ($liste_projet, $ligne_projet) ;
if ($loggue) {
switch ($ligne->psu_id_statut) {
case 1 : $icone_statut = 'etoile_rouge';
$tableau_donnees[$ligne->p_id]['id_statut'] = 3;
break;
case 2 : $icone_statut = 'etoile_verte';
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
break;
case 3 : $icone_statut = 'etoile_grise';
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
break;
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.'" />';
}
$res .= '</li>'."\n";
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
$tableau_donnees[$ligne->p_id]['lien_participants'] = $this->_url->getURL();
if ($ligne->ps_nombre_inscrit_derniere_semaine != 0) {
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '<span title="Nouveaux inscrits cette semaine">( + '.$ligne->ps_nombre_inscrit_derniere_semaine.' )</span>';
} else {
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '';
}
 
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
$wiki_res, $wiki_rss,$document, $participant);
 
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
array_push ($liste_projet, $ligne_projet) ;
 
if ($loggue) {
switch ($ligne->psu_id_statut) {
case 1 : $icone_statut = 'etoile_rouge';
$tableau_donnees[$ligne->p_id]['id_statut'] = 3;
break;
case 2 : $icone_statut = 'etoile_verte';
$tableau_donnees[$ligne->p_id]['id_statut'] = 2;
break;
case 3 : $icone_statut = 'etoile_grise';
$tableau_donnees[$ligne->p_id]['id_statut'] = 1;
break;
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.'" />';
}
 
}
$res .= '</li>'."\n";
}
$res .= '</ul>'."\n";
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
 
// Correction bug tri par participant
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') {
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 ;
$nombre_inscrit[$key] = $row['nombre_participants'];
}
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
$flag = SORT_ASC ;
} else {
$flag = SORT_DESC ;
}
array_multisort($nombre_inscrit, $flag, $tableau_donnees);
}
 
433,9 → 445,13
// Correction bug tri sur les statuts
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') {
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 ;
$id_statut[$key] = $row['id_statut'];
}
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') {
$flag = SORT_ASC ;
} else {
$flag = SORT_DESC ;
}
array_multisort($id_statut, $flag, $tableau_donnees);
}
 
446,13 → 462,12
GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js');
GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js');
GEN_stockerCodeScript('animatedcollapse.addDiv(\'legende\', \'fade=1, height="100px"\');' ."\n".
'animatedcollapse.init();' ."\n");
'animatedcollapse.init();' ."\n");
include_once PROJET_CHEMIN_CLASSES.'enteteColonneTriable.class.php';
foreach ($valeur_acceptable_tri as $var_tri) {
$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);
469,11 → 484,11
 
 
// Nettoyage de l'url
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
$this->_url->removeQueryString (PROJET_VARIABLE_MODE_AFFICHAGE);
$this->_url->removeQueryString (PROJET_VARIABLE_ORDRE_TRI);
$this->_url->removeQueryString (PROJET_VARIABLE_TRI);
return $res ;
$this->_url->removeQueryString(PROJET_VARIABLE_ID_PROJET);
$this->_url->removeQueryString(PROJET_VARIABLE_MODE_AFFICHAGE);
$this->_url->removeQueryString(PROJET_VARIABLE_ORDRE_TRI);
$this->_url->removeQueryString(PROJET_VARIABLE_TRI);
return $res;
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*