Subversion Repositories Applications.bazar

Rev

Rev 357 | Rev 361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 357 Rev 360
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.6 2007-12-14 15:55:38 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.7 2008-01-11 14:09:17 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.99.2.6 $
31
*@version       $Revision: 1.99.2.7 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 117... Line 117...
117
function baz_voir_fiche($danslappli, $idfiche='') {
117
function baz_voir_fiche($danslappli, $idfiche='') {
118
	$res='';
118
	$res='';
119
	if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche'];
119
	if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche'];
120
	if ($idfiche!='') $GLOBALS['_BAZAR_']['id_fiche']=$idfiche;	
120
	if ($idfiche!='') $GLOBALS['_BAZAR_']['id_fiche']=$idfiche;	
121
	$url= $GLOBALS['_BAZAR_']['url'];
121
	$url= $GLOBALS['_BAZAR_']['url'];
122
	$url->addQueryString('action', BAZ_VOIR_FICHE);
122
	$url->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE);
123
	$url->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
123
	$url->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
124
	$url = preg_replace ('/&amp;/', '&', $url->getURL()) ;
124
	$url = preg_replace ('/&amp;/', '&', $url->getURL()) ;
Line 125... Line 125...
125
	
125
	
126
	//cas ou la fiche a ete validee
126
	//cas ou la fiche a ete validee
Line 364... Line 364...
364
			if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
364
			if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
365
				$res .= '<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
365
				$res .= '<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
366
				$res .= '<ul>'."\n";
366
				$res .= '<ul>'."\n";
367
				if ( $est_admin ) {					
367
				if ( $est_admin ) {					
368
					$lien_publie = &$GLOBALS['_BAZAR_']['url'];
368
					$lien_publie = &$GLOBALS['_BAZAR_']['url'];
369
					$lien_publie->addQueryString('action', BAZ_VOIR_FICHE);
369
					$lien_publie->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE);
370
					$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
370
					$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
371
					$lien_publie->addQueryString('typeannonce', $ligne['bf_ce_nature']);
371
					$lien_publie->addQueryString('typeannonce', $ligne['bf_ce_nature']);
372
					if ($GLOBALS['_BAZAR_']['fiche_valide']==0||$GLOBALS['_BAZAR_']['fiche_valide']==2) {
372
					if ($GLOBALS['_BAZAR_']['fiche_valide']==0||$GLOBALS['_BAZAR_']['fiche_valide']==2) {
373
						$lien_publie->addQueryString('publiee', 1);
373
						$lien_publie->addQueryString('publiee', 1);
374
						$label_publie=BAZ_VALIDER_LA_FICHE;
374
						$label_publie=BAZ_VALIDER_LA_FICHE;
Line 380... Line 380...
380
					}
380
					}
381
					$res .= '<li class="BAZ_liste'.$class_publie.'"><a href="'.$lien_publie->getURL().'">'.$label_publie.'</a></li>'."\n";				
381
					$res .= '<li class="BAZ_liste'.$class_publie.'"><a href="'.$lien_publie->getURL().'">'.$label_publie.'</a></li>'."\n";				
382
					$lien_publie->removeQueryString('publiee');
382
					$lien_publie->removeQueryString('publiee');
383
				}
383
				}
384
				$lien_modifier=$GLOBALS['_BAZAR_']['url'];
384
				$lien_modifier=$GLOBALS['_BAZAR_']['url'];
385
				$lien_modifier->addQueryString('action', BAZ_ACTION_MODIFIER);
385
				$lien_modifier->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER);
386
				$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
386
				$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
387
				$lien_modifier->addQueryString('typeannonce', $ligne['bf_ce_nature']);
387
				$lien_modifier->addQueryString('typeannonce', $ligne['bf_ce_nature']);
388
				$res .= '<li class="BAZ_liste_modifier"><a href="'.$lien_modifier->getURL().'" id="modifier_fiche">'.BAZ_MODIFIER_LA_FICHE.'</a></li>'."\n";
388
				$res .= '<li class="BAZ_liste_modifier"><a href="'.$lien_modifier->getURL().'" id="modifier_fiche">'.BAZ_MODIFIER_LA_FICHE.'</a></li>'."\n";
389
				$lien_supprimer=$GLOBALS['_BAZAR_']['url'];
389
				$lien_supprimer=$GLOBALS['_BAZAR_']['url'];
390
				$lien_supprimer->addQueryString('action', BAZ_ACTION_SUPPRESSION);
390
				$lien_supprimer->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION);
391
				$lien_supprimer->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
391
				$lien_supprimer->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
392
				$lien_supprimer->addQueryString('typeannonce', $ligne['bf_ce_nature']);
392
				$lien_supprimer->addQueryString('typeannonce', $ligne['bf_ce_nature']);
393
				$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
393
				$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
394
				$res .= '</ul>'."\n";
394
				$res .= '</ul>'."\n";
395
				$res .= '</div>'."\n";
395
				$res .= '</div>'."\n";
Line 823... Line 823...
823
*
823
*
824
*   @return  string    le code HTML a afficher
824
*   @return  string    le code HTML a afficher
825
*/
825
*/
826
function baz_liste($typeannonce='toutes') {
826
function baz_liste($typeannonce='toutes') {
827
	//creation du lien pour le formulaire de recherche
827
	//creation du lien pour le formulaire de recherche
828
	$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
828
	$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_TOUTES_ANNONCES);
829
	if (isset($_REQUEST['recherche_avancee'])) $GLOBALS['_BAZAR_']['url']->addQueryString ('recherche_avancee', $_REQUEST['recherche_avancee']);
829
	if (isset($_REQUEST['recherche_avancee'])) $GLOBALS['_BAZAR_']['url']->addQueryString ('recherche_avancee', $_REQUEST['recherche_avancee']);
830
	$lien_formulaire = preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()) ;
830
	$lien_formulaire = preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()) ;
831
	$formtemplate = new HTML_QuickForm('formulaire', 'post', $lien_formulaire) ;
831
	$formtemplate = new HTML_QuickForm('formulaire', 'post', $lien_formulaire) ;
832
	$squelette =& $formtemplate->defaultRenderer();
832
	$squelette =& $formtemplate->defaultRenderer();
833
   	$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table>'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n");
833
   	$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table>'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n");
Line 1245... Line 1245...
1245
}
1245
}
Line 1246... Line 1246...
1246
 
1246
 
1247
/* +--Fin du code ----------------------------------------------------------------------------------------+
1247
/* +--Fin du code ----------------------------------------------------------------------------------------+
1248
*
1248
*
-
 
1249
* $Log: not supported by cvs2svn $
-
 
1250
* Revision 1.99.2.6  2007-12-14 15:55:38  alexandre_tb
-
 
1251
* les commentaires peuvent maintenant apparaitre dans le moteur de recherche et dans les fiches, il faut mettre a 1 respectivement le champs recherche et obligatoire
1249
* $Log: not supported by cvs2svn $
1252
*
1250
* Revision 1.99.2.5  2007-12-10 12:57:34  jp_milcent
1253
* Revision 1.99.2.5  2007-12-10 12:57:34  jp_milcent
1251
* Correction du problèmes des & non remplacées par des &amp;
1254
* Correction du problèmes des & non remplacées par des &amp;
1252
*
1255
*
1253
* Revision 1.99.2.4  2007-12-04 08:58:26  alexandre_tb
1256
* Revision 1.99.2.4  2007-12-04 08:58:26  alexandre_tb