1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
<?php
require_once("../connexionMysql.inc.php");
if (isset($_POST ['bouton']))
$requete="SELECT ref, photo, ville, typeBiens, prix FROM listevente WHERE catID=1 AND typeBiens ='".$_POST['type']."' AND ville = '".$_POST['ville']."' AND prix <= '".$_POST['prix']."'";
else
$requete="SELECT ref, photo, ville, typeBiens, prix FROM listevente WHERE catID=1 ";
$resultat=mysql_query($requete)or die('Erreur SQL !'.$requete.'<br>'.mysql_error());
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--[if lt IE 9]>
<script src="../script/html5.js"></script>
<![endif]-->
<!--[if IE ]>
<link type="text/css" rel="stylesheet" href="styles-ie.css" />
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>site immo</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
<link href="../css/960.css" rel="stylesheet" type="text/css" />
<link href="../css/reset.css" rel="stylesheet" type="text/css" />
<link href="../css/text.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-family: Georgia, "Times New Roman", Times, serif}
.style2 {font-size: 16px}
-->
</style>
</head>
<body>
<div class="container_12">
<header class="grid_3">
<img id="logo" src="../logo.png" />
</header>
<nav id="menu" class="grid_9">
<ul>
<li><a href="../index.html" class="accueil">Présentation</a></li>
<li><a href="ventes.html"class="ventes">Ventes</a></li>
<li><a href="../locations/locations.html"class="locations">Locations</a></li>
<li><a href="../contact/contact.html"class="contact">Contact</a></li>
</ul>
</nav>
<section id="contenu">
<article id="biens" class="grid_4">
<h2>Nos biens en ventes</h2>
<form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<label>Sélectionnez un type de bien : <br />
<select name='type' id='type' >
<option >Type de biens</option>
<option value="Appartement" >Appartement</option>
<option value="Local" >Local commercial</option>
<option value="Maison" >Maison</option>
<option value="Terrain" >Terrain</option>
</select>
</label><br />
<label>Choisissez une localité : <br />
<select name='ville' id='ville'>
<option >Ville</option>
<option value="ville1" >ville1</option>
<option value="ville2" >ville2</option>
<option value="ville3" >ville3</option>
<option value="ville4" >ville4</option>
<option value="ville5" >ville5</option>
</select>
</label><br />
<label>Choisissez un prix max : <br />
<select name='prix' id='prix'>
<option >Prix</option>
<option value="1000000" > Pas de maximum </option>
<option value="150000" > 150000 </option>
<option value="250000" > 250000 </option>
<option value="350000" > 350000</option>
</select>
</label><br />
<br />
<label>
<input type="submit" name="bouton" />
</label>
</form>
</article>
<article id="liste" class="grid_8">
<div id="listeBiens">
<table width="610" border="1">
<?php while ($listevente=mysql_fetch_array($resultat )){ ?>
<tr>
<td><div align="center" class="photo" width="295px"><img src="../imagesSite/listevente/<?php echo $listevente['photo']; ?>" height="197" /></div></td>
<td>
<div class="police" align="left" >
Ref : <?php echo $listevente['ref']; ?><br />
Ville : <?php echo $listevente['ville']; ?><br />
Type de biens : <?php echo $listevente['typeBiens']; ?><br />
Prix : <?php echo $listevente['prix']; ?> <br />
<a href="ficheVente.php?ref=<?php echo $listevente['ref']; ?>"><img src="../imagesSite/voirVentes.png" height="20" ></a><br />
</div>
</td>
</tr>
<?php }?>
</table>
</div>
</article>
</section>
<footer id="footer">
<p ><a href="http://www.moi.fr">© moi</a><p>
</footer>
</div>
</body>
</html> |
Partager