Moteur de recherche
Résolu
bretonm2004
Messages postés
320
Date d'inscription
Statut
Membre
Dernière intervention
-
bretonm2004 Messages postés 320 Date d'inscription Statut Membre Dernière intervention -
bretonm2004 Messages postés 320 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'essaie de mettre en marche un moteur de recherche assez simple je crois mais ne sais pas comment my prendre quelqun aurrait bien l'obligeance de me donner un coup de main svp
voici mon script en gras c'est les criteres de recherche
<table align="center" width="800" border="1">
<tr>
<td width="99"> </td>
<td width="227">Marque: <select onchange="if(this.selectedIndex == 65) document.getElementById('autres').style.display = 'block';
else document.getElementById('autres').style.display = 'none';" name="marque">
<option>Sélectionnez</option>
<option>Acura</option>
<option>Alfa Romeo</option>
<option>AMC</option>
<option>Aston Martin</option>
<option>Audi</option>
<option>Bentley</option>
<option>BMW</option>
<option>Bugatti</option>
<option>Buick</option>
<option>Cadillac</option>
<option>Chevrolet</option>
<option>Chrysler</option>
<option>Daewoo</option>
<option>Daihatsu</option>
<option>Datsun</option>
<option>Dodge</option>
<option>Eagle</option>
<option>Ferrari</option>
<option>Fiat</option>
<option>Ford</option>
<option>Geo</option>
<option>GMC</option>
<option>Honda</option>
<option>Hummer</option>
<option>Hyundai</option>
<option>Infiniti</option>
<option>International Harvester</option>
<option>Isuzu</option>
<option>Jaguar</option>
<option>Jeep</option>
<option>Kia</option>
<option>Lamborghini</option>
<option>Land Rover</option>
<option>Lexus</option>
<option>Lincoln</option>
<option>Lotus</option>
<option>Maserati</option>
<option>Maybach</option>
<option>Mazda</option>
<option>Mercedes-Benz</option>
<option>Mercury</option>
<option>MG</option>
<option>Mini</option>
<option>Mitsubishi</option>
<option>Nissan</option>
<option>Oldsmobile</option>
<option>Opel</option>
<option>Peugeot</option>
<option>Plymouth</option>
<option>Pontiac</option>
<option>Porshe</option>
<option>Renault</option>
<option>Rolls-Royce</option>
<option>Saab</option>
<option>Saturn</option>
<option>Scion</option>
<option>Smart</option>
<option>Shelby</option>
<option>Subaru</option>
<option>Suzuki</option>
<option>Toyota</option>
<option>Triumph</option>
<option>Volkswagen</option>
<option>Volvo</option>
<option>Autre</option>
</select>
<input id="autres" type="text" name="autres" style="display:none;" />
</td><td width="0"></td>
<td width="239">Modèle:<input type="text" size="20" name="modele" value="" /> </td>
<td width="111">Année:<select name="annee">
<option></option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1989</option>
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1993</option>
<option>1994</option>
<option>1995</option>
<option>1996</option>
<option>1997</option>
<option>1998</option>
<option>1999</option>
<option>2000</option>
<option>2001</option>
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select></td>
<td width="84"><input name="envoyer" value="Rechercher" type="submit" /> </td>
</tr>
</table>
<p><table align="center" width="700" border="0">
<tr>
<td width="375" height="39"><img src="images/barre1.png" width="375" height="42" /></td>
<td width="151"><img src="images/barre2.png" width="150" height="40" /></td>
<td width="152"><img src="images/barre3.png" width="150" height="40" /></td>
</tr>
</table>
<?php
/* On initialise les variables */
$limit=5; // Donc 5 articles par page
// Sur quel page on est ?
if (isset($_GET['page']))
{
$page = intval($_GET['page']);
}
else
{
$page=0;
}
// Maintenant le navigateur de pages
// Affiche le page par page avec ses liens
// Variable nombre d'enreg par page
$debut=$page*$limit; // Debut est egale a page x limit donc page 2 sera egale a 10
mysql_connect('localhost', 'xxxxxxx', 'xxxxx');
mysql_select_db("xxxxxx");
$sql = "SELECT * FROM avendrepubliee ORDER BY id DESC LIMIT ".$debut.", ".$limit." ";
$req = mysql_query($sql) or die(mysql_error());
$count = mysql_result(mysql_query("SELECT count(*) FROM avendrepubliee"), 0);
// Compte le nombre de champ
$nav_page=true; // J'indique une variable vide, car si je ne le fais pas, j'ai des erreurs
if ($page>0)
{
$precedent=$page-1;
$nav_page.='<a href="rechercheavendre.php?page='.$precedent.'">PRECEDENT</a> ';
}
$i=0; // On initialise $i => Page
$j=1; // On initialise $j => La page afficher
if($count>$limit)
{
while($i<ceil($count/$limit))
{
// C'est une page avant ou après la position actuel
if($i!=$page){$nav_page.='<a href="rechercheavendre.php?page='.$i.'">'.$j.'</a>';}
// C'est la page en cours
else { $nav_page.=" <b>".$j."</b> ";}
$i++;$j++;
}
}
if($debut+$limit<$count)
{
$suivant=$page+1;
$nav_page.=' <a href="rechercheavendre.php?page='.$suivant.'">SUIVANT</a>';
}
/* Fin initialisation */
echo "<table align='center' width='700' border='0'>";
while($row = mysql_fetch_array($req))
{
$id=$row['id']; $typedannonce=$row['typedannonce'];
$marque=$row['marque']; $autres=$row['autres'];
$modele=$row['modele']; $prix=$row['prix'];
$negociable=$row['negociable']; $annee=$row['annee'];
$etat=$row['etat']; $carburant=$row['carburant'];
$kilometrage=$row['kilometrage']; $transmission=$row['transmission'];
$immatricule=$row['immatricule']; $climatisation=$row['climatisation'];
$audio=$row['audio']; $cylindre=$row['cylindre'];
$puissance=$row['puissance']; $consommation=$row['consommation'];
$couleurinterieure=$row['couleurinterieure']; $couleurexterieure=$row['couleurexterieure'];
$email=$row['email']; $message=$row['message']; $date=$row['date']; $image=$row['image'];
echo "<tr>
<td width='114'>
<center>
<a href='photos/avendrenp/".$row['image1']." ' alt='Voir image en grand'>
<img src='photos/avendrenp/".$row['image1']." ' width='75' />
</a>
</center></td>
<td width='258' height='78'>".$row['marque']." ".$row['autres']." ".$row['modele']." ".$row['annee']." ".$row['negociable']."</td>
<td align='center' width='147'>".$row['prix']."</td>
<td align='center' width='153'>".$row['date']."</td>
</tr>";
}
echo "</table>";
// Hop on affiche le navigateur
echo $nav_page;
?>
j'essaie de mettre en marche un moteur de recherche assez simple je crois mais ne sais pas comment my prendre quelqun aurrait bien l'obligeance de me donner un coup de main svp
voici mon script en gras c'est les criteres de recherche
<table align="center" width="800" border="1">
<tr>
<td width="99"> </td>
<td width="227">Marque: <select onchange="if(this.selectedIndex == 65) document.getElementById('autres').style.display = 'block';
else document.getElementById('autres').style.display = 'none';" name="marque">
<option>Sélectionnez</option>
<option>Acura</option>
<option>Alfa Romeo</option>
<option>AMC</option>
<option>Aston Martin</option>
<option>Audi</option>
<option>Bentley</option>
<option>BMW</option>
<option>Bugatti</option>
<option>Buick</option>
<option>Cadillac</option>
<option>Chevrolet</option>
<option>Chrysler</option>
<option>Daewoo</option>
<option>Daihatsu</option>
<option>Datsun</option>
<option>Dodge</option>
<option>Eagle</option>
<option>Ferrari</option>
<option>Fiat</option>
<option>Ford</option>
<option>Geo</option>
<option>GMC</option>
<option>Honda</option>
<option>Hummer</option>
<option>Hyundai</option>
<option>Infiniti</option>
<option>International Harvester</option>
<option>Isuzu</option>
<option>Jaguar</option>
<option>Jeep</option>
<option>Kia</option>
<option>Lamborghini</option>
<option>Land Rover</option>
<option>Lexus</option>
<option>Lincoln</option>
<option>Lotus</option>
<option>Maserati</option>
<option>Maybach</option>
<option>Mazda</option>
<option>Mercedes-Benz</option>
<option>Mercury</option>
<option>MG</option>
<option>Mini</option>
<option>Mitsubishi</option>
<option>Nissan</option>
<option>Oldsmobile</option>
<option>Opel</option>
<option>Peugeot</option>
<option>Plymouth</option>
<option>Pontiac</option>
<option>Porshe</option>
<option>Renault</option>
<option>Rolls-Royce</option>
<option>Saab</option>
<option>Saturn</option>
<option>Scion</option>
<option>Smart</option>
<option>Shelby</option>
<option>Subaru</option>
<option>Suzuki</option>
<option>Toyota</option>
<option>Triumph</option>
<option>Volkswagen</option>
<option>Volvo</option>
<option>Autre</option>
</select>
<input id="autres" type="text" name="autres" style="display:none;" />
</td><td width="0"></td>
<td width="239">Modèle:<input type="text" size="20" name="modele" value="" /> </td>
<td width="111">Année:<select name="annee">
<option></option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1989</option>
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1993</option>
<option>1994</option>
<option>1995</option>
<option>1996</option>
<option>1997</option>
<option>1998</option>
<option>1999</option>
<option>2000</option>
<option>2001</option>
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select></td>
<td width="84"><input name="envoyer" value="Rechercher" type="submit" /> </td>
</tr>
</table>
<p><table align="center" width="700" border="0">
<tr>
<td width="375" height="39"><img src="images/barre1.png" width="375" height="42" /></td>
<td width="151"><img src="images/barre2.png" width="150" height="40" /></td>
<td width="152"><img src="images/barre3.png" width="150" height="40" /></td>
</tr>
</table>
<?php
/* On initialise les variables */
$limit=5; // Donc 5 articles par page
// Sur quel page on est ?
if (isset($_GET['page']))
{
$page = intval($_GET['page']);
}
else
{
$page=0;
}
// Maintenant le navigateur de pages
// Affiche le page par page avec ses liens
// Variable nombre d'enreg par page
$debut=$page*$limit; // Debut est egale a page x limit donc page 2 sera egale a 10
mysql_connect('localhost', 'xxxxxxx', 'xxxxx');
mysql_select_db("xxxxxx");
$sql = "SELECT * FROM avendrepubliee ORDER BY id DESC LIMIT ".$debut.", ".$limit." ";
$req = mysql_query($sql) or die(mysql_error());
$count = mysql_result(mysql_query("SELECT count(*) FROM avendrepubliee"), 0);
// Compte le nombre de champ
$nav_page=true; // J'indique une variable vide, car si je ne le fais pas, j'ai des erreurs
if ($page>0)
{
$precedent=$page-1;
$nav_page.='<a href="rechercheavendre.php?page='.$precedent.'">PRECEDENT</a> ';
}
$i=0; // On initialise $i => Page
$j=1; // On initialise $j => La page afficher
if($count>$limit)
{
while($i<ceil($count/$limit))
{
// C'est une page avant ou après la position actuel
if($i!=$page){$nav_page.='<a href="rechercheavendre.php?page='.$i.'">'.$j.'</a>';}
// C'est la page en cours
else { $nav_page.=" <b>".$j."</b> ";}
$i++;$j++;
}
}
if($debut+$limit<$count)
{
$suivant=$page+1;
$nav_page.=' <a href="rechercheavendre.php?page='.$suivant.'">SUIVANT</a>';
}
/* Fin initialisation */
echo "<table align='center' width='700' border='0'>";
while($row = mysql_fetch_array($req))
{
$id=$row['id']; $typedannonce=$row['typedannonce'];
$marque=$row['marque']; $autres=$row['autres'];
$modele=$row['modele']; $prix=$row['prix'];
$negociable=$row['negociable']; $annee=$row['annee'];
$etat=$row['etat']; $carburant=$row['carburant'];
$kilometrage=$row['kilometrage']; $transmission=$row['transmission'];
$immatricule=$row['immatricule']; $climatisation=$row['climatisation'];
$audio=$row['audio']; $cylindre=$row['cylindre'];
$puissance=$row['puissance']; $consommation=$row['consommation'];
$couleurinterieure=$row['couleurinterieure']; $couleurexterieure=$row['couleurexterieure'];
$email=$row['email']; $message=$row['message']; $date=$row['date']; $image=$row['image'];
echo "<tr>
<td width='114'>
<center>
<a href='photos/avendrenp/".$row['image1']." ' alt='Voir image en grand'>
<img src='photos/avendrenp/".$row['image1']." ' width='75' />
</a>
</center></td>
<td width='258' height='78'>".$row['marque']." ".$row['autres']." ".$row['modele']." ".$row['annee']." ".$row['negociable']."</td>
<td align='center' width='147'>".$row['prix']."</td>
<td align='center' width='153'>".$row['date']."</td>
</tr>";
}
echo "</table>";
// Hop on affiche le navigateur
echo $nav_page;
?>
A voir également:
- Moteur de recherche
- Copernic moteur de recherche - Télécharger - Navigateurs
- Google moteur de recherche page d'accueil - Guide
- Recherche automatique des chaînes ne fonctionne pas - Guide
- Le fichier pdf à télécharger est disponible avec le même nom sur le site de bell canada. mais vous ne le trouverez pas directement avec un moteur de recherche… quelle est l’url de ce fichier pdf sur le site web de bell canada ? - Forum Réseaux sociaux
- Copernic Desktop Search - Télécharger - Utilitaires