Subversion Repositories Applications.bazar

Rev

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

Rev 118 Rev 122
Line 175... Line 175...
175
			$res .= '<div id="fiche_image">'."\n";
175
			$res .= '<div id="fiche_image">'."\n";
176
			$res .= '<img src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_logo'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" width="130" height="130" />'."\n";
176
			$res .= '<img src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_logo'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" width="130" height="130" />'."\n";
177
			$res .= '</div>'."\n";
177
			$res .= '</div>'."\n";
178
		}
178
		}
179
		$res .= '<h1 id="fiche_titre">'.$ligne['bf_titre'].'</h1>'."\n";
179
		$res .= '<h1 id="fiche_titre">'.$ligne['bf_titre'].'</h1>'."\n";
180
		$res .= '<div id="BAZ_description">'.$ligne['bf_description'].'</div>'."\n";
180
		$res .= '<div id="BAZ_description">'.nl2br($ligne['bf_description']).'</div>'."\n";
181
		$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']);
181
		$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']);
182
		for ($i=0; $i<count($tableau); $i++) {
182
		for ($i=0; $i<count($tableau); $i++) {
183
			if (isset($ligne[$tableau[$i]['nom_bdd']]) && ( $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' ) ) {
183
			if (isset($ligne[$tableau[$i]['nom_bdd']]) && ( $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' ) ) {
184
				$val=$tableau[$i]['nom_bdd'];
184
				$val=$tableau[$i]['nom_bdd'];
185
				if (!in_array($val, array ('bf_titre', 'bf_description', 'bf_date_debut_validite_fiche',
185
				if (!in_array($val, array ('bf_titre', 'bf_description'))) {
186
								'bf_date_fin_validite_fiche'))) {
-
 
187
					if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) {
186
					if ($ligne[$val] != '' and $ligne[$val] != BAZ_CHOISIR and $ligne[$val] != BAZ_NON_PRECISE) {
188
						$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
187
						$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
189
						$res .= '<span class="description"> '.$ligne[$val].'</span>'."\n".'<br />'."\n";
188
						$res .= '<span class="description"> '.nl2br($ligne[$val]).'</span>'."\n".'<br />'."\n";
190
					}
189
					}
191
				}
190
				}
192
			}
191
			}
193
			elseif ( $tableau[$i]['type']=='liste' || $tableau[$i]['type']=='checkbox' ) {
192
			elseif ( $tableau[$i]['type']=='liste' || $tableau[$i]['type']=='checkbox' ) {
194
				//pour les champs renseignes par une liste, on va chercher le label de la liste, plutot que l'id				
193
				//pour les champs renseignes par une liste, on va chercher le label de la liste, plutot que l'id				
Line 202... Line 201...
202
				while ($tab = $resultat->fetchRow()) {
201
				while ($tab = $resultat->fetchRow()) {
203
					if ($nb>0) $val .= ', ';
202
					if ($nb>0) $val .= ', ';
204
					$val .= $tab[0];
203
					$val .= $tab[0];
205
					$nb++;
204
					$nb++;
206
				}				
205
				}				
-
 
206
				if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) {
207
				$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
207
					$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
208
				$res .= '<span class="description"> '.$val.'</span>'."\n".'<br />'."\n";
208
					$res .= '<span class="description"> '.$val.'</span>'."\n".'<br />'."\n";
-
 
209
				}
-
 
210
			}
-
 
211
			elseif ( $tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin' ) {
-
 
212
				$val=$tableau[$i]['nom_bdd'];
-
 
213
				if (!in_array($val, array ('bf_date_debut_validite_fiche', 'bf_date_fin_validite_fiche'))) {
-
 
214
					if ($ligne[$val] != '') {
-
 
215
						$res .= '<span class="rubrique">'.$tableau[$i]['label'].':</span>'."\n";
-
 
216
						$res .= '<span class="description"> '.strftime('%d.%m.%Y',strtotime($ligne[$val])).'</span>'."\n".'<br />'."\n";
-
 
217
					}
-
 
218
				}		
209
			}
219
			}
210
		}
220
		}
211
	//afficher les liens pour l'annonce
221
	//afficher les liens pour l'annonce
212
	$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
222
	$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
213
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
223
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;