Subversion Repositories Applications.papyrus

Rev

Rev 1464 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1464 Rev 1471
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.84 2007-06-25 09:56:55 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.85 2007-06-25 12:15:06 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.84 $
31
*@version       $Revision: 1.85 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 167... Line 167...
167
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
167
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
168
	(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
168
	(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
169
	    : '';
169
	    : '';
Line 170... Line 170...
170
	
170
	
171
	$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
171
	$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
172
	if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bn_label_nature'];
172
	if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bf_ce_nature'];
173
	if (!isset($GLOBALS['_BAZAR_']['fiche_valide'])) $GLOBALS['_BAZAR_']['fiche_valide'] = $ligne['bf_statut_fiche'];
173
	if (!isset($GLOBALS['_BAZAR_']['fiche_valide'])) $GLOBALS['_BAZAR_']['fiche_valide'] = $ligne['bf_statut_fiche'];
174
	//on verifie si l'utilisateur est administrateur
174
	//on verifie si l'utilisateur est administrateur
Line 175... Line 175...
175
	$est_admin=0;
175
	$est_admin=0;
Line 1024... Line 1024...
1024
    	if (!isset($_REQUEST['recherche_effectuee'])) {
1024
    	if (!isset($_REQUEST['recherche_effectuee'])) {
1025
        	$res .= '<p class="zone_info">'.BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE.'</p>'."\n";
1025
        	$res .= '<p class="zone_info">'.BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE.'</p>'."\n";
1026
        	$GLOBALS['_BAZAR_']['url']->addQueryString('action',BAZ_VOIR_FLUX_RSS);
1026
        	$GLOBALS['_BAZAR_']['url']->addQueryString('action',BAZ_VOIR_FLUX_RSS);
1027
        	$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']);
1027
        	$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']);
1028
	        if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']);
1028
	        if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']);
1029
        	$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
1029
        //	$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
-
 
1030
		    $requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bn_ce_id_menu="'.$GLOBALS['_BAZAR_']['categorie_nature'].'" AND (bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00") AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") 
-
 
1031
			ORDER BY   bf_date_creation_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC';
-
 
1032
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete);
-
 
1033
		if (DB::isError($resultat)) {
-
 
1034
			return ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
1035
		}
-
 
1036
	        if($resultat->numRows() != 0) {
-
 
1037
			$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>';	
-
 
1038
			$res .= '<ul class="liste_rss">';
-
 
1039
			while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC))
-
 
1040
			{
-
 
1041
		    		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE);
-
 
1042
		    		$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']);
-
 
1043
		    		$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>';
-
 
1044
			}
-
 
1045
			$res .= '</ul>';
-
 
1046
		}
1030
    	}
1047
    	}
1031
	}
1048
	}
Line 1185... Line 1202...
1185
}
1202
}
Line 1186... Line 1203...
1186
 
1203
 
1187
/* +--Fin du code ----------------------------------------------------------------------------------------+
1204
/* +--Fin du code ----------------------------------------------------------------------------------------+
1188
*
1205
*
-
 
1206
* $Log: not supported by cvs2svn $
-
 
1207
* Revision 1.84  2007-06-25 09:56:55  alexandre_tb
-
 
1208
* correction de bug
1189
* $Log: not supported by cvs2svn $
1209
*
1190
* Revision 1.83  2007-06-04 15:26:02  alexandre_tb
1210
* Revision 1.83  2007-06-04 15:26:02  alexandre_tb
1191
* remplacement d un die en return
1211
* remplacement d un die en return
1192
*
1212
*
1193
* Revision 1.82  2007/04/20 12:47:42  florian
1213
* Revision 1.82  2007/04/20 12:47:42  florian