Subversion Repositories Applications.bazar

Rev

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

Rev 115 Rev 116
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
 
-
 
3
require_once BAZ_CHEMIN_APPLI.'bibliotheque/bazar.class.php';
-
 
4
require_once BAZ_CHEMIN_APPLI.'bibliotheque/bazar.fonct.php';
-
 
5
 
2
/** baz_valeur_template() - Renvoi des valeurs inscrite dans le fichier de template
6
/** baz_valeur_template() - Renvoi des valeurs inscrite dans le fichier de template
3
*
7
*
4
* @param   string valeur du template de bazar_nature
8
* @param   string valeur du template de bazar_nature
5
*
9
*
6
* @return   mixed  tableau contenant les champs du fichier template
10
* @return   mixed  tableau contenant les champs du fichier template
Line 352... Line 356...
352
		$squelette->setElementTemplate( '<label style="width:200px;">{label}&nbsp;</label><br />'."\n".'{element}<br />'."\n");
356
		$squelette->setElementTemplate( '<label style="width:200px;">{label}&nbsp;</label><br />'."\n".'{element}<br />'."\n");
353
		$squelette->setRequiredNoteTemplate("\n".'{requiredNote} '."\n");
357
		$squelette->setRequiredNoteTemplate("\n".'{requiredNote} '."\n");
354
		$option=array('style'=>'width:300px;', 'maxlength'=>100);
358
		$option=array('style'=>'width:300px;', 'maxlength'=>100);
355
		$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option);
359
		$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option);
356
		$option=array('style'=>'width:100%;height:100px;white-space: pre;padding:3px;');
360
		$option=array('style'=>'width:100%;height:100px;white-space: pre;padding:3px;');
357
		require_once 'HTML/QuickForm/textarea.php';
361
		require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php';
358
		$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option);
362
		$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option);
359
		$form_commentaire->addElement($formtexte) ;
363
		$form_commentaire->addElement($formtexte) ;
360
		$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER);
364
		$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER);
361
		$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ;
365
		$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ;
362
		$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
366
		$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
Line 667... Line 671...
667
		}
671
		}
Line 668... Line 672...
668
		
672
		
Line 669... Line 673...
669
		$tableau = baz_valeurs_template($resultat) ;
673
		$tableau = baz_valeurs_template($resultat) ;
670
		
674
		
671
		for ($i=0; $i<count($tableau); $i++) {
675
		for ($i=0; $i<count($tableau); $i++) {
672
			if ($tableau[$i]['type'] == 'liste' || $tableau[$i]['type'] == 'checkbox') {
676
			if (($tableau[$i]['type'] == 'liste' || $tableau[$i]['type'] == 'checkbox') && $tableau[$i]['recherche'] == 1) {
673
				if ($tableau[$i]['type'] == 'checkbox') {
677
				if ($tableau[$i]['type'] == 'checkbox') {
674
					$formtemplate->addElement ('html', '<br />'.$tableau[$i]['label'].'<br />') ;	
678
					$formtemplate->addElement ('html', '<br />'.$tableau[$i]['label'].'<br />') ;	
675
				}
679
				}