223 |
alex |
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 |
// +------------------------------------------------------------------------------------------------------+
|
832 |
florian |
22 |
// CVS : $Id: HTML_TableFragmenteur.php,v 1.2 2006-04-28 12:41:26 florian Exp $
|
223 |
alex |
23 |
/**
|
|
|
24 |
* Classe qui permet de créer des tables de résultat divisé en page
|
|
|
25 |
*
|
|
|
26 |
*
|
|
|
27 |
*@package projet
|
|
|
28 |
//Auteur original :
|
|
|
29 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
|
|
30 |
//Autres auteurs :
|
|
|
31 |
*@author Aucun
|
|
|
32 |
*@copyright Tela-Botanica 2000-2004
|
832 |
florian |
33 |
*@version $Revision: 1.2 $
|
223 |
alex |
34 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
35 |
*/
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
39 |
// | ENTETE du PROGRAMME |
|
|
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
41 |
|
|
|
42 |
|
832 |
florian |
43 |
include_once PAP_CHEMIN_API_PEAR.'HTML/Table.php' ;
|
223 |
alex |
44 |
|
|
|
45 |
/**
|
|
|
46 |
* class HTML_Liste
|
|
|
47 |
*
|
|
|
48 |
*/
|
|
|
49 |
class HTML_TableFragmenteur extends HTML_Table
|
|
|
50 |
{
|
|
|
51 |
/*** Attributes: ***/
|
|
|
52 |
|
|
|
53 |
/**
|
|
|
54 |
*
|
|
|
55 |
* @access protected
|
|
|
56 |
*/
|
|
|
57 |
var $pager;
|
|
|
58 |
/**
|
|
|
59 |
*
|
|
|
60 |
* @access private
|
|
|
61 |
*/
|
|
|
62 |
var $_utilise_pager;
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
*
|
|
|
67 |
*
|
|
|
68 |
* @param bool utilise_pager Si l'on souhaite que les résultats soient divisés en page, on passe true.
|
|
|
69 |
* @return HTML_Liste
|
|
|
70 |
* @access public
|
|
|
71 |
*/
|
|
|
72 |
function HTML_Liste( $utilise_pager = false)
|
|
|
73 |
{
|
|
|
74 |
HTML_Table::HTML_Table() ;
|
|
|
75 |
$this->_utilise_pager = $utilise_pager ;
|
|
|
76 |
|
|
|
77 |
} // end of member function HTML_Liste
|
|
|
78 |
|
|
|
79 |
/**
|
|
|
80 |
*
|
|
|
81 |
*
|
|
|
82 |
* @param Array label_entete Un tableau contenant les labels pour l'entête de la liste.
|
|
|
83 |
* @return void
|
|
|
84 |
* @access public
|
|
|
85 |
*/
|
|
|
86 |
function construireEntete( $label_entete )
|
|
|
87 |
{
|
|
|
88 |
$this->addRow ($label_entete, '', 'TH') ;
|
|
|
89 |
} // end of member function construitEntete
|
|
|
90 |
|
|
|
91 |
/**
|
|
|
92 |
*
|
|
|
93 |
*
|
|
|
94 |
* @param Array label_liste Un tableau à double dimension contenant les valeurs de la liste. du type
|
|
|
95 |
* 0 =>'label', 'label2',
|
|
|
96 |
* 1 => ...
|
|
|
97 |
* @return void
|
|
|
98 |
* @access public
|
|
|
99 |
*/
|
|
|
100 |
function construireListe( $label_liste )
|
|
|
101 |
{
|
|
|
102 |
for ($i = 0; $i < count ($label_liste) ; $i++) {
|
|
|
103 |
$this->addRow ($label_liste[$i]) ;
|
|
|
104 |
//var_dump ($label_liste[$i]) ;
|
|
|
105 |
}
|
|
|
106 |
}
|
|
|
107 |
} // end of HTML_Liste
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
?>
|