Subversion Repositories Applications.projet

Rev

Rev 155 | Rev 240 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 155 Rev 208
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: liste.php,v 1.5 2006-12-19 09:48:50 alexandre_tb Exp $
22
// CVS : $Id: liste.php,v 1.6 2007-04-19 15:34:35 neiluj Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Fichier de présentation de la liste des projets
26
* Fichier de présentation de la liste des projets
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.5 $
34
*@version       $Revision: 1.6 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line 40...
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line -... Line 41...
-
 
41
 
-
 
42
$titre = '<h1>'.PROJET_LISTE.'</h1>'."\n" ;
-
 
43
 
-
 
44
if (PROJET_UTILISE_TYPE && $this->_type != '') {
-
 
45
    $projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
-
 
46
} else {
-
 
47
    // Un tableau de tous les projets dans $projetListe
41
 
48
    $projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ;
42
$titre = '<h1>'.PROJET_LISTE.'</h1>'."\n" ;
49
}
43
 
50
      
44
// On inclue un fichier local
51
// On inclue un fichier local
45
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php'))
52
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php'))
Line 58... Line 65...
58
	$tpl -> setTemplate($chaine);
65
	$tpl -> setTemplate($chaine);
Line 59... Line 66...
59
	
66
	
Line 60... Line 67...
60
}
67
}
61
 
-
 
-
 
68
 
62
if ($auth){
69
if ($auth){
63
 
70
	include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
64
    $utilisateur_liste = new inscription_liste($this->_db) ;
71
    $utilisateur_liste = new inscription_liste($this->_db) ;
65
    // On teste ici s'il y a une mise à jour de statut
72
    // On teste ici s'il y a une mise à jour de statut
66
    if (isset($_POST['statut'])) {
73
    if (isset($_POST['statut'])) {
Line 71... Line 78...
71
        $projet = new projet ($this->_db, $_GET['identifiant_projet']) ;
78
        $projet = new projet ($this->_db, $_GET['identifiant_projet']) ;
72
        $projet->getListesAssociees() ;
79
        $projet->getListesAssociees() ;
73
        $utilisateur_liste->modifierTypeInscription($projet->_listes_associes[0],$annuaire, $_POST['statut']) ;
80
        $utilisateur_liste->modifierTypeInscription($projet->_listes_associes[0],$annuaire, $_POST['statut']) ;
74
    }
81
    }
75
    if (count($participant->getIdProjetsStatuts($id_u))) {
82
    if (count($participant->getIdProjetsStatuts($id_u))) {
76
 
-
 
-
 
83
		include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
77
        $HTML_projetListe = new HTML_listeProjet(true) ;
84
        $HTML_projetListe = new HTML_listeProjet(true) ;
78
        $entete_liste = array($auth ? PROJET_VOUS_PARTICIPEZ : PROJET_LISTE) ;
85
        $entete_liste = array($auth ? PROJET_VOUS_PARTICIPEZ : PROJET_LISTE) ;
79
        if ($auth) array_push ($entete_liste, PROJET_SE_DESINSCRIRE, PROJET_LISTE_DE_DISCUSSION) ;
86
        if ($auth) array_push ($entete_liste, PROJET_SE_DESINSCRIRE, PROJET_LISTE_DE_DISCUSSION) ;
Line 80... Line 87...
80
 
87
 
Line 81... Line 88...
81
 
88
 
Line 82... Line 89...
82
        $tableau_resultat = array () ;
89
        $tableau_resultat = array () ;
-
 
90
 
83
 
91
        $HTML_projetListe->construitEntete ($entete_liste) ;
84
        $HTML_projetListe->construitEntete ($entete_liste) ;
92
 
Line 85... Line 93...
85
 
93
        // On construit $tableau_resultat avec une ligne par projet contenant un tableau (titre, statut_nom, id_statut, id_projet)
86
        // On construit $tableau_resultat avec une ligne par projet contenant un tableau (titre, statut_nom, id_statut, id_projet)
94
        include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
Line 182... Line 190...
182
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
190
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
183
    $HTML_projetNonParticipantListe->construitListe($liste_projet) ;
191
    $HTML_projetNonParticipantListe->construitListe($liste_projet) ;
184
    if ($HTML_projetNonParticipantListe->getRowCount() > 1) $res .= $HTML_projetNonParticipantListe->toHTML() ;
192
    if ($HTML_projetNonParticipantListe->getRowCount() > 1) $res .= $HTML_projetNonParticipantListe->toHTML() ;
185
} else {
193
} else {
186
    $projetNonParticipantListe = & $projetListe ;
194
    $projetNonParticipantListe = & $projetListe ;
-
 
195
    include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
187
    $HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
196
    $HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
188
    $entete_liste = array (PROJET_LISTE) ;
197
    $entete_liste = array (PROJET_LISTE) ;
189
    $HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
198
    $HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
Line 190... Line 199...
190
 
199
 
Line 216... Line 225...
216
return $titre.$res ;
225
return $titre.$res ;
Line 217... Line 226...
217
 
226
 
218
/* +--Fin du code ----------------------------------------------------------------------------------------+
227
/* +--Fin du code ----------------------------------------------------------------------------------------+
219
*
228
*
-
 
229
* $Log: not supported by cvs2svn $
-
 
230
* Revision 1.5  2006/12/19 09:48:50  alexandre_tb
-
 
231
* amélioration du retour erreur lors de l appel au template
220
* $Log: not supported by cvs2svn $
232
*
221
* Revision 1.4  2006/12/18 17:24:09  alexandre_tb
233
* Revision 1.4  2006/12/18 17:24:09  alexandre_tb
222
* inclusion du fichier de langue en utilisant la globale 'lang'
234
* inclusion du fichier de langue en utilisant la globale 'lang'
223
*
235
*
224
* Revision 1.3  2006/09/18 09:56:28  alexandre_tb
236
* Revision 1.3  2006/09/18 09:56:28  alexandre_tb