Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.74.2.11 2008-03-17 11:03:02 jp_milcent Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.74.2.12 2008-04-16 12:38:17 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.74.2.11 $ $Date: 2008-03-17 11:03:02 $
|
34 |
*@version $Revision: 1.74.2.12 $ $Date: 2008-04-16 12:38:17 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 626... |
Line 626... |
626 |
|
626 |
|
627 |
//------------------------------------------------------------------------------------------------
|
627 |
//------------------------------------------------------------------------------------------------
|
628 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
628 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
629 |
//------------------------------------------------------------------------------------------------
|
629 |
//------------------------------------------------------------------------------------------------
|
- |
|
630 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
- |
|
631 |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']);
|
- |
|
632 |
if ($utilisateur->isRedacteur($GLOBALS['_BAZAR_']['id_typeannonce']) ||
|
- |
|
633 |
$utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce'])||
|
630 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
634 |
$utilisateur->isSuperAdmin()) {
|
631 |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V);
|
635 |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V);
|
632 |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL())));
|
636 |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL())));
|
633 |
// Appel du modele
|
637 |
// Appel du modele
|
634 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
|
638 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
|
635 |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
|
639 |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
|
636 |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']);
|
640 |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']);
|
637 |
if (!PEAR::isError($html)) {
|
641 |
if (!PEAR::isError($html)) {
|
638 |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html);
|
642 |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html);
|
639 |
} else {
|
643 |
} else {
|
640 |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
|
644 |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
|
- |
|
645 |
}
|
- |
|
646 |
} else {
|
- |
|
647 |
// Pas de droit pour deposer un annonce
|
- |
|
648 |
return '<div>Pas de droits suffisants</div>';
|
641 |
}
|
649 |
}
|
Line 642... |
Line 650... |
642 |
}
|
650 |
}
|
643 |
|
651 |
|
644 |
//------------------------------------------------------------------------------------------------
|
652 |
//------------------------------------------------------------------------------------------------
|
Line 1327... |
Line 1335... |
1327 |
}
|
1335 |
}
|
Line 1328... |
Line 1336... |
1328 |
|
1336 |
|
1329 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1337 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1330 |
*
|
1338 |
*
|
- |
|
1339 |
* $Log: not supported by cvs2svn $
|
- |
|
1340 |
* Revision 1.74.2.11 2008-03-17 11:03:02 jp_milcent
|
- |
|
1341 |
* Ajout de l'authentification nécessaire pour déposer des commentaires.
|
- |
|
1342 |
* Corrections sur la gestion des paramêtres dans les urls (compatibilité applette Identification et Moteur de Recherche).
|
1331 |
* $Log: not supported by cvs2svn $
|
1343 |
*
|
1332 |
* Revision 1.74.2.10 2008-02-01 17:20:18 florian
|
1344 |
* Revision 1.74.2.10 2008-02-01 17:20:18 florian
|
1333 |
* 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.
|
1345 |
* 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.
|
1334 |
*
|
1346 |
*
|
1335 |
* Revision 1.74.2.9 2008-02-01 16:23:29 florian
|
1347 |
* Revision 1.74.2.9 2008-02-01 16:23:29 florian
|