19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.php,v 1.5 2005-09-30 12:22:54 florian Exp $ |
// CVS : $Id: bazar.fonct.php,v 1.6 2005-09-30 13:00:05 ddelon Exp $ |
/** |
* |
* Fonctions du module bazar |
30,7 → 30,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ $Date: 2005-09-30 12:22:54 $ |
*@version $Revision: 1.6 $ $Date: 2005-09-30 13:00:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
82,7 → 82,7 |
// Pour les administrateurs d'une rubrique, on affiche les fiches a valider de cette rubrique |
// On effectue une requete sur le bazar pour voir les fiches a administrer |
$res= '<h2>'.BAZ_ANNONCES_A_ADMINISTRER.'</h2>'; |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=0 AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' ORDER BY bf_date_maj_fiche DESC' ; |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=0 AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' or bn_ce_id_menu=0 ORDER BY bf_date_maj_fiche DESC' ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
158,7 → 158,7 |
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2>'."\n"; |
// requête pour voir si l'utilisateur a des fiches à son nom, classées par date de MAJ et nature d'annonce |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_ce_utilisateur='. $GLOBALS['id_user']. |
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC'; |
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.' or bn_ce_id_menu=0 ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
496,7 → 496,7 |
$res = ''; |
|
//requete pour obtenir le nom et la description des types d'annonce |
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition FROM bazar_nature WHERE bn_ce_id_menu=".$_REQUEST['menu']." ORDER BY bn_label_nature ASC"; |
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition FROM bazar_nature WHERE bn_ce_id_menu=".$_REQUEST['menu']." or bn_ce_id_menu=0 ORDER BY bn_label_nature ASC"; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
654,7 → 654,7 |
$res.= '<a href='.$lien_passer_superadmin->getURL().'>'.BAZ_PASSER_SUPERADMINISTRATEUR.'</a><br />'."\n"; |
|
//on cherche les différentes rubriques d'annonces |
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu; |
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu .' or bn_ce_id_menu=0'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
1047,7 → 1047,7 |
|
//requete pour obtenir l'id et le label des types d'annonces |
$requete = 'SELECT bn_id_nature, bn_label_nature '. |
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu; |
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu .' or bn_ce_id_menu=0'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
1150,7 → 1150,7 |
//requete pour obtenir l'id et le label des types d'annonces |
$requete = 'SELECT bn_label_nature '. |
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu. |
' ORDER BY bn_label_nature ASC'; |
' or bn_ce_id_menu=0 ORDER BY bn_label_nature ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
1329,6 → 1329,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5 2005/09/30 12:22:54 florian |
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL |
* |
* Revision 1.3 2005/07/21 19:03:12 florian |
* nouveautés bazar: templates fiches, correction de bugs, ... |
* |