Probleme d'affichage

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Probleme d'affichage

Re: Probleme d'affichage

par stealth35 » 19 mai 2010, 18:32

hello, met le code avec la balise PHP de l'éditeur du forum on verra mieux.
ensuite pour ton problème, as tu la gestion des erreurs d'activé avec un niveau élevé, dans ton php.ini

Code : Tout sélectionner

display_errors = On error_reporting = E_ALL | E_STRICT

Probleme d'affichage

par cedricdu11 » 19 mai 2010, 01:16

Bonsoir le monde.

Je viens demander votre aide car je calle complement et ne trouve pas l'erreur

voici le code

<?php require_once('Connections/vente_maison.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$colname_liste_ville = "-1";
if (isset($_POST['villes'])) {
$colname_liste_ville = $_POST['villes'];
}
mysql_select_db($database_vente_maison, $vente_maison);
$query_liste_ville = sprintf("SELECT * FROM villes WHERE villes = %s", GetSQLValueString($colname_liste_ville, "text"));
$liste_ville = mysql_query($query_liste_ville, $vente_maison) or die(mysql_error());
$row_liste_ville = mysql_fetch_assoc($liste_ville);
$totalRows_liste_ville = mysql_num_rows($liste_ville);

$maxRows_trouve_terrain_vente = 5;
$pageNum_trouve_terrain_vente = 0;
if (isset($_GET['pageNum_trouve_terrain_vente'])) {
$pageNum_trouve_terrain_vente = $_GET['pageNum_trouve_terrain_vente'];
}
$startRow_trouve_terrain_vente = $pageNum_trouve_terrain_vente * $maxRows_trouve_terrain_vente;

$colname_trouve_terrain_vente = "-1";
if (isset($_POST['ville'])) {
$colname_trouve_terrain_vente = $_POST['ville'];
}
$colname2_trouve_terrain_vente = "-1";
if (isset($_POST['type'])) {
$colname2_trouve_terrain_vente = $_POST['type'];
}
$colname3_trouve_terrain_vente = "-1";
if (isset($_POST['surface_terrain'])) {
$colname3_trouve_terrain_vente = $_POST['surface_terrain'];
}
$colname4_trouve_terrain_vente = "-1";
if (isset($_POST['prix'])) {
$colname4_trouve_terrain_vente = $_POST['prix'];
}
mysql_select_db($database_vente_maison, $vente_maison);
$query_trouve_terrain_vente = sprintf("SELECT * FROM terrain_vente WHERE ville = %s AND type = %s AND surface_terrain >= %s AND prix <= %s ORDER BY rand()", GetSQLValueString($colname_trouve_terrain_vente, "text"),GetSQLValueString($colname2_trouve_terrain_vente, "text"),GetSQLValueString($colname3_trouve_terrain_vente, "text"),GetSQLValueString($colname4_trouve_terrain_vente, "text"));
$query_limit_trouve_terrain_vente = sprintf("%s LIMIT %d, %d", $query_trouve_terrain_vente, $startRow_trouve_terrain_vente, $maxRows_trouve_terrain_vente);
$trouve_terrain_vente = mysql_query($query_limit_trouve_terrain_vente, $vente_maison) or die(mysql_error());
$row_trouve_terrain_vente = mysql_fetch_assoc($trouve_terrain_vente);

if (isset($_GET['totalRows_trouve_terrain_vente'])) {
$totalRows_trouve_terrain_vente = $_GET['totalRows_trouve_terrain_vente'];
} else {
$all_trouve_terrain_vente = mysql_query($query_trouve_terrain_vente);
$totalRows_trouve_terrain_vente = mysql_num_rows($all_trouve_terrain_vente);
}
$totalPages_trouve_terrain_vente = ceil($totalRows_trouve_terrain_vente/$maxRows_trouve_terrain_vente)-1;

$queryString_trouve_terrain_vente = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_trouve_terrain_vente") == false &&
stristr($param, "totalRows_trouve_terrain_vente") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_trouve_terrain_vente = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_trouve_terrain_vente = sprintf("&totalRows_trouve_terrain_vente=%d%s", $totalRows_trouve_terrain_vente, $queryString_trouve_terrain_vente);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" />
<![endif]-->
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/img/favicon.ico" >

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Maisons, appartements, terrains, immeubles à vendre sur le Finistère Nord</title>
</head>

<body>
<div id="conteneur">
<div id="headergauche">
<div align="center"></div>
</div>
<div class="titresite" id="headerdroite">
<p align="center">MAISONS APPARTEMENTS TERRAINS A VENDRE</p>
<p align="center">dans le Finistere nord</p>
</div>
<div class="textemenu" id="divmenu">
<p align="center">&nbsp;</p>
<ul class="nav">
<li class="sous_menu"><a href="index.php">¤ Recherche</a></li>
<li class="sous_menu"><a href="maisons_a_vendre.php">¤ Maisons</a></li>
<li class="sous_menu"><a href="appartements_a_vendre.php">¤ Appartements</a></li>
<li class="sous_menu"><a href="terrains_a_vendre.php">¤ Terrains</a></li>
<li class="sous_menu"><a href="immeubles_a_vendre.php">¤ Immeubles</a></li>
<li class="sous_menu"><a href="les_diagnostics_immobiliers.php">¤ Les diagnostics</a></li>
<li class="sous_menu"><a href="mettre_en_vente.php">¤ Mettre en vente</a></li>
<li class="sous_menu"><a href="contact.php">¤ Contact</a></li>
<li class="sous_menu"><a href="mentions_legales.php">¤ Mentions légales</a></li>
</ul>
</div>
<div class="texte" id="divcorps">
<p class="titre">resultat de votre recherche </p>
<p align="center">
<script language="JavaScript">
//Customisez ici vvv
var modepourcent=0 //Pour proportionnel
var heightmax=300 //Si modepourcent=1 c'est la taille max en % sinon c'est la taille en px
var nbpas=100 //Nombre d'etapes (plus la valeur est grande, plus c'est fluide mais plus c'est lent)
var delay=20 //Delay en micro seconde
//Customisez ici ^^^


//si maxh=0 alors on utilise heightmax
function show(id, page, h, maxh)
{
ifr = document.getElementById(id)
fra = ifr.style

if(maxh==0) maxh=heightmax

if(h==0)
{
hide(id)
ifr.src=page
}
if(modepourcent) fra.height=h+'%';
else fra.height=h+'px'
fra.visibility = "visible";
if(h<maxh) setTimeout('show("'+id+'","'+page+'",'+(h+maxh/nbpas)+','+maxh+')',delay)

}

function hide(id)
{
ifr = document.getElementById(id)
fra = ifr.style
maxh=0

fra.visibility = "hidden";
fra.height=0+'%';
}

hide('iframe1')
hide('iframe2')
</script>
<table width="600" border="0" align="center">
<tr>
<td><?php do { ?>
<p align="center"><strong><?php echo $row_trouve_terrain_vente['ville']; ?> - <?php echo $row_trouve_terrain_vente['type']; ?></strong></p>
<table width="600" border="0">
<tr>
<td><div align="center"><img src="<?php echo $row_trouve_terrain_vente['photo_1']; ?>" alt="" width="150" border="1" /></div></td>
<td><div align="center"><img src="<?php echo $row_trouve_terrain_vente['photo_2']; ?>" alt="" width="150" border="1" /></div></td>
<td><div align="center"><img src="<?php echo $row_trouve_terrain_vente['photo_3']; ?>" alt="" width="150" border="1" /></div></td>
</tr>
<tr>
<td colspan="3"><div align="center"><img src="<?php echo $row_trouve_terrain_vente['photo_4']; ?>" alt="" width="150" border="1" /> <img src="<?php echo $row_trouve_terrain_vente['photo_5']; ?>" alt="" width="150" border="1" /></div> <div align="center"></div> <div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><p align="right">Réf : <?php echo $row_trouve_terrain_vente['reference']; ?></p>
<p><strong><?php echo $row_trouve_terrain_vente['titre_annonce']; ?></strong></p>
<p><?php echo $row_trouve_terrain_vente['annonce']; ?></p>
<p><strong>Prix :</strong> <?php echo $row_trouve_terrain_vente['prix']; ?> euro <?php echo $row_trouve_terrain_vente['frais']; ?></p>
<p><strong>Surface :</strong> <?php echo $row_trouve_terrain_vente['surface_terrain']; ?> m² - <strong>viabilisé : </strong><?php echo $row_trouve_terrain_vente['viabilise']; ?> - <strong>Lotissement :</strong> <?php echo $row_trouve_terrain_vente['lotissement']; ?> - Aspect : <?php echo $row_trouve_terrain_vente['aspect']; ?><br />
</p>
<p align="right"><a href="index.php" target="_self">Nouvelle recherche</a></p>
<hr width="400" />
<p>&nbsp;</p></td>
</tr>
</table>
<?php } while ($row_trouve_terrain_vente = mysql_fetch_assoc($trouve_terrain_vente)); ?><p align="center">&nbsp;

<table border="0" align="center">
<tr>
<td><?php if ($pageNum_trouve_terrain_vente > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_trouve_terrain_vente=%d%s", $currentPage, 0, $queryString_trouve_terrain_vente); ?>">Premier</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_trouve_terrain_vente > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_trouve_terrain_vente=%d%s", $currentPage, max(0, $pageNum_trouve_terrain_vente - 1), $queryString_trouve_terrain_vente); ?>">Pr&eacute;c&eacute;dent</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_trouve_terrain_vente < $totalPages_trouve_terrain_vente) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_trouve_terrain_vente=%d%s", $currentPage, min($totalPages_trouve_terrain_vente, $pageNum_trouve_terrain_vente + 1), $queryString_trouve_terrain_vente); ?>">Suivant</a>
<?php } // Show if not last page ?>
</td>
<td><?php if ($pageNum_trouve_terrain_vente < $totalPages_trouve_terrain_vente) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_trouve_terrain_vente=%d%s", $currentPage, $totalPages_trouve_terrain_vente, $queryString_trouve_terrain_vente); ?>">Dernier</a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
</p></td>
</tr>
</table>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align="center"><a href="#" class="texte">Haut de page</a></p>
</div>
<p>&nbsp;</p>
</div>
</body>
</html>
<?php
mysql_free_result($liste_ville);

mysql_free_result($trouve_terrain_vente);
?>


Cela m'affiche pas de code d'erreur
mais cela ne m'affiche pas non plus les donnée stockée dans la bdd

Voila si quelqu'un peut m'aider..
Bonsoir