<?php require_once('Connections/connexion.php');?>
<?php
$lo=$_REQUEST["lo"]; $pa=$_REQUEST["pa"];
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form4")) {
$updateSQL = sprintf("UPDATE annonce SET date_annonce=%s, Titre=%s, gsm=%s, villes=%s, Descriptif=%s, capacite=%s, annee_construction=%s, emplacement=%s, prix_periode=%s, prix=%s, type_local=%s, menag_check=%s, mult_check=%s, exter_check=%s, desc_check=%s, partic_check=%s, act_prox_check=%s
, validation_admin = '0'
WHERE id=%s",
GetSQLValueString($_POST['date'], "date"),
GetSQLValueString($_POST['gsm'], "gsm"),
GetSQLValueString($_POST['villes'], "villes"),
GetSQLValueString($_POST['titre'], "text"),
GetSQLValueString($_POST['descriptif'], "text"),
GetSQLValueString($_POST['capac'], "text"),
GetSQLValueString($_POST['annee_cons'], "text"),
GetSQLValueString($_POST['loca'], "text"),
GetSQLValueString($_POST['periode'], "text"),
GetSQLValueString($_POST['prix'], "text"),
GetSQLValueString($_POST['logem'], "text"),
GetSQLValueString($_POST['men'], "text"),
GetSQLValueString($_POST['multi'], "text"),
GetSQLValueString($_POST['ext'], "text"),
GetSQLValueString($_POST['desccheck'], "text"),
GetSQLValueString($_POST['part'], "text"),
GetSQLValueString($_POST['prox'], "text"),
GetSQLValueString($_POST['idannn'], "int"));
mysql_select_db($database_connexion, $connexion);
$Result1 = mysql_query($updateSQL, $connexion) or die(mysql_error());
mysql_select_db($database_connexion, $connexion);
$idannn=GetSQLValueString($_POST['idannn'], "int");
$query_categorie = "SELECT *
FROM annonceur
WHERE id_annonceur='$idannn'";
$categorie = mysql_query($query_categorie, $connexion) or die(mysql_error());
$row_categorie = mysql_fetch_assoc($categorie);
$totalRows_categorie = mysql_num_rows($categorie);
?>
<?php
} while ($row_categorie = mysql_fetch_assoc($categorie));
$rows = mysql_num_rows($categorie);
if($rows > 0) {
mysql_data_seek($categorie, 0);
$row_categorie = mysql_fetch_assoc($categorie);
}
?>
<?php
mysql_select_db($database_connexion, $connexion);
$query_qui_est_ann = sprintf("SELECT * FROM annonceur WHERE id_annonceur =".$row_details['annonceur']);
$qui_est_ann = mysql_query($query_qui_est_ann, $connexion) or die(mysql_error());
$row_qui_est_ann = mysql_fetch_assoc($qui_est_ann);
$totalRows_qui_est_ann = mysql_num_rows($qui_est_ann);
echo $row_qui_est_ann['Nom']; echo" ";
echo $row_qui_est_ann['prenom'];
?>
<?php
mysql_select_db($database_connexion, $connexion);
$query_logem = sprintf("SELECT * FROM type_logement WHERE id =".$row_details['type_local']);
$logem = mysql_query($query_logem, $connexion) or die(mysql_error());
$row_logem = mysql_fetch_assoc($logem);
$totalRows_logem = mysql_num_rows($logem);
?>
<?php echo $row_logem['id']; ?>"><?php echo $row_logem['lib']; ?></option>
<?php
$result = mysql_query("select * from type_logement");
while($ligne = mysql_fetch_row($result))
{
$logement = $ligne[1] ; $logementV = $ligne[0] ;
?>
<?php
mysql_select_db($database_connexion, $connexion);
$query_location = sprintf("SELECT * FROM emplacement WHERE id = ".$row_details['emplacement']);
$location = mysql_query($query_location, $connexion) or die(mysql_error());
$row_location = mysql_fetch_assoc($location);
$totalRows_location = mysql_num_rows($location);
?>
<?php
mysql_select_db($database_connexion, $connexion);
$query_capic = sprintf("SELECT * FROM capaciter_accueil WHERE id =".$row_details['capacite']);
$capic = mysql_query($query_capic, $connexion) or die(mysql_error());
$row_capic = mysql_fetch_assoc($capic);
$totalRows_capic = mysql_num_rows($capic);
?>
<?php
mysql_select_db($database_connexion, $connexion);
$query_annee_cons = sprintf("SELECT * FROM annee_construction WHERE id = ".$row_details['annee_construction']);
$annee_cons = mysql_query($query_annee_cons, $connexion) or die(mysql_error());
$row_annee_cons = mysql_fetch_assoc($annee_cons);
$totalRows_annee_cons = mysql_num_rows($annee_cons);
?>
<?php
mysql_free_result($categorie);
mysql_free_result($details);
mysql_free_result($qui_est_ann);
?>
➡️ Offre MyRankingMetrics ⬅️
pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)
Voir les détails ici