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.11 2008-03-17 11:03:02 jp_milcent Exp $ |
// CVS : $Id: bazar.fonct.php,v 1.74.2.12 2008-04-16 12:38:17 alexandre_tb 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.11 $ $Date: 2008-03-17 11:03:02 $ |
*@version $Revision: 1.74.2.12 $ $Date: 2008-04-16 12:38:17 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
628,17 → 628,25 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_ACTION_NOUVEAU) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V); |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL()))); |
// Appel du modele |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']); |
if (!PEAR::isError($html)) { |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html); |
} else { |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate); |
} |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if ($utilisateur->isRedacteur($GLOBALS['_BAZAR_']['id_typeannonce']) || |
$utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce'])|| |
$utilisateur->isSuperAdmin()) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V); |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL()))); |
// Appel du modele |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']); |
if (!PEAR::isError($html)) { |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html); |
} else { |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate); |
} |
} else { |
// Pas de droit pour deposer un annonce |
return '<div>Pas de droits suffisants</div>'; |
} |
} |
|
//------------------------------------------------------------------------------------------------ |
1329,6 → 1337,10 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.74.2.11 2008-03-17 11:03:02 jp_milcent |
* Ajout de l'authentification nécessaire pour déposer des commentaires. |
* Corrections sur la gestion des paramêtres dans les urls (compatibilité applette Identification et Moteur de Recherche). |
* |
* 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. |
* |