Subversion Repositories Applications.bazar

Rev

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

Rev 98 Rev 105
Line 125... Line 125...
125
	if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
125
	if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
126
		$res .= '<img id="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$GLOBALS['_BAZAR_']['typeannonce'].'" />'.'<br />'."\n";
126
		$res .= '<img id="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$GLOBALS['_BAZAR_']['typeannonce'].'" />'.'<br />'."\n";
127
	}
127
	}
128
	//affiche le texte sinon
128
	//affiche le texte sinon
129
	else {
129
	else {
130
		$res .= '<h1 class="BAZ_titre">'.constant ($GLOBALS['_BAZAR_']['typeannonce']).'</h1>'."\n";
130
		$res .= '<h1 class="BAZ_titre">'.$GLOBALS['_BAZAR_']['typeannonce'].'</h1>'."\n";
131
	}
131
	}
132
	$res .= '<div class="BAZ_cadre_fiche">'."\n";
132
	$res .= '<div class="BAZ_cadre_fiche">'."\n";
133
	$res .= '<div class="BAZ_cadre_fiche_haut">'."\n";
133
	$res .= '<div class="BAZ_cadre_fiche_haut">'."\n";
134
	$res .= '&nbsp;</div>'."\n";
134
	$res .= '&nbsp;</div>'."\n";
135
	$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
135
	$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
Line 166... Line 166...
166
			if (isset($ligne[$tableau[$i]['nom_bdd']])) {
166
			if (isset($ligne[$tableau[$i]['nom_bdd']])) {
167
				$val=$tableau[$i]['nom_bdd'];
167
				$val=$tableau[$i]['nom_bdd'];
168
				if (!in_array($val, array ('bf_titre', 'bf_description', 'bf_date_debut_validite_fiche',
168
				if (!in_array($val, array ('bf_titre', 'bf_description', 'bf_date_debut_validite_fiche',
169
								'bf_date_fin_validite_fiche'))) {
169
								'bf_date_fin_validite_fiche'))) {
170
					if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) {
170
					if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) {
171
						$res .= '<span class="rubrique">'.constant($tableau[$i]['label']).':</span>'."\n";
171
						$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
172
						$res .= '<span class="description"> '.$ligne[$val].'</span>'."\n".'<br />'."\n";
172
						$res .= '<span class="description"> '.$ligne[$val].'</span>'."\n".'<br />'."\n";
173
					}
173
					}
174
				}
174
				}
175
			}
175
			}
176
			elseif (($tableau[$i]['type']=='liste')or($tableau[$i]['type']=='checkbox')) {
176
			elseif (($tableau[$i]['type']=='liste')or($tableau[$i]['type']=='checkbox')) {
Line 185... Line 185...
185
				while ($tab = $resultat->fetchRow()) {
185
				while ($tab = $resultat->fetchRow()) {
186
					if ($nb>0) $val .= ', ';
186
					if ($nb>0) $val .= ', ';
187
					$val .= $tab[0];
187
					$val .= $tab[0];
188
					$nb++;
188
					$nb++;
189
				}				
189
				}				
190
				$res .= '<span class="rubrique">'.constant($tableau[$i]['label']).':</span>'."\n";
190
				$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
191
				$res .= '<span class="description"> '.$val.'</span>'."\n".'<br />'."\n";
191
				$res .= '<span class="description"> '.$val.'</span>'."\n".'<br />'."\n";
192
			}
192
			}
193
		}
193
		}
194
	//afficher les liens pour l'annonce
194
	//afficher les liens pour l'annonce
195
	$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
195
	$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
Line 575... Line 575...
575
	if (DB::isError($resultat)) {
575
	if (DB::isError($resultat)) {
576
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
576
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
577
	}
577
	}
578
	$type_annonce_select['toutes']=BAZ_TOUS_TYPES_FICHES;
578
	$type_annonce_select['toutes']=BAZ_TOUS_TYPES_FICHES;
579
	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
579
	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
580
		$type_annonce_select[$ligne['bn_id_nature']] = constant($ligne['bn_label_nature']);
580
		$type_annonce_select[$ligne['bn_id_nature']] = $ligne['bn_label_nature'];
581
		$tableau_typeannonces[] = $ligne['bn_id_nature'] ;
581
		$tableau_typeannonces[] = $ligne['bn_id_nature'] ;
582
	}
582
	}
583
	if ($GLOBALS['_BAZAR_']['typeannonce']=='toutes') {
583
	if ($GLOBALS['_BAZAR_']['typeannonce']=='toutes') {
584
		$res= '<h2>'.BAZ_TOUTES_LES_ANNONCES.'</h2><br />'."\n";
584
		$res= '<h2>'.BAZ_TOUTES_LES_ANNONCES.'</h2><br />'."\n";
585
		
-
 
586
		$option=array('style'=>'border:1px solid #000;width: 140px;font:12px Myriad, Arial, sans-serif;');
585
		$option=array('style'=>'border:1px solid #000;width: 140px;font:12px Myriad, Arial, sans-serif;');
587
		$formtemplate->addElement ('select', 'nature', BAZ_TYPEANNONCE, $type_annonce_select, $option) ;
586
		$formtemplate->addElement ('select', 'nature', BAZ_TYPEANNONCE, $type_annonce_select, $option) ;
588
	}
587
	}
589
	//cas du type d'annonces prédéfini 
588
	//cas du type d'annonces prédéfini 
590
	else {
589
	else {
591
		$res = '<h2>'.BAZ_TOUTES_LES_ANNONCES_DE_TYPE.' '.constant($GLOBALS['_BAZAR_']['typeannonce']).'</h2>'."\n";
590
		$res = '<h2>'.BAZ_TOUTES_LES_ANNONCES_DE_TYPE.' '.$GLOBALS['_BAZAR_']['typeannonce'].'</h2>'."\n";
592
	}
591
	}
Line 593... Line 592...
593
 
592
 
594
	
593