Subversion Repositories Applications.bazar

Rev

Rev 94 | Rev 96 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 95
Line 469... Line 469...
469
		$chaine = '';
469
		$chaine = '';
470
		foreach ($typeannonce as $valeur) $chaine .= '"'.$valeur.'",' ;
470
		foreach ($typeannonce as $valeur) $chaine .= '"'.$valeur.'",' ;
471
		$requete .= substr ($chaine, 0, strlen ($chaine)-1) ; 
471
		$requete .= substr ($chaine, 0, strlen ($chaine)-1) ; 
472
		$requete .= ')';
472
		$requete .= ') ';
473
	}
473
	}
-
 
474
	$utilisateur = new Utilisateur_bazar ($GLOBALS['AUTH']) ;
474
	if ($valide!=0) {
475
	if ($valide!=0) {
-
 
476
		if ($req_where==1) {
475
		if ($req_where==1) {$requete .= ' AND ';}
477
			$requete .= ' AND ';
-
 
478
		}
476
		if ($GLOBALS['AUTH']->getAuth() && niveau_droit(0,$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))!='superadministrateur') {
479
		if ($utilisateur->isSuperAdmin()) {
477
			$req_where=1;$requete .= '1' ;	
480
			$req_where=1;	
478
		} else {
481
		} else {
479
			
-
 
480
			$requete .= '(bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00")'.
482
			$requete .= '(bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00")'.
481
						' AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") AND bn_id_nature=bf_ce_nature';
483
						' AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") AND bn_id_nature=bf_ce_nature';
482
			
-
 
483
		}
484
		}
484
	}
485
	}
485
	else $nomflux .= BAZ_A_MODERER;
486
	else $nomflux .= BAZ_A_MODERER;
486
	if ($emetteur!='' && $emetteur!='tous') {
487
	if ($emetteur!='' && $emetteur!='tous') {
487
		if ($req_where==1) {$requete .= ' AND ';}
488
		if ($req_where==1) {$requete .= ' AND ';}