Subversion Repositories Applications.bazar

Rev

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

Rev 196 Rev 201
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.60.2.10 2007-03-06 09:41:15 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.60.2.11 2007-03-07 17:20:19 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.60.2.10 $
31
*@version       $Revision: 1.60.2.11 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 460... Line 460...
460
		$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
460
		$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
461
		$res .= $form_commentaire->toHTML();
461
		$res .= $form_commentaire->toHTML();
462
		$res .= '</div>'."\n";
462
		$res .= '</div>'."\n";
463
	}
463
	}
Line -... Line 464...
-
 
464
	
-
 
465
	// Nettoyage de l'url
-
 
466
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
-
 
467
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
-
 
468
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
464
	
469
	$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
465
	return $res ;
470
	return $res ;
Line 466... Line 471...
466
}
471
}
Line 524... Line 529...
524
			}  
529
			}  
525
		}
530
		}
526
	}
531
	}
527
	else $res = BAZ_PAS_D_ANNONCES;
532
	else $res = BAZ_PAS_D_ANNONCES;
Line -... Line 533...
-
 
533
	
-
 
534
	// Nettoyage de l'url
-
 
535
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
528
	
536
	
529
	return $res;
537
	return $res;
Line 530... Line 538...
530
}
538
}
531
 
539
 
Line 684... Line 692...
684
		$xml .= XML_Util::createEndElement ('item');
692
		$xml .= XML_Util::createEndElement ('item');
Line 685... Line 693...
685
 
693
 
686
	}
694
	}
687
	$xml .= XML_Util::createEndElement ('channel');
695
	$xml .= XML_Util::createEndElement ('channel');
-
 
696
	$xml .= XML_Util::createEndElement('rss') ;
-
 
697
 
-
 
698
	// Nettoyage de l'url
-
 
699
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
-
 
700
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
688
	$xml .= XML_Util::createEndElement('rss') ;
701
	
689
	return $xml;
702
	return $xml;
Line 690... Line 703...
690
}
703
}
Line 826... Line 839...
826
			
839
			
827
			if (isset($_REQUEST['recherche_avancee']) && $_REQUEST['recherche_avancee']==1) {
840
			if (isset($_REQUEST['recherche_avancee']) && $_REQUEST['recherche_avancee']==1) {
828
				foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur); 
841
				foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur); 
829
				$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '0');
842
				$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '0');
-
 
843
				$lien_recherche_de_base = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_DE_BASE.'</a><br />';
830
				$lien_recherche_de_base = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_DE_BASE.'</a><br />';
844
				foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->removeQueryString($cle);
831
				//lien recherche de base
845
				//lien recherche de base
832
				labelhtml($formtemplate,'',$lien_recherche_de_base,'','','','','');		
846
				labelhtml($formtemplate,'',$lien_recherche_de_base,'','','','','');		
Line 833... Line 847...
833
			}
847
			}
Line 842... Line 856...
842
			
856
			
843
		}
857
		}
844
		else {
858
		else {
845
			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); 
846
			$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 />';
847
			$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);
848
		}		 	
863
		}		 	
Line 849... Line 864...
849
	}
864
	}
850
	
865
	
Line 943... Line 958...
943
		$GLOBALS['_BAZAR_']['url']->addQueryString('annonce', $typeannonce);
958
		$GLOBALS['_BAZAR_']['url']->addQueryString('annonce', $typeannonce);
944
		$GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature', $GLOBALS['_BAZAR_']['categorie_nature']);
959
		$GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature', $GLOBALS['_BAZAR_']['categorie_nature']);
945
		$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()).
960
		$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()).
946
                '" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
961
                '" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
947
	}
962
	}
-
 
963
	
-
 
964
	// Nettoyage de l'url
-
 
965
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
-
 
966
	$GLOBALS['_BAZAR_']['url']->removeQueryString('annonce');
-
 
967
	$GLOBALS['_BAZAR_']['url']->removeQueryString('categorie_nature');
-
 
968
	$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
-
 
969
	
948
	return $res;
970
	return $res;
949
}
971
}
Line 950... Line 972...
950
 
972
 
951
/**
973
/**
Line 1046... Line 1068...
1046
		$res .= '</li>';
1068
		$res .= '</li>';
1047
	}
1069
	}
1048
	$res .= '</ul>';
1070
	$res .= '</ul>';
1049
	$res .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n";
1071
	$res .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n";
Line -... Line 1072...
-
 
1072
 
-
 
1073
	// Nettoyage de l'url
-
 
1074
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
-
 
1075
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
-
 
1076
	$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
-
 
1077
	$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
1050
 
1078
 
1051
	return $res ;
1079
	return $res ;
Line 1052... Line 1080...
1052
}
1080
}
1053
 
1081
 
1054
/* +--Fin du code ----------------------------------------------------------------------------------------+
1082
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
1083
*
-
 
1084
* $Log: not supported by cvs2svn $
-
 
1085
* Revision 1.60.2.10  2007/03/06 09:41:15  alexandre_tb
1055
*
1086
* backport de corrections de bugs de la branche principale
1056
* $Log: not supported by cvs2svn $
1087
*
1057
* Revision 1.60.2.9  2007/02/27 15:32:40  alexandre_tb
1088
* Revision 1.60.2.9  2007/02/27 15:32:40  alexandre_tb
1058
* utilisation de la fonction xmlEntities pour transformer les &amp; en &#...;
1089
* utilisation de la fonction xmlEntities pour transformer les &amp; en &#...;
1059
* fixe les plantages des flux rss lorsque des guillemets ou des esperluettes étaient présents
1090
* fixe les plantages des flux rss lorsque des guillemets ou des esperluettes étaient présents