Subversion Repositories Applications.bazar

Rev

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

Rev 62 Rev 67
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser 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: bazar.fonct.formulaire.php,v 1.11 2006-01-02 13:24:07 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.formulaire.php,v 1.12 2006-01-05 16:28:24 alexandre_tb Exp $
23
/**
23
/**
24
* Formulaire
24
* Formulaire
25
*
25
*
26
* Les fonctions de mise en page des formulaire
26
* Les fonctions de mise en page des formulaire
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
30
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aleandre GRANIER <alexandre@tela-botanica.org>
32
*@author        Aleandre GRANIER <alexandre@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.11 $ $Date: 2006-01-02 13:24:07 $
34
*@version       $Revision: 1.12 $ $Date: 2006-01-05 16:28:24 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 93... Line 93...
93
	$requete = 'SELECT * FROM '.$source;
93
	$requete = 'SELECT * FROM '.$source;
94
	$resultat = & $GLOBALS['_BAZAR_']['db'] -> query($requete) ;
94
	$resultat = & $GLOBALS['_BAZAR_']['db'] -> query($requete) ;
95
	if (DB::isError ($resultat)) {
95
	if (DB::isError ($resultat)) {
96
		die ($GLOBALS['_BAZAR_']['db']->getMessage().$GLOBALS['_BAZAR_']['db']->getDebugInfo()) ;
96
		die ($GLOBALS['_BAZAR_']['db']->getMessage().$GLOBALS['_BAZAR_']['db']->getDebugInfo()) ;
97
	}
97
	}
-
 
98
	$tableau_info_jointure = explode (',', $nom_bdd) ;
-
 
99
	$nom_table_jointure = $tableau_info_jointure[0] ;
-
 
100
	
98
	require_once 'HTML/QuickForm/advcheckbox.php' ;
101
	require_once 'HTML/QuickForm/advcheckbox.php' ;
99
	$i=0;
102
	$i=0;
100
	while ($ligne = $resultat->fetchRow()) {
103
	while ($ligne = $resultat->fetchRow()) {
101
		//$chkbox[$ligne[0]] = $ligne[1] ;
104
		//$chkbox[$ligne[0]] = $ligne[1] ;
102
		if ($i==0) $labelchkbox=constant($label) ; else $labelchkbox='&nbsp;' ;
105
		if ($i==0) $labelchkbox=constant($label) ; else $labelchkbox='&nbsp;' ;
103
		$checkbox[]= & HTML_Quickform::createElement('checkbox', $ligne[0], $labelchkbox, $ligne[1], array ('style'=>'display:inline;margin-left:2px;')) ;		
106
		$checkbox[]= & HTML_Quickform::createElement('checkbox', '', $labelchkbox, $ligne[1], 
-
 
107
						array ('style'=>'display:inline;margin-left:2px;')) ;		
104
		$i++;
108
		$i++;
105
	}
109
	}
106
	//if (isset($obligatoire)and($obligatoire==1)) {
-
 
107
	//$formtemplate->addRule($nom_bdd.'$i', BAZ_CHOISIR_OBLIGATOIRE.' '.constant($label) , 'nonzero', '', 'client') ;
-
 
108
	//$formtemplate->addRule($nom_bdd.'$i', constant($label.'_REQUIS'), 'required', '', 'client') ;
-
 
109
	//}
110
 
110
	$formtemplate->addGroup($checkbox, $nom_bdd, constant($label), '<br />'."\n");
111
	$formtemplate->addGroup($checkbox, $nom_table_jointure, constant($label), '<br />'."\n");
111
}
112
}
Line 112... Line 113...
112
 
113
 
113
 
114
 
Line 219... Line 220...
219
}
220
}
Line 220... Line 221...
220
 
221
 
221
/* +--Fin du code ----------------------------------------------------------------------------------------+
222
/* +--Fin du code ----------------------------------------------------------------------------------------+
222
*
223
*
-
 
224
* $Log: not supported by cvs2svn $
-
 
225
* Revision 1.11  2006/01/02 13:24:07  alexandre_tb
-
 
226
* correction de bug d'un mauvais retour en erreur
223
* $Log: not supported by cvs2svn $
227
*
224
* Revision 1.10  2005/12/01 16:05:41  florian
228
* Revision 1.10  2005/12/01 16:05:41  florian
225
* changement des chemins pour appli Pear
229
* changement des chemins pour appli Pear
226
*
230
*
227
* Revision 1.9  2005/11/24 16:17:13  florian
231
* Revision 1.9  2005/11/24 16:17:13  florian