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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
<form action="Misajliste.php" method="post" enctype = "multipart/form_data">
<input type="hiden" name="enregistre" value="oui">
<input type="hiden" name="id" value="<?php echo $id;?>">
<TABLE BORDER="1" style="BORDER-COLOR:#FF0033">
<tr><td colspan = "2">
</td></tr>
<tr><td><input type="text" name="desig" value="<?php echo $habitat['titre'];?>"></td><td><input type="text" name="date" value="<?php echo $habitat['date'];?>"></td></tr>
<tr><td><textarea name="texte" rows="12" cols="50"><?php echo $habitat['information'];?></textarea></td><td>
<p><SELECT name="locachat">
<option style="background-color:yellow" value="Location" <?php if ($habitat['locachat'] == "Location") echo "SELECTED"; ?>>Location</option>
<option style="background-color:yellow" value="vente" <?php if ($habitat['locachat'] == "vente") echo "SELECTED"; ?>>vente</option>
</SELECT></p>
<p><SELECT name="logement">
<option style="background-color:yellow" value="Maison" <?php if ($habitat['logement'] == "Maison") echo "SELECTED"; ?>>Maison</option>
<option style="background-color:yellow"value="Appartement" <?php if ($habitat['logement'] == "Appartement") echo "SELECTED"; ?>>Appartement</option>
</SELECT></p>
<p><SELECT name="type">
<option style="background-color:yellow" value="Studio" <?php if ($habitat['type'] == "Studio") echo "SELECTED"; ?>>Studio</option>
<option style="background-color:yellow" value="T1" <?php if ($habitat['type'] == "T1") echo "SELECTED"; ?>>-T1-</option>
<option style="background-color:yellow" value="T2" <?php if ($habitat['type'] == "T2") echo "SELECTED"; ?>>-T2-</option>
</SELECT></p>
<p><input type="text" name="px" value="<?php echo $habitat['prix']; ?>"></p>
<p><SELECT name="departement">
<option style="background-color:yellow" value="80-somme" <?php if ($habitat['departement'] == "80-somme") echo "SELECTED"; ?>>80-somme</option>
<option style="background-color:yellow" value="02-aisne" <?php if ($habitat['departement'] == "02-aisne") echo "SELECTED"; ?>>02-aisne</option>
<option style="background-color:yellow" value="60-oise" <?php if ($habitat['departement'] == "60-oise") echo "SELECTED"; ?>>60-oise</option>
</SELECT></p>
<p><SELECT name="ville">
<option style="background-color:yellow" value="Amiens" <?php if ($habitat['ville'] == "Amiens") echo "SELECTED"; ?>>Amiens</option>
<option style="background-color:yellow" value="St-Quentin"<?php if ($habitat['ville'] == "St-Quentin") echo "SELECTED"; ?>>St-Quentin</option>
<option style="background-color:yellow" value="Creil" <?php if ($habitat['ville'] == "Creil") echo "SELECTED"; ?>>Creil</option>
</SELECT></p>
</td></tr>
</TABLE>
<br>
<select name="action">
<option value="maj">Enregistrer la mise à jour</option>
<option value="suppr">supprimer</option>
</select>
<br>
<input type="submit" name="valide" value="Effectuer">
Fichier le lien:
<?php
include("Haut.inc.php");
include("id.inc.php");
$lien = mysql_connect($bdserver, $bdlogin, "");
mysql_select_db($bdd);
$sql = "SELECT * FROM $tblog";
$result = mysql_query($sql);
echo "<TABLE BORDER=1 style=BORDER-COLOR:#FF0033>";
echo "<tr><th>Ref</th><th>Désigantion</th><th>Vente ou location</th><th>Prix</th><th>Departement</th><th>Ville</th><tr>";
while ($habitat = mysql_fetch_array($result)){
$id = $habitat['ref_loge'];
$desig = $habitat['titre'];
$vl = $habitat['locvente'];
$px = $habitat['prix'];
$dpt = $habitat['departement'];
$vil = $habitat['ville'];
$texte =$habitat['information'];
$im = $habitat['image'];
$type = $habitat['genre'];
$genretype = $habitat['type'];
$date = $habitat['date'];
echo "<tr>";
echo "<td>$id</td>";
echo "<td><a href=Misajliste.php?id=$id>$desig</a></td>";
echo "<td>$vl</td>";
echo "<td>$px</td>";
echo "<td>$dpt</td>";
echo "<td>$vil</td>";
}
echo "</TABLE>";
mysql_close($lien);
include("Bas.inc.php");
?> |
Partager