Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 380 → Rev 381

/branches/livraison_aha/bibliotheque/bazar.fonct.php
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.php,v 1.74.2.10 2008-02-01 17:20:18 florian Exp $
// CVS : $Id: bazar.fonct.php,v 1.74.2.11 2008-03-17 11:03:02 jp_milcent Exp $
/**
*
* Fonctions du module bazar
31,7 → 31,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.74.2.10 $ $Date: 2008-02-01 17:20:18 $
*@version $Revision: 1.74.2.11 $ $Date: 2008-03-17 11:03:02 $
// +------------------------------------------------------------------------------------------------------+
*/
 
648,9 → 648,9
$res=baz_afficher_formulaire_annonce('modification',$formtemplate);
}
// Nettoyage de l'url avant les return
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION);
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
// Nettoyage de l'url avant les return : apparement inutile sinon pose pb (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');
//------------------------------------------------------------------------------------------------
//CAS DE L'INSCRIPTION D'UNE ANNONCE
678,9 → 678,7
exit();
}
}
}
else {
} else {
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']);
1331,6 → 1329,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.74.2.10 2008-02-01 17:20:18 florian
* suppression du lien annuler pour la sélection des fiches, pas de valeur par défaut pour la sélection, et sélectionner un type de fiche devient obligatoire.
*
* Revision 1.74.2.9 2008-02-01 16:23:29 florian
* ajout champs_mail, décommenter les traductions des javascripts
*
/branches/livraison_aha/bibliotheque/bazar.fonct.rss.php
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.10 2008-02-04 13:03:09 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.11 2008-03-17 11:03:02 jp_milcent 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.10 $
*@version $Revision: 1.99.2.11 $
// +------------------------------------------------------------------------------------------------------+
*/
 
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 ('/&amp;/', '&', $url->getURL()) ;
486,36 → 486,39
$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
$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">&nbsp;*</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();
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">&nbsp;*</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
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION);
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
// 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');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
return $res ;
1253,6 → 1256,9
/* +--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
*