setWidth("100%"); $map->setHeight(600); $map->addControl(GLargeMapControl); $map->addControl(GMapTypeControl); $map->addControl(GOverviewMapControl); mysql_select_db($database_quiquipost, $quiquipost); $currentPage = $_SERVER["PHP_SELF"]; $Q = $_POST["recherche"]; $Q = strtolower($Q); $tab = preg_split('~[\s[:punct:]]~', preg_replace('~\b\S{1,1}\b~', ' ', $Q), -1, PREG_SPLIT_NO_EMPTY); $nb = count($tab); if ($tab[0]=='') { $sql = "SELECT * FROM boutique "; $Recordset1 = mysql_query($sql, $quiquipost) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); for($i=0; $isetZoomFactor(8); $full_adress = (strlen(trim(mysql_result( $Recordset1, $i, "adresse" ))) > 0 ? trim(mysql_result( $Recordset1, $i, "adresse" )) : ''); $full_adress .= (strlen(trim(mysql_result( $Recordset1, $i, "cp" ))) > 0 ? ' ' . trim(mysql_result( $Recordset1, $i, "cp" )) : ''); $full_adress .= (strlen(trim(mysql_result( $Recordset1, $i, "ville" ))) > 0 ? ' ' . trim(mysql_result( $Recordset1, $i, "ville" )) : ''); if(strlen($full_adress) > 0) { $html_marker = ''; $html_marker .= ''; $html_marker .= '
' . mysql_result( $Recordset1, $i, "nom" ) . '
' . $full_adress . '
Tél. : ' . mysql_result( $Recordset1, $i, "phone" ) . '
'; $address[$i][0] = $full_adress; $address[$i][1] = $html_marker; } } for ($j=0; $jaddAddress($address[$j][0], $address[$j][1], true); } } else { $sql = "SELECT * FROM boutique WHERE nom LIKE '%$tab[0]%' OR adresse LIKE '%$tab[0]%' OR cp LIKE '%$tab[0]%' OR ville LIKE '%$tab[0]%' OR pays LIKE '%$tab[0]%' "; for($i = 1; $i < $nb; $i++){ $sql .= " OR adresse LIKE '%$tab[$i]%'"; $sql .= " OR cp LIKE '%$tab[$i]%'"; $sql .= " OR ville LIKE '%$tab[$i]%'"; $sql .= " OR pays LIKE '%$tab[$i]%'"; } $sql .= "ORDER BY cp ASC"; $Recordset1 = mysql_query($sql, $quiquipost) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); for($i=0; $isetZoomFactor(8); $full_adress = (strlen(trim(mysql_result( $Recordset1, $i, "adresse" ))) > 0 ? trim(mysql_result( $Recordset1, $i, "adresse" )) : ''); $full_adress .= (strlen(trim(mysql_result( $Recordset1, $i, "cp" ))) > 0 ? ' ' . trim(mysql_result( $Recordset1, $i, "cp" )) : ''); $full_adress .= (strlen(trim(mysql_result( $Recordset1, $i, "ville" ))) > 0 ? ' ' . trim(mysql_result( $Recordset1, $i, "ville" )) : ''); if(strlen($full_adress) > 0) { $html_marker = ''; $html_marker .= ''; $html_marker .= '
'.mysql_result( $Recordset1, $i, "nom" ).'
'.$full_adress.'
Tél. : '. mysql_result( $Recordset1, $i, "phone" ).'
Email : '.mysql_result( $Recordset1, $i, "email" ).'
Site web : '.mysql_result( $Recordset1, $i, "www" ).'
'; $address[$i][0] = $full_adress; $address[$i][1] = $html_marker; } } for ($j=0; $jaddAddress($address[$j][0], $address[$j][1], true); } } } ?> onLoad="getOnLoadCode(); ?>; load()" onUnload="GUnload()" >
'.$totalRows_Recordset1.' résultat(s) pour '.$Q.''; } ?>
getBodyCode(); ?>
 
       
   
       
Tous droits réservés aux auteurs de ces blogs - ( 3) - Contactez-nous