Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 421 → Rev 422

/branches/v3.0_(aha)/bazar.php
67,6 → 67,12
$_GET[BAZ_VARIABLE_VOIR] = BAZ_VOIR_CONSULTER;
}
 
if(!isset($GLOBALS['_BAZAR_']['mois']))
{
$GLOBALS['mois'] = array (1 => BAZ_JANVIER, 2 => BAZ_FEVRIER, 3 => BAZ_MARS, 4 => BAZ_AVRIL, 5 => BAZ_MAI, 6 => BAZ_JUIN,
7 => BAZ_JUILLET, 8 => BAZ_AOUT, 9 => BAZ_SEPTEMBRE, 10 => BAZ_OCTOBRE, 11 =>BAZ_NOVEMBRE,
12 => BAZ_DECEMBRE) ;
}
 
//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche)
if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) {
106,21 → 112,50
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
$GLOBALS['_BAZAR_']['id_typeannonce'] = $ligne->bf_ce_nature ;
$resultat->free();
}
if (isset($_REQUEST['typeannonce'])) {
}
if (isset($_REQUEST['typeannonce']) && $_REQUEST['typeannonce'] != '1,2,3,4') {
$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
$GLOBALS['_BAZAR_']['id_typeannonce'] = $_REQUEST['typeannonce'];
}
else
{
$GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ;
}
 
if (isset($_REQUEST['liste31'])) {
if($_REQUEST['liste31'] == "0")
{
$GLOBALS['_BAZAR_']['id_typeannonce']= 'toutes' ;
}
else
{
$GLOBALS['_BAZAR_']['id_typeannonce']= $_REQUEST['liste31'];
}
}
else
{
$GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ;
}
 
if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) {
if( $GLOBALS['_BAZAR_']['id_typeannonce'] == '1,2,3,4') {
$GLOBALS['_BAZAR_']['id_typeannonce'] = '1' ;
} else {
$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo';
$requete .= ' FROM bazar_nature WHERE bn_id_nature = '.$GLOBALS['_BAZAR_']['id_typeannonce'];
$typeAnnonce = false;
$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo '.
'FROM bazar_nature ';
if (isset($GLOBALS['_BAZAR_']['id_typeannonce']) && !empty($GLOBALS['_BAZAR_']['id_typeannonce']) && isset($GLOBALS['_BAZAR_']['id_typeannonce']) != 'toutes') {
$requete .= 'WHERE bn_id_nature = '.$GLOBALS['_BAZAR_']['id_typeannonce'];
$typeAnnonce = true;
}
if (isset($GLOBALS['_BAZAR_']['langue'])) {
$requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"';
if (!$typeAnnonce) {
$requete .= ' WHERE ';
} else {
$requete .= ' AND ';
}
$requete .= 'bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"';
}
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
133,9 → 168,37
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre'];
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];
}
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];
}
else
{
$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo '.
'FROM bazar_nature ';
$requete .= 'WHERE bn_id_nature = 1';
$typeAnnonce = true;
if (isset($GLOBALS['_BAZAR_']['langue'])) {
if (!$typeAnnonce) {
$requete .= ' WHERE ';
} else {
$requete .= ' AND ';
}
$requete .= 'bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"';
}
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
$GLOBALS['_BAZAR_']['typeannonce']= 'toutes' ;
$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition'];
$GLOBALS['_BAZAR_']['template']=$ligne['bn_template'];
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre'];
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];
}
 
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce'])) $GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ;
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |