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.php,v 1.20 2006-01-05 16:28:25 alexandre_tb Exp $ |
// CVS : $Id: bazar.php,v 1.21 2006-01-13 14:12:52 florian Exp $ |
/** |
* |
*@package bazar |
28,7 → 28,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.20 $ $Date: 2006-01-05 16:28:25 $ |
*@version $Revision: 1.21 $ $Date: 2006-01-13 14:12:52 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
68,9 → 68,10 |
if (defined('PAP_VERSION')) { //si on est dans Papyrus |
GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css'); |
} |
//initialisation de l'id user |
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID); |
|
//********************************************************************************************************** |
//initialisation des paramêtres papyrus |
//********************************************************************************************************** |
//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte |
//parametre action pour lancer directement l'action indiquée |
if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) { |
88,10 → 89,38 |
else $GLOBALS['_BAZAR_']['categorie_nature']=0; |
//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches) |
if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) { |
$GLOBALS['_BAZAR_']['id_nature']=$GLOBALS['_GEN_commun']['info_application']->id_nature; |
$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature; |
} |
else $GLOBALS['_BAZAR_']['id_nature']='toutes'; |
elseif (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce']='toutes'; |
|
//********************************************************************************************************** |
//initialisation de la variable globale de bazar |
//********************************************************************************************************** |
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID); |
|
//Recuperer les eventuelles variables passees en GET ou en POST |
if (isset($_REQUEST['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche']; |
if (isset($_REQUEST['typeannonce'])) { |
$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce']; |
} |
|
if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) { |
$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo FROM bazar_nature WHERE bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature']; |
$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition']; |
$GLOBALS['_BAZAR_']['template']=$ligne['bn_template']; |
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire']; |
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation']; |
$GLOBALS['_BAZAR_']['nb_consultations']=$ligne['bf_nb_consultations']; |
$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre']; |
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo']; |
} |
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
151,6 → 180,7 |
$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n"; |
|
if (isset($_GET['action'])) { |
if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']); |
switch ($_GET['action']) { |
case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break; |
case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_nature']); break; |
161,13 → 191,13 |
case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break; |
case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break; |
case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break; |
case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break; |
case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).baz_formulaire(BAZ_DEPOSER_ANNONCE); break; |
case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break; |
case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).mes_fiches(); break; |
case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break; |
case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).baz_formulaire(BAZ_DEPOSER_ANNONCE); break; |
case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().baz_formulaire(BAZ_DEPOSER_ANNONCE); break; |
case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break; |
case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break; |
case BAZ_GERER_DROITS : $res .= baz_formulaire(BAZ_GERER_DROITS); break; |
case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break; |
case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break; |
case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break; |
default : $res .= accueil() ; |
183,6 → 213,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.20 2006/01/05 16:28:25 alexandre_tb |
* prise en chage des checkbox, reste la mise à jour à gérer |
* |
* Revision 1.19 2006/01/03 10:19:31 florian |
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut... |
* |