Subversion Repositories Applications.projet

Rev

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

Rev 288 Rev 298
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: projet.class.php,v 1.12 2008-05-21 14:35:26 alexandre_tb Exp $
22
// CVS : $Id: projet.class.php,v 1.13 2008-08-25 15:09:25 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe projet
26
* La classe projet
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.12 $
34
*@version       $Revision: 1.13 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 407... Line 407...
407
        // On realise une requete sur projet_documents avec une jointure sur l'annuaire
407
        // On realise une requete sur projet_documents avec une jointure sur l'annuaire
408
        // et sur gen_type_de_fichier pour envoyer un resultat complet.
408
        // et sur gen_type_de_fichier pour envoyer un resultat complet.
409
        // On exclue les fichiers racines cad pd_pere is null
409
        // On exclue les fichiers racines cad pd_pere is null
410
        $requete = "select pd_id from projet_documents where pd_ce_projet=".$this->_id_projet ;
410
        $requete = "select pd_id from projet_documents where pd_ce_projet=".$this->_id_projet ;
411
        if ($id_repertoire != '') $requete .= ' and pd_pere='.$id_repertoire;
411
        if ($id_repertoire != '') $requete .= ' and pd_pere='.$id_repertoire;
412
        if ($id_repertoire == 0) $requete .= ' and pd_pere=0';
412
        if ($id_repertoire != '' && $id_repertoire == 0) $requete .= ' and pd_pere=0';
413
        if ($date != '') $requete .= ' and pd_date_de_mise_a_jour > date_sub (NOW(), interval 1 week)';
413
        if ($date != '') $requete .= ' and pd_date_de_mise_a_jour > date_sub (NOW(), interval 1 week)';
414
        $requete .= ' order by pd_nom' ;
414
        $requete .= ' order by pd_nom' ;
415
        $resultat = $this->_db->query ($requete) ;
415
        $resultat = $this->_db->query ($requete) ;
416
        if (DB::isError($resultat)) {
416
        if (DB::isError($resultat)) {
417
            return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
417
            return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
418
        }
418
        }
419
        $tableau_document = array() ;
419
        $tableau_document = array() ;
420
        // Un compteur
420
        // Un compteur
421
        $i = 0 ;
421
        $i = 0 ;
422
        while ($ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT)) {
422
        while ($ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT)) {
423
            array_push ($tableau_document, new document ($ligne->pd_id, &$this->_db, $chemin, $chemin_icones)) ;
423
            array_push ($tableau_document, new document ($ligne->pd_id, $i, $chemin, $chemin_icones)) ;
424
        }
424
        }
425
        return $tableau_document ;
425
        return $tableau_document ;
426
    }
426
    }