Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1864 alexandre_ 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU General Public                                                  |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | General Public License for more details.                                                             |
17
// |                                                                                                      |
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                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: projet_theme.class.php,v 1.1 2008-08-25 15:09:39 alexandre_tb Exp $
23
/**
24
* Application projet
25
*
26
* La classe projet_theme
27
*
28
*@package projet
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2008
34
*@version       $Revision: 1.1 $
35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
 
39
// +------------------------------------------------------------------------------------------------------+
40
// |                                            ENTETE du PROGRAMME                                       |
41
// +------------------------------------------------------------------------------------------------------+
42
 
43
 
44
/**
45
 * class projet_type
46
 *
47
 */
48
class projet_theme
49
{
50
 
51
     /*** Attributes: ***/
52
 
53
    /**
54
     * Une connection vers une base de donnée
55
     * @access private
56
     */
57
    var $_db;
58
 
59
    /**
60
     * Renvoie tous types de projets (de la table projet_type) ans un tableau avec pour
61
     * clé l'identifiant et pour valeur le label.
62
     *
63
     * @return Array
64
     * @static
65
     * @access public
66
     */
67
    function getTousLesThemes(& $objetDB )
68
    {
69
        $requete = 'select * from projet_theme' ;
70
        return $objetDB->getAssoc ($requete) ;
71
    }
72
 
73
    /**
74
     *
75
     *
76
     * @param DB objetDB Une instance de la classe PEAR::DB
77
     * @return void
78
     * @access public
79
     */
80
    function projet_theme( & $objetDB )
81
    {
82
        $this->_db = $objetDB ;
83
    }
84
 
85
 
86
    /**
87
     *
88
     *
89
     * @param DB objetDB Une instance de la classe PEAR::DB
90
     * @return void
91
     * @access public
92
     */
93
    function getLabelType( $id_type)
94
    {
95
        $requete = 'select pt_label_theme from projet_theme where pt_id_theme='.$id_type ;
96
        $resultat =  $this->_db->getOne($requete) ;
97
        if (DB::isError($resultat)) {
98
        	echo $resultat->getMessage() ;
99
        }
100
        return $resultat ;
101
    }
102
}
103
?>