| 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.69 2007-03-06 09:39:00 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.70 2007-03-08 15:12:13 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.69 $
|
31 |
*@version $Revision: 1.70 $
|
| 32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
| 33 |
*/
|
33 |
*/
|
| Line 34... |
Line 34... |
| 34 |
|
34 |
|
| 35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 459... |
Line 459... |
| 459 |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
|
459 |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
|
| 460 |
$res .= $form_commentaire->toHTML();
|
460 |
$res .= $form_commentaire->toHTML();
|
| 461 |
$res .= '</div>'."\n";
|
461 |
$res .= '</div>'."\n";
|
| 462 |
}
|
462 |
}
|
| Line -... |
Line 463... |
| - |
|
463 |
|
| - |
|
464 |
// Nettoyage de l'url
|
| - |
|
465 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
466 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| - |
|
467 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
|
| 463 |
|
468 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
|
| 464 |
return $res ;
|
469 |
return $res ;
|
| Line 465... |
Line 470... |
| 465 |
}
|
470 |
}
|
| Line 523... |
Line 528... |
| 523 |
}
|
528 |
}
|
| 524 |
}
|
529 |
}
|
| 525 |
}
|
530 |
}
|
| 526 |
else $res = BAZ_PAS_D_ANNONCES;
|
531 |
else $res = BAZ_PAS_D_ANNONCES;
|
| Line -... |
Line 532... |
| - |
|
532 |
|
| - |
|
533 |
// Nettoyage de l'url
|
| - |
|
534 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| 527 |
|
535 |
|
| 528 |
return $res;
|
536 |
return $res;
|
| Line 529... |
Line 537... |
| 529 |
}
|
537 |
}
|
| 530 |
|
538 |
|
| Line 552... |
Line 560... |
| 552 |
if (!is_array ($typeannonce) && $typeannonce!='' and $typeannonce!='toutes') {
|
560 |
if (!is_array ($typeannonce) && $typeannonce!='' and $typeannonce!='toutes') {
|
| 553 |
if ($req_where==1) {$requete .= ' AND ';}
|
561 |
if ($req_where==1) {$requete .= ' AND ';}
|
| 554 |
$requete .= 'bf_ce_nature='.$typeannonce.' and bf_ce_nature=bn_id_nature ';;
|
562 |
$requete .= 'bf_ce_nature='.$typeannonce.' and bf_ce_nature=bn_id_nature ';;
|
| 555 |
$req_where=1;
|
563 |
$req_where=1;
|
| 556 |
//le nom du flux devient le type d'annonce
|
564 |
//le nom du flux devient le type d'annonce
|
| 557 |
$requete_nom_flux = 'select bn_label_nature from bazar_nature where bn_id_nature='.$typeannonce ;
|
565 |
$requete_nom_flux = 'select bn_label_nature from bazar_nature where bn_id_nature = '.$typeannonce;
|
| 558 |
$nomflux = $GLOBALS['_BAZAR_']['db']->getOne($requete_nom_flux) ;
|
566 |
$nomflux = $GLOBALS['_BAZAR_']['db']->getOne($requete_nom_flux) ;
|
| 559 |
}
|
567 |
}
|
| 560 |
// Cas où il y plusieurs type d annonce demande
|
568 |
// Cas où il y plusieurs type d annonce demande
|
| 561 |
if (is_array ($typeannonce)) {
|
569 |
if (is_array ($typeannonce)) {
|
| 562 |
if ($req_where==1) {$requete .= ' AND ';}
|
570 |
if ($req_where==1) {$requete .= ' AND ';}
|
| Line 683... |
Line 691... |
| 683 |
$xml .= XML_Util::createEndElement ('item');
|
691 |
$xml .= XML_Util::createEndElement ('item');
|
| Line 684... |
Line 692... |
| 684 |
|
692 |
|
| 685 |
}
|
693 |
}
|
| 686 |
$xml .= XML_Util::createEndElement ('channel');
|
694 |
$xml .= XML_Util::createEndElement ('channel');
|
| - |
|
695 |
$xml .= XML_Util::createEndElement('rss') ;
|
| - |
|
696 |
$xml .= XML_Util::createEndElement ('channel');
|
| - |
|
697 |
$xml .= XML_Util::createEndElement('rss') ;
|
| - |
|
698 |
|
| - |
|
699 |
// Nettoyage de l'url
|
| - |
|
700 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
701 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| 687 |
$xml .= XML_Util::createEndElement('rss') ;
|
702 |
|
| 688 |
return $xml;
|
703 |
return $xml;
|
| Line 689... |
Line 704... |
| 689 |
}
|
704 |
}
|
| Line 841... |
Line 856... |
| 841 |
|
856 |
|
| 842 |
}
|
857 |
}
|
| 843 |
else {
|
858 |
else {
|
| 844 |
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur);
|
859 |
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur);
|
| 845 |
$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '1');
|
860 |
$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '1');
|
| - |
|
861 |
$lien_recherche_avancee = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_AVANCEE.'</a><br />';
|
| 846 |
$lien_recherche_avancee = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_AVANCEE.'</a><br />';
|
862 |
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->removeQueryString($cle);
|
| 847 |
}
|
863 |
}
|
| Line 848... |
Line 864... |
| 848 |
}
|
864 |
}
|
| 849 |
|
865 |
|
| Line 945... |
Line 961... |
| 945 |
else {$valides=1;}
|
961 |
else {$valides=1;}
|
| 946 |
//generation de la liste de flux a afficher
|
962 |
//generation de la liste de flux a afficher
|
| 947 |
if (!isset($_REQUEST['personne'])) $_REQUEST['personne']='tous';
|
963 |
if (!isset($_REQUEST['personne'])) $_REQUEST['personne']='tous';
|
| 948 |
$res .= baz_liste_pagine_HTML($typedefiches, '', $_REQUEST['personne'], $valides, $requeteSQL, $requeteFrom, $requeteWhere);
|
964 |
$res .= baz_liste_pagine_HTML($typedefiches, '', $_REQUEST['personne'], $valides, $requeteSQL, $requeteFrom, $requeteWhere);
|
| 949 |
}
|
965 |
}
|
| 950 |
|
966 |
|
| 951 |
return $res;
|
967 |
// Nettoyage de l'url
|
| - |
|
968 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
969 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('annonce');
|
| - |
|
970 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('categorie_nature');
|
| - |
|
971 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
|
| 952 |
|
972 |
|
| - |
|
973 |
return $res;
|
| 953 |
}
|
974 |
}
|
| Line 954... |
Line 975... |
| 954 |
|
975 |
|
| 955 |
/**
|
976 |
/**
|
| 956 |
* Cette fonction renvoie du HTML
|
977 |
* Cette fonction renvoie du HTML
|
| Line 1041... |
Line 1062... |
| 1041 |
eval ($chaine) ;
|
1062 |
eval ($chaine) ;
|
| 1042 |
$res .= ob_get_contents();
|
1063 |
$res .= ob_get_contents();
|
| 1043 |
ob_end_clean() ;
|
1064 |
ob_end_clean() ;
|
| Line -... |
Line 1065... |
| - |
|
1065 |
|
| - |
|
1066 |
|
| - |
|
1067 |
// Nettoyage de l'url
|
| - |
|
1068 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
1069 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| - |
|
1070 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
|
| 1044 |
|
1071 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
|
| 1045 |
|
1072 |
|
| Line 1046... |
Line 1073... |
| 1046 |
return $res ;
|
1073 |
return $res ;
|
| 1047 |
}
|
1074 |
}
|
| 1048 |
|
1075 |
|
| - |
|
1076 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| - |
|
1077 |
*
|
| - |
|
1078 |
* $Log: not supported by cvs2svn $
|
| - |
|
1079 |
* Revision 1.60.2.11 2007/03/07 17:20:19 jp_milcent
|
| - |
|
1080 |
* Ajout du nettoyage systématique des URLs.
|
| - |
|
1081 |
*
|
| - |
|
1082 |
* Revision 1.60.2.10 2007/03/06 09:41:15 alexandre_tb
|
| - |
|
1083 |
* backport de corrections de bugs de la branche principale
|
| - |
|
1084 |
*
|
| 1049 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1085 |
* Revision 1.69 2007/03/06 09:39:00 alexandre_tb
|
| 1050 |
*
|
1086 |
* correction de bug sur les jointures et sur les flux rss
|
| 1051 |
* $Log: not supported by cvs2svn $
|
1087 |
*
|
| 1052 |
* Revision 1.68 2007/03/05 10:27:06 alexandre_tb
|
1088 |
* Revision 1.68 2007/03/05 10:27:06 alexandre_tb
|
| 1053 |
* ajout d identifiant dans les span qui affiche le detail d une fiche.
|
1089 |
* ajout d identifiant dans les span qui affiche le detail d une fiche.
|
| 1054 |
* ajout d un modele pour les fiches -> du code a ete deplace dans
|
1090 |
* ajout d un modele pour les fiches -> du code a ete deplace dans
|
| 1055 |
* bazar_template
|
1091 |
* bazar_template
|
| - |
|
1092 |
*
|
| - |
|
1093 |
* Revision 1.67 2007/02/28 10:18:56 alexandre_tb
|
| - |
|
1094 |
* backport de bug depuis la 1.60 de menes
|
| - |
|
1095 |
*
|
| - |
|
1096 |
* Revision 1.60.2.9 2007/02/27 15:32:40 alexandre_tb
|
| - |
|
1097 |
* utilisation de la fonction xmlEntities pour transformer les & en &#...;
|
| - |
|
1098 |
* fixe les plantages des flux rss lorsque des guillemets ou des esperluettes étaient présents
|
| - |
|
1099 |
*
|
| - |
|
1100 |
* Revision 1.60.2.8 2007/02/27 15:11:00 alexandre_tb
|
| - |
|
1101 |
* correction d une jointure dans la requete pour les flux rss
|
| - |
|
1102 |
* utilisation de la librairie XML_Util de pear pour generer le flux RSS -> plus clair
|
| - |
|
1103 |
*
|
| - |
|
1104 |
* Revision 1.60.2.7 2007/02/15 17:39:00 jp_milcent
|
| - |
|
1105 |
* Remise dans le code d'un bogue...
|
| - |
|
1106 |
* A corriger!
|
| - |
|
1107 |
*
|
| 1056 |
*
|
1108 |
* Revision 1.60.2.6 2007/02/15 13:42:16 jp_milcent
|
| 1057 |
* Revision 1.67 2007/02/28 10:18:56 alexandre_tb
|
1109 |
* Utilisation de IN à la place du = dans les requêtes traitant les catégories de fiches.
|
| 1058 |
* backport de bug depuis la 1.60 de menes
|
1110 |
* Permet d'utiliser la syntaxe 1,2,3 dans la configuration de categorie_nature.
|
| - |
|
1111 |
*
|
| - |
|
1112 |
* Revision 1.64 2007/02/02 14:00:41 alexandre_tb
|
| - |
|
1113 |
* mise en place d'un template pour l'affichage du moteur de recherche
|
| - |
|
1114 |
*
|
| - |
|
1115 |
* Revision 1.60.2.5 2007/02/02 13:46:54 alexandre_tb
|
| - |
|
1116 |
* correction bug sur une date
|
| - |
|
1117 |
*
|
| - |
|
1118 |
* Revision 1.60.2.4 2007/01/30 15:45:01 alexandre_tb
|
| - |
|
1119 |
* affichage de la date de création e la fiche lorsque la date de début de validité n'est plus bonne
|
| 1059 |
*
|
1120 |
*
|
| 1060 |
* Revision 1.64 2007/02/02 14:00:41 alexandre_tb
|
1121 |
* Revision 1.60.2.3 2007/01/29 10:53:46 alexandre_tb
|
| 1061 |
* mise en place d'un template pour l'affichage du moteur de recherche
|
1122 |
* Mise en place de la constante BAZ_DERNIERES_FICHES pour remplacer le label en francais dans baz_liste
|
| 1062 |
*
|
1123 |
*
|
| 1063 |
* Revision 1.63 2007/01/18 14:37:34 alexandre_tb
|
1124 |
* Revision 1.63 2007/01/18 14:37:34 alexandre_tb
|