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.11 2008-03-17 11:03:02 jp_milcent Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.12 2008-03-17 14:02:53 jp_milcent 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.11 $
|
31 |
*@version $Revision: 1.99.2.12 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 464... |
Line 464... |
464 |
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC';
|
464 |
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC';
|
465 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
465 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
466 |
if (DB::isError ($resultat)) {
|
466 |
if (DB::isError ($resultat)) {
|
467 |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo();
|
467 |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo();
|
468 |
}
|
468 |
}
|
469 |
if ($resultat->numRows()>0) {
|
469 |
if ($resultat->numRows() > 0) {
|
- |
|
470 |
// Titre avec nombre de commentaires
|
470 |
$res .= BAZ_IL_Y_A.$resultat->numRows().' ';
|
471 |
$res .= '<p>'.BAZ_IL_Y_A.$resultat->numRows().' ';
|
- |
|
472 |
// Ajout du "s" ou pas
|
471 |
if ($resultat->numRows()==1) $res .= BAZ_COMMENTAIRE.'<br />'."\n";
|
473 |
$res .= ($resultat->numRows() == 1) ? BAZ_COMMENTAIRE : BAZ_COMMENTAIRES;
|
472 |
else $res .= BAZ_COMMENTAIRES.'<br />'."\n";
|
474 |
$res .= '</p>'."\n";
|
- |
|
475 |
|
- |
|
476 |
// Info pour ajotuer ces commentaires si on n'est pas identifié
|
- |
|
477 |
if (!$GLOBALS['AUTH']->getAuth()) {
|
- |
|
478 |
$res .= '<p class="information">'.BAZ_COMMENTAIRE_AUTH.'</p>';
|
- |
|
479 |
}
|
- |
|
480 |
|
- |
|
481 |
// Affichages des commentaires
|
473 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
482 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
474 |
$res .= '<div class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
483 |
$res .= '<p class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
475 |
//affichage du commentaire
|
484 |
// Affichage du commentaire
|
476 |
$res .= $ligne['bc_commentaire'].'<br />'."\n";
|
485 |
$res .= $ligne['bc_commentaire'].'<br />'."\n";
|
477 |
$res .= '<div class="BAZ_commentaire_admin">'.BAZ_PAR.' : <strong>'.$ligne['bc_nom'].'</strong>'.BAZ_ECRIT_LE.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bc_date']));
|
486 |
$res .= '<span class="BAZ_commentaire_admin">'.BAZ_PAR.' : <strong>'.$ligne['bc_nom'].'</strong>'.BAZ_ECRIT_LE.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bc_date']));
|
478 |
//pour les identifies seulement, administrateurs de la rubrique ou superadmins
|
487 |
// Pour les identifies seulement, administrateurs de la rubrique ou superadmins
|
479 |
if ($est_admin==1) {
|
488 |
if ($est_admin == 1) {
|
480 |
$url_comment= $GLOBALS['_BAZAR_']['url'];
|
489 |
$url_comment= $GLOBALS['_BAZAR_']['url'];
|
481 |
$url_comment->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE);
|
490 |
$url_comment->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE);
|
482 |
$url_comment->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
|
491 |
$url_comment->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
|
483 |
$url_comment->addQueryString('id_commentaire', $ligne['bc_id_commentaire']);
|
492 |
$url_comment->addQueryString('id_commentaire', $ligne['bc_id_commentaire']);
|
484 |
$res .= ' <a href="'.$url_comment->getURL().'">'.BAZ_SUPPRIMER.'</a>'."\n";
|
493 |
$res .= ' <a href="'.$url_comment->getURL().'">'.BAZ_SUPPRIMER.'</a>'."\n";
|
485 |
}
|
494 |
}
|
486 |
$res .= '</div>'."\n";
|
495 |
$res .= '</span>'."\n";
|
487 |
$res .= '</div>'."\n";
|
496 |
$res .= '</p>'."\n";
|
488 |
}
|
497 |
}
|
489 |
}else {
|
498 |
} else {
|
490 |
$res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n";
|
499 |
$res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n";
|
491 |
}
|
500 |
}
|
Line 492... |
Line 501... |
492 |
|
501 |
|
493 |
//formulaire des commentaires
|
502 |
//formulaire des commentaires
|
Line 810... |
Line 819... |
810 |
$xml .= "\r\n ";
|
819 |
$xml .= "\r\n ";
|
811 |
$xml .= XML_Util::createTag ('guid', null, utf8_encode(html_entity_decode($GLOBALS['_BAZAR_']['url']->getUrl())));
|
820 |
$xml .= XML_Util::createTag ('guid', null, utf8_encode(html_entity_decode($GLOBALS['_BAZAR_']['url']->getUrl())));
|
812 |
$xml .= "\r\n ";
|
821 |
$xml .= "\r\n ";
|
813 |
$xml .= XML_Util::createTag ('description', null, utf8_encode(html_entity_decode(BAZ_PAS_D_ANNONCES)));
|
822 |
$xml .= XML_Util::createTag ('description', null, utf8_encode(html_entity_decode(BAZ_PAS_D_ANNONCES)));
|
814 |
$xml .= "\r\n ";
|
823 |
$xml .= "\r\n ";
|
815 |
$xml .= XML_Util::createTag ('pubDate', null, strftime('%a, %d %b %Y %H:%M:%S GMT',strtotime("01/01/%Y")));
|
824 |
$xml .= XML_Util::createTag ('pubDate', null, strftime('%a, %d %b %Y %H:%M:%S GMT',time()));
|
816 |
$xml .= "\r\n ";
|
825 |
$xml .= "\r\n ";
|
817 |
$xml .= XML_Util::createEndElement ('item');
|
826 |
$xml .= XML_Util::createEndElement ('item');
|
818 |
}
|
827 |
}
|
819 |
$xml .= "\r\n ";
|
828 |
$xml .= "\r\n ";
|
820 |
$xml .= XML_Util::createEndElement ('channel');
|
829 |
$xml .= XML_Util::createEndElement ('channel');
|
Line 1254... |
Line 1263... |
1254 |
}
|
1263 |
}
|
Line 1255... |
Line 1264... |
1255 |
|
1264 |
|
1256 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1265 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1257 |
*
|
1266 |
*
|
- |
|
1267 |
* $Log: not supported by cvs2svn $
|
- |
|
1268 |
* Revision 1.99.2.11 2008-03-17 11:03:02 jp_milcent
|
- |
|
1269 |
* Ajout de l'authentification nécessaire pour déposer des commentaires.
|
- |
|
1270 |
* Corrections sur la gestion des paramêtres dans les urls (compatibilité applette Identification et Moteur de Recherche).
|
1258 |
* $Log: not supported by cvs2svn $
|
1271 |
*
|
1259 |
* Revision 1.99.2.10 2008-02-04 13:03:09 alexandre_tb
|
1272 |
* Revision 1.99.2.10 2008-02-04 13:03:09 alexandre_tb
|
1260 |
* ajout d un class css dans les h2
|
1273 |
* ajout d un class css dans les h2
|
1261 |
*
|
1274 |
*
|
1262 |
* Revision 1.99.2.9 2008-02-01 16:24:10 florian
|
1275 |
* Revision 1.99.2.9 2008-02-01 16:24:10 florian
|