19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.11 2008-03-17 11:03:02 jp_milcent Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.10 2008-02-04 13:03:09 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
28,7 → 28,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.99.2.11 $ |
*@version $Revision: 1.99.2.10 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
116,9 → 116,9 |
*/ |
function baz_voir_fiche($danslappli, $idfiche='') { |
$res=''; |
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche'] = $_GET['id_fiche']; |
if ($idfiche != '') $GLOBALS['_BAZAR_']['id_fiche'] = $idfiche; |
$url = $GLOBALS['_BAZAR_']['url']; |
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche']; |
if ($idfiche!='') $GLOBALS['_BAZAR_']['id_fiche']=$idfiche; |
$url= $GLOBALS['_BAZAR_']['url']; |
$url->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$url->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$url = preg_replace ('/&/', '&', $url->getURL()) ; |
486,39 → 486,36 |
$res .= '</div>'."\n"; |
$res .= '</div>'."\n"; |
} |
}else { |
$res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n"; |
} |
else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n"; |
|
//formulaire des commentaires |
if ($GLOBALS['AUTH']->getAuth()) { |
$form_commentaire = new HTML_QuickForm('bazar_commentaire', 'post', $url); |
$squelette =& $form_commentaire->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<label style="width:200px;">{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n". |
'</label><br />'."\n".'{element}<br />'."\n"); |
$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire"> *{requiredNote}</span>'."\n"); |
$option=array('style'=>'width:300px;border:1px solid #000;', 'maxlength'=>100); |
$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option); |
$option=array('style'=>'width:95%;height:100px;white-space: pre;padding:3px;border:1px solid #000;'); |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php'; |
$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option); |
$form_commentaire->addElement($formtexte) ; |
$option=array('style'=>'border:1px solid #000;'); |
$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER, $option); |
$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ; |
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ; |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$res .= $form_commentaire->toHTML(); |
} |
$form_commentaire = new HTML_QuickForm('bazar_commentaire', 'post', $url); |
$squelette =& $form_commentaire->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<label style="width:200px;">{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n". |
'</label><br />'."\n".'{element}<br />'."\n"); |
$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire"> *{requiredNote}</span>'."\n"); |
$option=array('style'=>'width:300px;border:1px solid #000;', 'maxlength'=>100); |
$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option); |
$option=array('style'=>'width:95%;height:100px;white-space: pre;padding:3px;border:1px solid #000;'); |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php'; |
$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option); |
$form_commentaire->addElement($formtexte) ; |
$option=array('style'=>'border:1px solid #000;'); |
$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER, $option); |
$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ; |
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ; |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$res .= $form_commentaire->toHTML(); |
$res .= '</div>'."\n"; |
} |
} |
|
// Nettoyage de l'url avant les return : apparement inutile sinon pose pb dans Papyrus (url applette deconnexion et moteur de recherche) [jpm le 17 mars 2008] |
//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
//$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
return $res ; |
1256,9 → 1253,6 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.99.2.10 2008-02-04 13:03:09 alexandre_tb |
* ajout d un class css dans les h2 |
* |
* Revision 1.99.2.9 2008-02-01 16:24:10 florian |
* ajout champs_mail, décommenter les traductions des javascripts |
* |