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
| <?php
include("../include/session.php");
include("../UneAnnonce/affichercategorie.js");
$description = "";
$keywords = "";
$subject = "";
$title = "";
$fakea = "";
$menu = true;
$content=true;
$publicite=false;
$serveur = "localhost";
$admin = "root";
$mdp = "";
$base = "idealeparut";
$connexion = mysql_connect($serveur, $admin, $mdp);
mysql_select_db($base, $connexion);
// On récupère tous les articles, triés par catégorie, titre, référence.
$req = 'SELECT c.nom_categorie,s.nom_sous_categorie,id_categorie
FROM categorie_annonce as c, sous_categorie_annonce as s
where s.num_categorie=c.id_categorie
order by nom_categorie asc';
$res = mysql_query($req) or exit('Erreur: '.mysql_error());
$num_categorie = null;
$content.='<select name="choixPosteSelect" onChange="ifOther(this.value)" id="selectPoste" style="display:block;">';
while ($donnees = mysql_fetch_assoc($res)) {
// Si on change de catégorie, on l'affiche dans le <select>.
if ($donnees['nom_categorie'] !== $num_categorie) {
$num_categorie = $donnees['nom_categorie'];
$content.='<optgroup label="'.$num_categorie.'">';
}
//On ajoute "logiquement" notre <option>.
$content.='<option value="'.$donnees['nom_sous_categorie'].'">'.$donnees['nom_sous_categorie'].'
';
}
$content.='</option></select><BR /><BR />
<fieldset id="Immobilier" "style="border: none" style="visibility=hidden">
<label>Surface</label>
<input type="text" "style="width: 100px" class="text" id="inputImmobilier" name="SurfaceVenteImmo"/>
<label>Pieces</label>
<input type="text" "style="width: 100px" class="text" id="inputPiece" name="PieceVenteImmo" style="visibility=hidden" /><BR />
</fieldset>
';
include("../include/base2.php");
?> |
Partager