| Line 156... |
Line 156... |
| 156 |
* @param string ce champs est il obligatoire? (required)
|
156 |
* @param string ce champs est il obligatoire? (required)
|
| 157 |
* @return void
|
157 |
* @return void
|
| 158 |
*/
|
158 |
*/
|
| 159 |
function checkbox(&$formtemplate, $id_liste , $label, $limite1, $limite2, $defaut,
|
159 |
function checkbox(&$formtemplate, $id_liste , $label, $limite1, $limite2, $defaut,
|
| 160 |
$source, $obligatoire, $dans_moteur_de_recherche=0, $appli = 'bazar') {
|
160 |
$source, $obligatoire, $dans_moteur_de_recherche=0, $appli = 'bazar') {
|
| 161 |
if (is_int ($id_liste)) {
|
161 |
if (intval ($id_liste) != 0) {
|
| 162 |
$l = $appli[0];
|
162 |
$l = $appli[0];
|
| 163 |
$requete = 'SELECT * FROM '.$appli.'_liste_valeurs WHERE '.$l.'lv_ce_liste='.$id_liste.
|
163 |
$requete = 'SELECT * FROM '.$appli.'_liste_valeurs WHERE '.$l.'lv_ce_liste='.$id_liste.
|
| 164 |
' AND '.$l.'lv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'" ORDER BY '.$l.'lv_label';
|
164 |
' AND '.$l.'lv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'" ORDER BY '.$l.'lv_label';
|
| 165 |
$resultat = & $GLOBALS['_BAZAR_']['db'] -> query($requete) ;
|
165 |
$resultat = & $GLOBALS['_BAZAR_']['db'] -> query($requete) ;
|
| 166 |
if (DB::isError ($resultat)) {
|
166 |
if (DB::isError ($resultat)) {
|
| Line 414... |
Line 414... |
| 414 |
}
|
414 |
}
|
| 415 |
$html ='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
415 |
$html ='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
| 416 |
$formtemplate->addElement('html', $html) ;
|
416 |
$formtemplate->addElement('html', $html) ;
|
| 417 |
if ($html_url!='') $formtemplate->addElement('html', $html_url) ;
|
417 |
if ($html_url!='') $formtemplate->addElement('html', $html_url) ;
|
| 418 |
$formtemplate->addElement('text', 'url_lien'.$nom_bdd, BAZ_URL_LIEN) ;
|
418 |
$formtemplate->addElement('text', 'url_lien'.$nom_bdd, BAZ_URL_LIEN) ;
|
| - |
|
419 |
$defauts=array('url_lien'.$nom_bdd=>'http://');
|
| - |
|
420 |
$formtemplate->setDefaults($defauts);
|
| - |
|
421 |
|
| 419 |
$formtemplate->addElement('text', 'url_texte'.$nom_bdd, BAZ_URL_TEXTE) ;
|
422 |
$formtemplate->addElement('text', 'url_texte'.$nom_bdd, BAZ_URL_TEXTE) ;
|
| 420 |
//gestion du champs obligatoire
|
423 |
//gestion du champs obligatoire
|
| 421 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
424 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
| 422 |
$formtemplate->addRule('url_lien'.$nom_bdd, BAZ_URL_LIEN_REQUIS, 'required', '', 'client') ;
|
425 |
$formtemplate->addRule('url_lien'.$nom_bdd, BAZ_URL_LIEN_REQUIS, 'required', '', 'client') ;
|
| 423 |
$formtemplate->addRule('url_texte'.$nom_bdd, BAZ_URL_TEXTE_REQUIS, 'required', '', 'client') ;
|
426 |
$formtemplate->addRule('url_texte'.$nom_bdd, BAZ_URL_TEXTE_REQUIS, 'required', '', 'client') ;
|
| Line 622... |
Line 625... |
| 622 |
}
|
625 |
}
|
| Line 623... |
Line 626... |
| 623 |
|
626 |
|
| 624 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
627 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| 625 |
*
|
628 |
*
|
| - |
|
629 |
* $Log$
|
| - |
|
630 |
* Revision 1.7 2007-08-27 12:24:52 alexandre_tb
|
| - |
|
631 |
* correction encodage
|
| 626 |
* $Log$
|
632 |
*
|
| 627 |
* Revision 1.3 2007-07-04 11:53:37 alexandre_tb
|
633 |
* Revision 1.3 2007-07-04 11:53:37 alexandre_tb
|
| 628 |
* ajout du type champs_cache
|
634 |
* ajout du type champs_cache
|
| 629 |
*
|
635 |
*
|
| 630 |
* Revision 1.2 2007-06-25 09:54:33 alexandre_tb
|
636 |
* Revision 1.2 2007-06-25 09:54:33 alexandre_tb
|