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.93 2007-10-01 11:59:51 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.94 2007-10-10 13:26:00 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.93 $
|
31 |
*@version $Revision: 1.94 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 188... |
Line 188... |
188 |
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
|
188 |
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
|
189 |
$id_nature = $result['bn_id_nature'];
|
189 |
$id_nature = $result['bn_id_nature'];
|
190 |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $result['bn_template'];
|
190 |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $result['bn_template'];
|
191 |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $result['bn_commentaire'];
|
191 |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $result['bn_commentaire'];
|
192 |
if (!isset($GLOBALS['_BAZAR_']['class'])) $GLOBALS['_BAZAR_']['class'] = $result['bn_label_class'];
|
192 |
if (!isset($GLOBALS['_BAZAR_']['class'])) $GLOBALS['_BAZAR_']['class'] = $result['bn_label_class'];
|
- |
|
193 |
|
193 |
if ($GLOBALS['AUTH']->getAuth()) {
|
194 |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']);
|
194 |
if ((niveau_droit($result['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='administrateur')
|
195 |
if ($utilisateur->isAdmin($result['bn_id_nature']) || $utilisateur->isSuperAdmin()) {
|
195 |
or(niveau_droit('0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur'))
|
- |
|
196 |
{
|
- |
|
197 |
$est_admin=1;
|
196 |
$est_admin=1;
|
198 |
}
|
197 |
}
|
199 |
}
|
198 |
|
200 |
//debut de la fiche
|
199 |
//debut de la fiche
|
201 |
$res .= '<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
200 |
$res .= '<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
202 |
//affiche le titre sous forme d'image
|
201 |
//affiche le titre sous forme d'image
|
203 |
if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
|
202 |
if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
|
204 |
$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$result['bn_label_nature'].'" />'.'<br />'."\n";
|
203 |
$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$result['bn_label_nature'].'" />'.'<br />'."\n";
|
Line 594... |
Line 593... |
594 |
if ($formatdate=='jmh') {$res.=strftime('%d.%m %H:%M',strtotime($date[1])).': ';}
|
593 |
if ($formatdate=='jmh') {$res.=strftime('%d.%m %H:%M',strtotime($date[1])).': ';}
|
595 |
if ($formatdate=='jmah') {$res.=strftime('%d.%m.%Y %H:%M',strtotime($date[1])).': ';}
|
594 |
if ($formatdate=='jmah') {$res.=strftime('%d.%m.%Y %H:%M',strtotime($date[1])).': ';}
|
596 |
$res.='<a href="'.preg_replace ('/&/', '&', $url[1]).'">'.$title[1].'</a>';
|
595 |
$res.='<a href="'.preg_replace ('/&/', '&', $url[1]).'">'.$title[1].'</a>';
|
597 |
if ($voirdesc) {$res.=$cat[1];}
|
596 |
if ($voirdesc) {$res.=$cat[1];}
|
598 |
// Ajout du bouton supprimer pour les superadministrateur
|
597 |
// Ajout du bouton supprimer pour les superadministrateur
|
- |
|
598 |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']);
|
599 |
if (($GLOBALS['AUTH']->getAuth() && niveau_droit(0,$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur')and($url[1]!='#')) {
|
599 |
if (($GLOBALS['AUTH']->getAuth() && $utilisateur->isSuperAdmin())and($url[1]!='#')) {
|
600 |
$mon_url = preg_replace ('/&/', '&', $url[1]) ;
|
600 |
$mon_url = preg_replace ('/&/', '&', $url[1]) ;
|
601 |
$url_suppr = new Net_URL(preg_replace ('/&/', '&', $mon_url)) ;
|
601 |
$url_suppr = new Net_URL(preg_replace ('/&/', '&', $mon_url)) ;
|
602 |
$url_suppr->addQueryString('action', BAZ_ACTION_SUPPRESSION) ;
|
602 |
$url_suppr->addQueryString('action', BAZ_ACTION_SUPPRESSION) ;
|
603 |
$res .= ' ( <a href="'.$url_suppr->getURL().
|
603 |
$res .= ' ( <a href="'.$url_suppr->getURL().
|
604 |
'" onclick="javascript:return confirm(\''.BAZ_SUPPRIMER.' ?\');">'.
|
604 |
'" onclick="javascript:return confirm(\''.BAZ_SUPPRIMER.' ?\');">'.
|
Line 1236... |
Line 1236... |
1236 |
}
|
1236 |
}
|
Line 1237... |
Line 1237... |
1237 |
|
1237 |
|
1238 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1238 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1239 |
*
|
1239 |
*
|
- |
|
1240 |
* $Log: not supported by cvs2svn $
|
- |
|
1241 |
* Revision 1.93 2007-10-01 11:59:51 alexandre_tb
|
- |
|
1242 |
* cosmetique d affichage de la date de l evenement
|
1240 |
* $Log: not supported by cvs2svn $
|
1243 |
*
|
1241 |
* Revision 1.92 2007-09-28 15:02:43 jp_milcent
|
1244 |
* Revision 1.92 2007-09-28 15:02:43 jp_milcent
|
1242 |
* Suppression d'une div fermante jamais ouverte!
|
1245 |
* Suppression d'une div fermante jamais ouverte!
|
1243 |
*
|
1246 |
*
|
1244 |
* Revision 1.91 2007-09-28 14:43:29 jp_milcent
|
1247 |
* Revision 1.91 2007-09-28 14:43:29 jp_milcent
|