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.rss.php,v 1.99.2.1 2007-11-30 14:14:36 jp_milcent Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.2 2007-11-30 15:02:50 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
*@package bazar
|
25 |
*@package bazar
|
26 |
//Auteur original :
|
26 |
//Auteur original :
|
27 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
27 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
28 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
28 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
29 |
//Autres auteurs :
|
29 |
//Autres auteurs :
|
30 |
*@copyright Tela-Botanica 2000-2006
|
30 |
*@copyright Tela-Botanica 2000-2006
|
31 |
*@version $Revision: 1.99.2.1 $
|
31 |
*@version $Revision: 1.99.2.2 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 160... |
Line 160... |
160 |
$requete = 'UPDATE bazar_fiche SET bf_nb_consultations=bf_nb_consultations+1 WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
|
160 |
$requete = 'UPDATE bazar_fiche SET bf_nb_consultations=bf_nb_consultations+1 WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
|
161 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
161 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
162 |
}
|
162 |
}
|
163 |
}
|
163 |
}
|
164 |
}
|
164 |
}
|
165 |
$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'];
|
165 |
$requete = 'SELECT * FROM bazar_fiche,bazar_nature WHERE bf_ce_nature=bn_id_nature and bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
|
- |
|
166 |
|
166 |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'"';
|
167 |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'"';
|
167 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
168 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
168 |
(DB::isError($resultat)) ? die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
|
169 |
(DB::isError($resultat)) ? die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
|
169 |
: '';
|
170 |
: '';
|
Line 176... |
Line 177... |
176 |
|
177 |
|
177 |
// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ...
|
178 |
// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ...
|
178 |
// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER
|
179 |
// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER
|
Line 179... |
Line -... |
179 |
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce']) && defined('BAZ_NUM_ANNONCE_CALENDRIER')) $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER;
|
- |
|
180 |
|
- |
|
181 |
$requete='SELECT bn_id_nature, bn_template, bn_commentaire, bn_label_class,bn_label_nature FROM bazar_nature where 1';
|
- |
|
182 |
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') $requete .= ' and bn_id_nature in ('.$GLOBALS['_BAZAR_']['id_typeannonce'].')';
|
- |
|
183 |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'"';
|
- |
|
184 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
- |
|
185 |
if (DB::isError($resultat)) {
|
- |
|
186 |
return ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
- |
|
187 |
}
|
- |
|
188 |
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
|
180 |
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce']) && defined('BAZ_NUM_ANNONCE_CALENDRIER')) $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER;
|
189 |
$id_nature = $result['bn_id_nature'];
|
181 |
|
190 |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $result['bn_template'];
|
182 |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $ligne['bn_template'];
|
Line 191... |
Line 183... |
191 |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $result['bn_commentaire'];
|
183 |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $ligne['bn_commentaire'];
|
192 |
if (!isset($GLOBALS['_BAZAR_']['class'])) $GLOBALS['_BAZAR_']['class'] = $result['bn_label_class'];
|
184 |
if (!isset($GLOBALS['_BAZAR_']['class'])) $GLOBALS['_BAZAR_']['class'] = $ligne['bn_label_class'];
|
193 |
|
185 |
|
194 |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']);
|
186 |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']);
|
Line 195... |
Line 187... |
195 |
if ($utilisateur->isAdmin($result['bn_id_nature']) || $utilisateur->isSuperAdmin()) {
|
187 |
if ($utilisateur->isAdmin($ligne['bn_id_nature']) || $utilisateur->isSuperAdmin()) {
|
196 |
$est_admin=1;
|
188 |
$est_admin=1;
|
197 |
}
|
189 |
}
|
198 |
|
190 |
|
199 |
//debut de la fiche
|
191 |
//debut de la fiche
|
200 |
$res .= '<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
192 |
$res .= '<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
201 |
//affiche le titre sous forme d'image
|
193 |
//affiche le titre sous forme d'image
|
202 |
if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
|
194 |
if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
|
203 |
$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$result['bn_label_nature'].'" />'.'<br />'."\n";
|
195 |
$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$ligne['bn_label_nature'].'" />'.'<br />'."\n";
|
204 |
}
|
196 |
}
|
205 |
//affiche le texte sinon
|
197 |
//affiche le texte sinon
|
206 |
else {
|
198 |
else {
|
207 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$result['bn_label_nature'].'</h2>'."\n";
|
199 |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$ligne['bn_label_nature'].'</h2>'."\n";
|
208 |
}
|
200 |
}
|
Line 1247... |
Line 1239... |
1247 |
}
|
1239 |
}
|
Line 1248... |
Line 1240... |
1248 |
|
1240 |
|
1249 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1241 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1250 |
*
|
1242 |
*
|
- |
|
1243 |
* $Log: not supported by cvs2svn $
|
- |
|
1244 |
* Revision 1.99.2.1 2007-11-30 14:14:36 jp_milcent
|
- |
|
1245 |
* Ajout d'un décodage des apostrophes de type RIGHT SINGLE QUOTATION MARK.
|
1251 |
* $Log: not supported by cvs2svn $
|
1246 |
*
|
1252 |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb
|
1247 |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb
|
1253 |
* correction bug: retrait inorportun de la variable menu dans la globale URL
|
1248 |
* correction bug: retrait inorportun de la variable menu dans la globale URL
|
1254 |
*
|
1249 |
*
|
1255 |
* Revision 1.98 2007-10-24 13:27:45 alexandre_tb
|
1250 |
* Revision 1.98 2007-10-24 13:27:45 alexandre_tb
|