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.83 2007-06-04 15:26:02 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.84 2007-06-25 09:56:55 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.83 $ |
*@version $Revision: 1.84 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
162,7 → 162,7 |
} |
} |
} |
$requete = 'SELECT * FROM bazar_fiche WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
$requete = 'SELECT *,bn_label_nature FROM bazar_fiche,bazar_nature WHERE bf_ce_nature=bn_id_nature and bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
|
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) |
169,11 → 169,18 |
: ''; |
|
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bf_ce_nature']; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bn_label_nature']; |
if (!isset($GLOBALS['_BAZAR_']['fiche_valide'])) $GLOBALS['_BAZAR_']['fiche_valide'] = $ligne['bf_statut_fiche']; |
//on verifie si l'utilisateur est administrateur |
$est_admin=0; |
$requete='SELECT bn_id_nature, bn_template, bn_commentaire, bn_label_class FROM bazar_nature WHERE bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce']; |
|
// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ... |
// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER |
if ($GLOBALS['_BAZAR_']['id_typeannonce'] == '' && defined('BAZ_NUM_ANNONCE_CALENDRIER')) $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER; |
|
$requete='SELECT bn_id_nature, bn_template, bn_commentaire, bn_label_class FROM bazar_nature '; |
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') $requete .= 'WHERE bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce']; |
|
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
956,7 → 963,10 |
$case_coche = false ; |
$nb_jointures=0; |
$requeteFrom = '' ; |
$requeteWhere = ' bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') AND bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].' AND bn_id_nature=bf_ce_nature AND ' ; |
$requeteWhere = ' bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '; |
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') $requeteWhere .= 'AND bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'] ; |
$requeteWhere .= ' AND bn_id_nature=bf_ce_nature AND ' ; |
|
$requeteWhereListe = '' ; |
|
if ( isset($tableau) ) { |
1148,7 → 1158,7 |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $valeur['bf_id_fiche']) ; |
if ($utilisateur->isSuperAdmin() || $GLOBALS['id_user']==$valeur['bf_ce_utilisateur']) { |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_MODIFIER); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $GLOBALS['_BAZAR_']['id_typeannonce']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $valeur['bf_ce_nature']); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('personnes'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_effectuee'); |
$res .= '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">('.BAZ_MODIFIER.')</a> '."\n"; |
1177,6 → 1187,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.83 2007-06-04 15:26:02 alexandre_tb |
* remplacement d un die en return |
* |
* Revision 1.82 2007/04/20 12:47:42 florian |
* correction bugs suite au merge |
* |