<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
<!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>
<title>liste resultat</title>
<link href="styles.css" type="text/css" rel="stylesheet" />
</head>
<body>
<?
include("connection.php");
mysql_select_db("obturateurcentral")or die("La Connexion a échouée");
if (empty($_POST["np"]) && empty($_POST["t"]) && empty($_POST["tp"]) && !isset($_POST["bouton"]) ){
echo "veuillez remplir au moins 1 champs merci<br /> <a href='index.php'>Retour</a>";
}else{
if (isset($_POST["bouton"]) && $_POST["bouton"]=="Ma Base"){
$req=mysql_query("SELECT * FROM texte_page");
}else{
$sep='';
$tests='';
$tab = array ("$_POST[np]"=>"nom_page=","$_POST[t]"=>"titre1=","$_POST[tp]"=>"text_present=");
foreach ($tab as $ch => $nch){
if (!empty($ch)){$tests .= "$sep$nch '$ch'";$sep='&&';}
}
$req=mysql_query("SELECT * FROM texte_page WHERE $tests");
}
$res = @mysql_num_rows($req);
if(!isset($res)|| empty($res)){
echo "il n'y a pas de réponse à votre demande";
}else{
?>
<div id="superieur">
<div id="pere">
<div class="Layer1">Page</div>
<div class="Layer1">Titre</div>
<div class="Layer5">Texte</div>
<?
while ($tabl_resultat = mysql_fetch_array($req))
{
/// On affiche à l'écran les valeurs
?>
<div class="Layer2"><span class='texte'><br/><br/><br/><? echo "$tabl_resultat[nom_page]"; ?></span></div>
<div class="Layer2"><span class='texte'><br/><br/><br/><? echo "$tabl_resultat[titre1]"; ?></span></div>
<div class="Layer4"><span class='texte'><br/><? echo "$tabl_resultat[text_present]"; ?></span></div>
<?
}
?>
</div>
<a href='index.php'>Retour</a>
</div>
<?
}
}
?>
</body>
</html>