Subversion Repositories Applications.papyrus

Rev

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

Rev 1135 Rev 1217
Line 18... Line 18...
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
// +------------------------------------------------------------------------------------------------------+
Line 22... Line 22...
22
 
22
 
Line 23... Line 23...
23
// CVS : $Id: projetControleur.class.php,v 1.29.2.1 2006-12-11 14:40:19 alexandre_tb Exp $
23
// CVS : $Id: projetControleur.class.php,v 1.29.2.2 2007-02-13 10:38:14 alexandre_tb Exp $
24
 
24
 
25
/**
25
/**
26
* Application projet
26
* Application projet
Line 31... Line 31...
31
//Auteur original :
31
//Auteur original :
32
*@author        Alexandre Granier <alexandre@tela-botanica.org>
32
*@author        Alexandre Granier <alexandre@tela-botanica.org>
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Aucun
34
*@author        Aucun
35
*@copyright     Tela-Botanica 2000-2004
35
*@copyright     Tela-Botanica 2000-2004
36
*@version       $Revision: 1.29.2.1 $
36
*@version       $Revision: 1.29.2.2 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 382... Line 382...
382
            $projetListe = projet::getTousLesProjets($this->_db) ;
382
            $projetListe = projet::getTousLesProjets($this->_db) ;
383
        }
383
        }
384
        // Si la liste est vide, on renvoie un texte
384
        // Si la liste est vide, on renvoie un texte
385
        if (count($projetListe) == 0) {
385
        if (count($projetListe) == 0) {
386
        	// On inclue un fichier local
386
        	// On inclue un fichier local
387
	        if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
387
	        if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php'))
388
	        	include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
388
	        	include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php' ;
389
        	return $res .= PROJET_PAS_DE_LISTE;
389
        	return $res .= PROJET_PAS_DE_PROJET;
390
        }
390
        }
391
        // Si certain projet sont à exclure, on les exclu
391
        // Si certain projet sont à exclure, on les exclu
392
        $projet_a_exclure = array() ;
392
        $projet_a_exclure = array() ;
393
        if (count($this->_projet_exclu)) {
393
        if (count($this->_projet_exclu)) {
394
        	arsort($this->_projet_exclu) ;
394
        	arsort($this->_projet_exclu) ;
Line 552... Line 552...
552
				$res .= '<li class="projet_niv1">'.PROJET_GESTION_PROJET ;
552
				$res .= '<li class="projet_niv1">'.PROJET_GESTION_PROJET ;
553
				$res .= '<ul id="projet_group_niv2_ges">' ;
553
				$res .= '<ul id="projet_group_niv2_ges">' ;
554
				// L'action modifier les propriétés du projet
554
				// L'action modifier les propriétés du projet
555
	            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_MODIFIER_DESCRIPTION) ;
555
	            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_MODIFIER_DESCRIPTION) ;
556
	            $res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_MODIFIER_PROPRIETES."</a></li>\n" ;
556
	            $res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_MODIFIER_PROPRIETES."</a></li>\n" ;
557
	            if ($isAdm) {
557
	            if ($isAdm || (PROJET_UTILISATEURS_COORD && $isCoord)) {
558
		            $this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET) ;
558
		            $this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET) ;
559
		            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU) ;
559
		            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU) ;
560
		            $res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_NOUVEAU_PROJET.'</a></li>'."\n" ;
560
		            $res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_NOUVEAU_PROJET.'</a></li>'."\n" ;
561
		            $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
561
		            $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
Line 1694... Line 1694...
1694
     * @return string
1694
     * @return string
1695
     * @access public
1695
     * @access public
1696
     */
1696
     */
1697
    function referencerListeExterne( )
1697
    function referencerListeExterne( )
1698
    {
1698
    {
-
 
1699
        $requete = 'show tables like \'agora\'' ;
-
 
1700
        $resultat = $this->_db->query ($requete);
-
 
1701
        if ($resultat->numRows() == 0) {
-
 
1702
        	return 'Cette fonctionnalité n\'est pas active' ;
-
 
1703
        }
1699
        $res = '<h1>'.PROJET_REFERENCER_LISTE.'</h1>' ;
1704
        $res = '<h1>'.PROJET_REFERENCER_LISTE.'</h1>' ;
1700
        include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
1705
        include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
1701
        $liste_externe = new liste_externe($this->_db) ;
1706
        $liste_externe = new liste_externe($this->_db) ;
1702
        include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListeExterne.class.php' ;
1707
        include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListeExterne.class.php' ;
1703
        $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $this->_id_projet) ;
1708
        $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $this->_id_projet) ;