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.56 2006-07-18 14:13:35 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.57 2006-07-25 13:22:27 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.56 $ |
*@version $Revision: 1.57 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
162,17 → 162,27 |
} |
} |
} |
$requete = 'SELECT * FROM bazar_fiche WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
|
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) |
: ''; |
|
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bf_ce_nature']; |
|
//on verifie si l'utilisateur est administrateur |
$est_admin=0; |
$requete='SELECT bn_id_nature, bn_template, bn_commentaire FROM bazar_nature WHERE bn_id_nature="'.$GLOBALS['_BAZAR_']['typeannonce'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$id_nature = $result['bn_id_nature']; |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $result['bn_template']; |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $result['bn_commentaire']; |
if ($GLOBALS['AUTH']->getAuth()) { |
$requete='SELECT bn_id_nature FROM bazar_nature WHERE bn_label_nature="'.$GLOBALS['_BAZAR_']['typeannonce'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$result = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$id_nature = $result['bn_id_nature']; |
if ((niveau_droit($result['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='administrateur') |
or(niveau_droit('0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur')) |
{ |
185,16 → 195,10 |
} |
//affiche le texte sinon |
else { |
$res .= '<h2 class="BAZ_titre">'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2>'."\n"; |
//$res .= '<h2 class="BAZ_titre">'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2>'."\n"; |
} |
$res .= '<div class="BAZ_cadre_fiche">'."\n"; |
$requete = 'SELECT * FROM bazar_fiche WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
|
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) |
: ''; |
|
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$GLOBALS['_BAZAR_']['annonceur'] = $ligne['bf_ce_utilisateur'] ; |
//si le template existe, on genere le template |
if ((file_exists(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'))) { |
308,7 → 312,7 |
} |
|
//informations complementaires (id fiche, etat publication,... ) |
if ($danslappli==1) { |
if ($danslappli==1) { |
if ($ligne['bf_statut_fiche']==1 && $GLOBALS['_BAZAR_']['appropriation']!=1 ) { |
$res .= '<span class="rubrique">'.BAZ_PUBLIEE.':</span> '.BAZ_DU.' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_debut_validite_fiche'])).' '.BAZ_AU.' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_fin_validite_fiche'])).'<br />'."\n"; |
} |
917,8 → 921,8 |
$requete .= '1 ' ; |
} |
|
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']) ; |
if ($valide!=0) { |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']) ; |
if ($utilisateur->isSuperAdmin()) { |
$req_where=1; |
} else { |
1001,6 → 1005,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.56 2006/07/18 14:13:35 alexandre_tb |
* Ajout d identifiant HTML |
* |
* Revision 1.55 2006/07/04 14:29:18 alexandre_tb |
* Ajout du bouton supprimer pour les administrateurs |
* |