<?php
	session_start();
	
	include('config_inc.php'); 	
	
        if($_SESSION['database']=="local")
          {
             $db_host    = "localhost";
             $db_user   = "root";
     	     $db_pass   = "";
    	     $db_name   = "boutique";

  	  }
	
	if($_SESSION['database']=="public")
	  {
  	     $db_host    = "sql2";
   	     $db_user   = "analogde";
 	     $db_pass   = "rainbow";
	     //$db_type   = "mysql";
	     $db_name   = "analogde";
	  }

?>
	
<script language="javascript" type="text/javascript">

/**
* selectionne l'ensemble des elements d'une liste déroulante avec checkbox
* @param :
* - obj : le nom du pseudo-composant
* - nb : nombre d'elements que contient le composant
*/
function selectAll(obj, nb) {
for (i=0; i< nb; i++) {
document.getElementById(obj.id + i).checked = obj.checked;

if(obj.checked)
document.getElementById("tr_"+obj.id+i).className = "select_checked";
else {
if(i % 2)
css = "select_odd"
else
css ="select_even";

document.getElementById("tr_"+obj.id+i).className = css;
}
}
}

/**
* selectionne l'ensemble des elements d'une liste déroulante avec checkbox
* @param :
* - obj : le nom du pseudo-composant
* - el_id : id de l'element (position dans le composant)
* - ev : le type d'evenement
* - css_defaut : le style de la ligne par defaut
* - nb : le nombre d'elements
*/
function setEvenement(obj, el_id, ev, css_defaut, nb, provenance)
 {

	//--- recuperation des balises
	comp = document.getElementById(obj);
	tr = document.getElementById("tr_" + obj + el_id);
	ck = document.getElementById(obj + el_id);

//--- si il s'agit d'un clique
if(ev == "click") {
//--- alors on coche ou decoche la checkbox
if(provenance = "td") ck.checked = !ck.checked;


//--- si on decoche, alors on decoche aussi la checkbox du composant
if(!ck.checked) {
if(comp.checked) comp.checked = false;
}
else {

//---sinon on vérifie que tous les elements sont cochés
var absent = false;
var i = 0;

while(i < nb && absent == false) {
if(i != el_id) {
if(!document.getElementById(obj + i).checked) absent = true;
}
i++;
}

if(comp.checked == absent) comp.checked = !absent;
}
}

//--- autres evenements
switch(ev) {
case "over":
tr.className = "select_over";
break;

case "out":
if(ck.checked)
tr.className = "select_checked";
else
tr.className = css_defaut;
break;
}
}

</script>

<?php

function checkedSelect( $nom, $structure, $contenu, $selection = null)
{

//////////////// entete du composant \\\\\\\\\\\\\\\\\\\\\\\\\
if(sizeof($selection) == sizeof($contenu))
$checked = "checked";
else
$checked = "";


$str = '<div class="div_select">'
.'<div class="div_select_header">'
.'<table width="100%">'
.'<tr>'
.'<td width="20" align="center"><input type="checkbox" id="'.$nom.'" onClick="javascript:selectAll(this, '.sizeof($contenu).');" '.$checked.'/></td>';

//--- colonnes
for($i = 0, $max = sizeof($structure); $i < $max; $i++)
 {
	$str .= '<td ';
	if(isset($structure[$i]["align"])) $str .= 'align="'.$structure[$i]["align"].'" ';
	if(isset($structure[$i]["width"])) $str .= 'width="'.$structure[$i]["width"].'" ';
	$str .= '>'.$structure[$i]["name"].'</td>';
}

$str .= '<td width="1"></td>'
.'</tr>'
.'</table>'
.'</div>';

//////////////// contenu du composant \\\\\\\\\\\\\\\\\\\\\\\\\
$str .= '<div class="div_select_content" >'
.'<table width="100%">';

//--- pour chaque ligne
for($i = 0, $max = sizeof($contenu); $i < $max; $i++)
 {

	   //--- style css (pair / impair)
           if($i%2)
              $css_defaut = 'select_odd';
           else
              $css_defaut = 'select_even';

	//--- element selectionne ?
	if($selection != null && in_array($contenu[$i][0],$selection))
	 {
	     $checked = ' checked';
	     $css = 'select_checked';
	 }
	else {
		$checked = '';
		$css = $css_defaut;
	     }
		  	
		    $motif = $contenu[$i][0];
		    $string = $_SESSION['select_box'];

		    $pos = strpos($string, $motif);

	             if($pos === false)
	               {
    	                 //echo "No";
    	                 $str .= '<tr id="tr_'.$nom.$i.'" class="'.$css.'" onMouseOver=\'javascript:setEvenement("'.$nom.'","'.$i.'","over","'.$css.'",'.sizeof($contenu).',"td");\' onMouseOut=\'javascript:setEvenement("'.$nom.'","'.$i.'","out","'.$css_defaut.'",'.sizeof($contenu).',"td");\' '
.' onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click", "'.$css_defaut.'",'.sizeof($contenu).',"td");\' >'
.'<td width="20" ><input type="checkbox" id="'.$nom.$i.'" name="'.$nom.'[]"  value="'.$contenu[$i][0].'" onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click","'.$css_defaut.'",'.sizeof($contenu).',"ck");\' '.$checked.' /></td>';

	               }
	 	  else {   //echo "yes";
	 	  	   $str .= '<tr id="tr_'.$nom.$i.'" class="'.$css.'" onMouseOver=\'javascript:setEvenement("'.$nom.'","'.$i.'","over","'.$css.'",'.sizeof($contenu).',"td");\' onMouseOut=\'javascript:setEvenement("'.$nom.'","'.$i.'","out","'.$css_defaut.'",'.sizeof($contenu).',"td");\' '
.' onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click", "'.$css_defaut.'",'.sizeof($contenu).',"td");\' >'
.'<td width="20" ><input type="checkbox" id="'.$nom.$i.'" name="'.$nom.'[]" Checked="Checked" value="'.$contenu[$i][0].'" onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click","'.$css_defaut.'",'.sizeof($contenu).',"ck");\' '.$checked.' /></td>';

	 	  
                       }	

		     /*if(ereg($motif,$chaine)) 
		       {
   		          echo "La chaine contient le motif ";
		       }*/


//--- la checkbox
/*
$str .= '<tr id="tr_'.$nom.$i.'" class="'.$css.'" onMouseOver=\'javascript:setEvenement("'.$nom.'","'.$i.'","over","'.$css.'",'.sizeof($contenu).',"td");\' onMouseOut=\'javascript:setEvenement("'.$nom.'","'.$i.'","out","'.$css_defaut.'",'.sizeof($contenu).',"td");\' '
.' onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click", "'.$css_defaut.'",'.sizeof($contenu).',"td");\' >'
.'<td width="20" ><input type="checkbox" id="'.$nom.$i.'" name="'.$nom.'[]"  value="'.$contenu[$i][0].'" onClick=\'javascript:setEvenement("'.$nom.'","'.$i.'","click","'.$css_defaut.'",'.sizeof($contenu).',"ck");\' '.$checked.' /></td>';
*/

	//Checked="Checked" --- les colonnes
	for($j = 1; $j < sizeof($contenu[$i]); $j++)
 	   {
		$str .= '<td ';
		if(isset($structure[$j-1]["align"])) $str .= 'align="'.$structure[$j-1]["align"].'" ';
		if(isset($structure[$j-1]["width"])) $str .= 'width="'.$structure[$j-1]["width"].'" ';
		$str .= '>'.$contenu[$i][$j].'</td>';
	   }

	$str .= '</tr>';
}

//--- fermeture des balises
$str .= '</table>'
.'</div>'
.'</div>';

return $str;
}

?>

<?php

/***********************************************************************************/	

	$connexion = mysql_connect($db_host,$db_user,$db_pass); 
       	mysql_select_db($db_name, $connexion);
  
  	$table = "washer"; 
  
  	$requete = "SELECT filtre FROM categorie WHERE table_article='$table'";	

    	$result = mysql_query($requete);
    	$datas = mysql_fetch_array($result);
    	    	
    	// decoupe la chaine
    	$champs_filtre = explode(",", $datas[0]);
    	
    	//var_dump($champs_filtre);

	$critere01 = array(array());  
	$critere02 = array(array());  
	$critere03 = array(array());  
	$critere04 = array(array());  
	$critere05 = array(array());  
	$critere06 = array(array());  
	$critere07 = array(array());  
	$critere08 = array(array());  
	$critere09 = array(array());  
	$critere10 = array(array());  
	
	$item01 = "item01";
	$struct01 = array ( array("name" => "$champs_filtre[0]", "align" => "center", "width" => "40px"));
	
	$item02 = "item02";
	$struct02 = array ( array("name" => "$champs_filtre[1]", "align" => "center", "width" => "40px"));
	
	$item03 = "item03";
	$struct03 = array ( array("name" => "$champs_filtre[3]", "align" => "center", "width" => "40px"));
	
	$item04 = "item04";
	$struct04 = array ( array("name" => "$champs_filtre[3]", "align" => "center", "width" => "40px"));
	
	$item05 = "item05";
	$struct05 = array ( array("name" => "$champs_filtre[4]", "align" => "center", "width" => "40px"));
	
	$item06 = "item06";
	$struct06 = array ( array("name" => "$champs_filtre[5]", "align" => "center", "width" => "40px"));
	
	for($i=0; $i<count($champs_filtre); $i++) 
	   { 
		$connexion = mysql_connect($db_host,$db_user,$db_pass); 
       		mysql_select_db($db_name, $connexion);
  
  		$critere = $champs_filtre[$i];
  			
  		$requete = "SELECT $critere FROM $table";	
    		$result = mysql_query($requete);
    			
    		$p = 0;
    		$tempo = array();
    		
    		if($i == 0)
    		  { $tab = "critere01";
    		    $cpt = 0;
    		    while($data=mysql_fetch_row($result))  
             		{ 	if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere01[$p][0] = $data[0];
  				    $critere01[$p][1] = $data[0];
             	   		    $p = $p+1;
             			  } 
             			if($cpt > 0)
             			  {    $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
             	   		    else {  $tempo[] = $var;
             	   			    $critere01[$p][0] = $data[0];
  					    $critere01[$p][1] = $data[0];
             	   			    $p = $p+1;
             	   		          }
             	   		   }  
             	   		     $cpt = $cpt +1;   	
		    	}
    		  }	
		if($i == 1)
    		  { $tab = "critere02";
    		    $cpt = 0;
    		    while($data=mysql_fetch_row($result))  
             		{	if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere02[$p][0] = $data[0];
  				    $critere02[$p][1] = $data[0];
             	   		    $p = $p+1;
             			  } 
             			if($cpt > 0)  
             			  {    $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
             	   		    else {  $tempo[] = $var;  
             			            $critere02[$p][0] = $data[0];
  				            $critere02[$p][1] = $data[0];
             	   		            $p = $p+1;
			    	         }
			    	  }  
             	   		     $cpt = $cpt +1;   	
                      }
    		  }	
    		if($i == 2)
    		  { $tab = "critere03";
    		    $cpt = 0;
    		    while($data=mysql_fetch_row($result))  
             		{	if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere03[$p][0] = $data[0];
  				    $critere03[$p][1] = $data[0];
  				    $p = $p+1;
             			  } 
             			if($cpt > 0)
             			 {     $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
				        else {  $tempo[] = $var;  
             	   				$critere03[$p][0] = $data[0];
  						$critere03[$p][1] = $data[0];
             	   				$p = $p+1;
             	   			     }
             	   		 }	      	
             	   		    $cpt = $cpt +1;   	
		    	}
    		  }	
    		if($i == 3)
    		  { $tab = "critere04";
    		    $cpt = 0;
		    while($data=mysql_fetch_row($result))  
             		{       if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere04[$p][0] = $data[0];
 	                            $critere04[$p][1] = $data[0];
             	   		    $p = $p+1;
             			  } 
             			if($cpt > 0)
             			 {     $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
				       else {  $tempo[] = $var;  
             	   			       $critere04[$p][0] = $data[0];
  					       $critere04[$p][1] = $data[0];
             	   		               $p = $p+1;
             	   		            }
             	   		  }	      	
             	   		     $cpt = $cpt +1;        
		    	}	
    		  }	
    		if($i == 4)
    		  { $tab = "critere05";
    		    $cpt = 0;
		    while($data=mysql_fetch_row($result))  
             		{	if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere05[$p][0] = $data[0];
  				    $critere05[$p][1] = $data[0];
             	   		    $p = $p+1;
             			  } 
             			if($cpt > 0)
             			 {     $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
				        else {  $tempo[] = $var;  
             	   				$critere05[$p][0] = $data[0];
  						$critere05[$p][1] = $data[0];
             	   				$p = $p+1;
		    		             }
				 }	      	
             	   		      $cpt = $cpt +1;		    		             	
		        }
    		  }	      
		if($i == 5)
    		  { $tab = "critere06";
    		    $cpt = 0;
		    while($data=mysql_fetch_row($result))  
             		{	if($cpt == 0)
             			  { $tempo[] = $data[0];
             			    $critere06[$p][0] = $data[0];
   		                    $critere06[$p][1] = $data[0];
             	   		    $p = $p+1;
             			  } 
             			if($cpt > 0)
             			 {     $var = $data[0];
             			       if(in_array($var, $tempo))
             			         { $test = false;
				         }
				        else {  $tempo[] = $var;  
             	   				$critere06[$p][0] = $data[0];
  						$critere06[$p][1] = $data[0];
             	   				$p = $p+1;
             	   			     }
		    	           }
             	   		      $cpt = $cpt +1;
    		        }	
	          }
	      
	     }     

/***********************************************************************************/
	   
	if($_POST["submit"])
          {
                              	
  	       $_SESSION['select_box'] = "";
  	       $memoire = "";
  	       
  	       //echo '<body onLoad="alert(\' SUBMIT ...\')">'; 
  	
  	       $_SESSION['recharge'] = true;	
	       
               //echo '<b>Formulaire validé avec les éléments : </b><br>';
	
               $portion_sql = array();
	
	       if(count($critere01) != 0)
	         {
	            //echo '<b>- '.$item01.' :</b> ';
	    	    $chaine01 ="";	
	
	            if(count($_POST[$item01]) != 0)	
	              {
    		           for($i = 0; $i < sizeof($_POST[$item01]); $i++)
	                      {
				  //if($i > 0) 
				  //echo ', ';
			          //echo $_POST[$item01][$i];

				  $champ = $_POST[$item01][$i];

				  if($i<count($_POST[$item01])-1)
		  	            {$chaine01 = $chaine01 ."'$champ'" .", ";
		  	             $memoire = $memoire ." " .$champ .", ";
		  	            }
				  if($i == count($_POST[$item01])-1)
		     	            {$chaine01 = $chaine01 ."'$champ'";
			             $memoire = $memoire ." " .$champ ;
			            }  
			            
	                      }
	                      
	                    //array_push($_SESSION['clic'],$chaine01);  
		            //echo "++++++++ " .$chaine01;
		
		            $final01 = $champs_filtre[0] ." IN (" .$chaine01 .")";
	    	            $portion_sql[] = $champs_filtre[0] ." IN (" .$chaine01 .")";
	             }	
	             
	         }      
         
		//echo '<br /><br />';
          
               if(count($critere02) != 0)
	         {
	             //echo '<b>- '.$item02.' :</b> ';
	             $chaine02 ="";
	
	             if(count($_POST[$item02]) != 0)	
	               {	
	    	           for($i = 0; $i < sizeof($_POST[$item02]); $i++)
	                      {
			//if($i > 0)
			//echo ', ';
			//echo $_POST[$item02][$i];
			
			$champ = $_POST[$item02][$i];

			if($i<count($_POST[$item02])-1)
		  	  {$chaine02 = $chaine02 ."'$champ'" .", ";
		  	   $memoire = $memoire ." "  .$champ .", ";
		  	  }
			if($i == count($_POST[$item02])-1)
		     	  {$chaine02 = $chaine02 ."'$champ'";
		     	   $memoire = $memoire ." " .$champ ;
			  }  
	            }
	         //array_push($_SESSION['clic'],$chaine02);  
	         //echo "++++++++ " .$chaine02;
	       
	         $final02 = $champs_filtre[1] ." IN (" .$chaine02 .")";
	         $portion_sql[] = $champs_filtre[1] ." IN (" .$chaine02 .")";
             }

          }  
	
	//echo '<br /><br />';

	if(count($critere03) != 0)
	  {
	    //echo '<b>- '.$item03.' :</b> ';
	    $chaine03 ="";	
	
	    if(count($_POST[$item03]) != 0)	
	      {
		 for($i = 0; $i < sizeof($_POST[$item03]); $i++)
	            {
			//if($i > 0) 
			//echo ', ';
			//echo $_POST[$item03][$i];
			
			$champ = $_POST[$item03][$i];

			if($i<count($_POST[$item03])-1)
		  	  {$chaine03 = $chaine03 ."'$champ'" .", ";
		  	    $memoire = $memoire ." "  .$champ .", ";
		  	  }
			if($i == count($_POST[$item03])-1)
		     	  {$chaine03 = $chaine03 ."'$champ'";
		     	   $memoire = $memoire ." " .$champ ;
			  }  
	            }
                 //array_push($_SESSION['clic'],$chaine03);    
		 //echo "++++++++ " .$chaine03;
		
	         $final03 = $champs_filtre[2] ." IN (" .$chaine03 .")";
	         $portion_sql[] = $champs_filtre[2] ." IN (" .$chaine03 .")";
	     }	

          }  
	//echo '<br /><br />';
          
        if(count($critere04) != 0)
	  {
	    //echo '<b>- '.$item04.' :</b> ';
	    $chaine04 ="";
	
	    if(count($_POST[$item04]) != 0)	
	      {
	         for($i = 0; $i < sizeof($_POST[$item04]); $i++)
	            {
			//if($i > 0) 
			//echo ', ';
			//echo $_POST[$item04][$i];

			$champ = $_POST[$item04][$i];

			if($i<count($_POST[$item04])-1)
		  	  {$chaine04 = $chaine04 ."'$champ'" .", ";
		  	   $memoire = $memoire ." " .$champ .", ";
		  	  }
			if($i == count($_POST[$item04])-1)
		     	  {$chaine04 = $chaine04 ."'$champ'";
		     	   $memoire = $memoire ." " .$champ ;
			  }  
	           }
                 //array_push($_SESSION['clic'],$chaine04);      
		 //echo "++++++++ " .$chaine04;
		
	         $final04 = $champs_filtre[3] ." IN (" .$chaine04 .")";
	         $portion_sql[] = $champs_filtre[3] ." IN (" .$chaine04 .")";
             }

          }    
          
	//echo '<br /><br />';

	if(count($critere05) != 0)
	  {
	    //echo '<b>- '.$item05.' :</b> ';
	    $chaine05 ="";
	
	    if(count($_POST[$item05]) != 0)	
	      {
	         for($i = 0; $i < sizeof($_POST[$item05]); $i++)
	            {
			//if($i > 0) 
			//echo ', ';
			//echo $_POST[$item05][$i];
		
			$champ = $_POST[$item05][$i];

			if($i<count($_POST[$item05])-1)
		  	  {$chaine05 = $chaine05 ."'$champ'" .", ";
		  	    $memoire = $memoire ." "  .$champ .", ";
		  	  }
			if($i == count($_POST[$item05])-1)
		     	  {$chaine05 = $chaine05 ."'$champ'";
		     	   $memoire = $memoire ." "  .$champ ;
			  }  
	            }
                  //array_push($_SESSION['clic'],$chaine05);      
	          //echo "++++++++ " .$chaine05;
	       
       	          $final05 = $champs_filtre[4] ." IN (" .$chaine05 .")";
	          $portion_sql[] = $champs_filtre[4] ." IN (" .$chaine05 .")";
	     }	

          }  
          
	//echo '<br /><br />';
         
        if(count($critere06) != 0)
	  {
	    //echo '<b>- '.$item06.' :</b> ';
	    $chaine06 ="";
	
	    if(count($_POST[$item06]) != 0)	
	      {	
	
	         for($i = 0; $i < sizeof($_POST[$item06]); $i++)
	            {
			//if($i > 0) 
			//echo ', ';
			//echo $_POST[$item06][$i];
		
			$champ = $_POST[$item06][$i];

			if($i<count($_POST[$item06])-1)
		  	  {$chaine06 = $chaine06 ."'$champ'" .", ";
		  	   $memoire = $memoire ." "  .$champ .", ";
		  	  }
			if($i == count($_POST[$item06])-1)
		     	  {$chaine06 = $chaine06 ."'$champ'";
		     	   $memoire = $memoire ." "  .$champ ;
			  }  
	            }
                 //array_push($_SESSION['clic'],$chaine06);    
	         //echo "++++++++ " .$chaine06;
	       
	         $final06 = $champs_filtre[5] ." IN (" .$chaine06 .")";
	         $portion_sql[] = $champs_filtre[5] ." IN (" .$chaine06 .")";
              }

          }    
        
      
         
        $_SESSION['select_box'] = $memoire;
         
        /*echo "<br>"; 
	echo "<pre>"; 
        var_dump($_SESSION['select_box']);
        echo "</pre>";
        echo "<br>";  
	
	echo "<br>"; 
	echo "<pre>"; 
	var_dump($portion_sql);
	echo "</pre>";
        echo "<br>"; */
        
        $nb_options = count($portion_sql);
        //echo "Options: " .$nb_options;
        //echo "<br>"; 
        
        $_SESSION['nb_options'] = $nb_options ;
        
        if($nb_options != 0 )
          { $_SESSION['mode'] = "filtre";
          }
        else { $_SESSION['mode'] = "defaut"; 
             }  

	$_SESSION['page'] == 1;             
        	
         // construire le requete
	    
	    $portion ="";
	    $chaine = "";
	    
	    for($k=0; $k<=count($portion_sql)-1; $k++) 
  	       { 
  	       	 	$champ = $portion_sql[$k];
  	       		
  	       		if(champ !="")
  	       		  {
  	       	  		if($k<count($portion_sql)-1)
		    		  {$chaine = $chaine .$portion_sql[$k] ." and ";
	            		  }
	          		if($k == count($portion_sql)-1)
		    		  {$chaine = $chaine .$portion_sql[$k];
	            		  }  
	       		  }
	       }		  
	       
	       if($chaine == "")
	         {  $req = " SELECT * FROM $table ";
	         }	
	       else {
	             $req = " SELECT * FROM $table WHERE " .$chaine;
		     //echo $req;
		}
		
		$_SESSION['champ_requete'] = $req;		
		
		$connexion = mysql_connect($db_host,$db_user,$db_pass); 
       	    	mysql_select_db($db_name, $connexion);
	    
	    	//$requete = " SELECT * FROM cruchot WHERE chargement = 'Hublot' or chargement = '2' ";
	    	$result = mysql_query($req);
	    
	    	//echo "<br>"; 
	    	//echo "Nb de resultat:" .mysql_num_rows($result); 
	    	//echo "<br>"; 
	    
	    	$nb_resultats_filtre = mysql_num_rows($result);
    	
	    	if($nb_resultats_filtre != 0)
	          { 	  
	          	  	
    	    	   while($datas = mysql_fetch_assoc($result))
                        {  $_SESSION['reponse_requete'] = true;
                          //echo $datas['reference'];
                          //echo "<br>"; 
                        }
                  }
          	else { //echo "Aucune réponse";
          	       $_SESSION['reponse_requete'] = false;	
          	     } 
	    
	    	//echo "<br>"; 
	    	//echo "<br>"; 
	
}   

/***********************************************************************************/
	
	$table = "washer"; 

	$connexion = mysql_connect($db_host,$db_user,$db_pass); 
        mysql_select_db($db_name, $connexion);
  
  	$requete = "SELECT filtre FROM categorie WHERE table_article='$table'";	
   	$result = mysql_query($requete);
   	$datas = mysql_fetch_array($result);
    	    	
   	// decoupe la chaine
   	$champs_filtre = explode(",", $datas[0]);
	
?>


<!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" xml:lang="fr" lang="fr"><head>
	
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Patrice Delpy : Lave-Linge</title>

<link href="../feuille.css" rel="stylesheet" type="text/css">



<style type="text/css">
.nav-line li.Composants a {background-position: 50% 100% !important;}
</style>
<style media="screen" type="text/css">#a3519779776 {visibility:hidden}
</style>
            
            
       </head>
       
       <body class="gecko">
				<!-- page -->
		<div style="z-index: 1000; position: relative;" id="page">

			<!-- header -->
			<div id="header">
			<h1><a name="top" href="http://www.materiel.net/">Materiel.net</a></h1>
			</div>

			<!-- nav -->
			
		<div id="nav">
				<div class="GHeadMenu">

<ul class="nav-line">

<li class=""><a href="http://analog-design.net/DEV/acceuil.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="" title="Accueil"><span>Accueil</span></a></li>

<li class="Bonnes affaires"><a href="http://analog-design.net/DEV/Archive/affaires.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97759.gif&quot;);" title="Bonnes affaires"><span>affaires</span></a></li>

<li class="Gros menager"><a href="http://analog-design.net/DEV/Archive/gros_menager.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97760.gif&quot;);" title="Gros menager"><span>Gros Ménager</span></a></li>

<li class="Petit menager"><a href="http://analog-design.net/DEV/Archive/petit_menager.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97761.gif&quot;);" title=" Petit ménager"><span>PEtit Menager</span></a></li>

<li class="Images"><a href="http://analog-design.net/DEV/Archive/image.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97762.gif&quot;);" title="Images"><span>Images</span></a></li>

<li class="Son"><a href="http://analog-design.net/DEV/Archive/son.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97763.gif&quot;);" title="SON"><span>SON</span></a></li>

<li class="Video"><a href="http://analog-design.net/DEV/Archive/video.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97764.gif&quot;);" title="Video"><span>Video</span></a></li>

<li class="Photo et camescope"><a href="http://analog-design.net/DEV/Archive/photo_camescope.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97769.gif&quot;);" title="Photo / caméscopes">Photo / caméscopes</a></li>

<li class="Telephonie"><a href="http://analog-design.net/DEV/Archive/telephonie.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97770.gif&quot;);" title="Téléphonie">Téléphonie </a></li>

</ul>
<ul class="nav-line">

<li class="art de la table"><a href="http://analog-design.net/DEV/Archive/art_de_la_table.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97766.gif&quot;);" title="Art de la table"><span>Art de la table</span></a></li>

<li class="Accessoires"><a href="http://analog-design.net/DEV/Archive/accessoires.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97767.gif&quot;);" title="Accessoires &amp;Consommables"><span>accessoires &amp;consommables</span></a></li>

<li class="Chauffage &amp; clim"><a href="http://analog-design.net/DEV/Archive/chauffage_clim.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97768.gif&quot;);" title="Chauffage &amp; Clim"><span>chauffage &amp; clim</span></a></li>

<li class="Automobiles"><a href="http://analog-design.net/DEV/Archive/automobile.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97769.gif&quot;);" title="Automobiles"><span>Automobiles</span></a></li>

<li class="GPS"><a href="http://analog-design.net/DEV/Archive/gps.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97770.gif&quot;);" title="GPS"><span> GPS</span></a></li>

<li class="MP3"><a href="http://analog-design.net/DEV/Archive/mp3.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="background-image: url(&quot;/live/97771.gif&quot;);" title="AUDIO / MP3 / MP4"><span>AUDIO / MP3 / MP4</span></a></li></ul>
			  </div>



            
<!--cached-->			</div>

			<!-- section :content -->
			<div id="section" class="cat">


<div id="cat" style="overflow: auto;">

	<div style="float: left; width: 175px; margin-left: 0px;">
		<h2 style="margin: 0px; background: url(&quot;../images/cat_default.png&quot;) no-repeat scroll 0% 0% rgb(51, 153, 51); padding-bottom: 5px; line-height: 18px; text-transform: uppercase; font-weight: normal; text-align: center; font-size: 11px; -moz-background-inline-policy: continuous;">Les gammes de produits</h2>
		<ul class="CatList" style="background: url(&quot;../images/cat_fond.png&quot;) repeat-x scroll 0% 0% transparent; -moz-background-inline-policy: continuous;">

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/lave-linge.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItemHL">Lave-Linge</a></li>

<li><a href="http://analog-design.net/DEV/Archive/filtre_lave-linge.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" class="CatListSubItem">UN</a></li>
<li><a href="http://analog-design.net/DEV/Archive/filtre_lave-linge.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" class="CatListSubItem">DEUX</a></li>
<li><a href="http://analog-design.net/DEV/Archive/filtre_lave-linge.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" class="CatListSubItem">TROIS</a></li>


<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/lave-linge-sechant.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Lave-Linge sèchant</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/seche_linge.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Sèche-Linge</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/lave_vaisselle.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Lave-Vaisselle</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/refrigerateur.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Réfrigérateur</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/congelateur.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Congélateur</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/cave_vin.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Cave à vin</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/table_cuisson.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Table de cuisson</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/four.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Four</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/cuisiniere.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Cuisiniére</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/micro_onde.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Micro onde</a></li>

<li style="border-bottom: 3px solid rgb(244, 244, 244);"><a href="http://analog-design.net/DEV/Archive/grillade_barbecue.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e" style="border-bottom: 1px solid rgb(153, 153, 153);" class="CatListItem">Grillade / Barbecue</a></li>

				</ul>
                
                
		
	</div>




<div style="border-left: 1px solid rgb(160, 160, 160); float: right; width: 760px; margin-left: 6px; padding-left: 6px; padding-right: 6px; text-align: left;">
	<table class="CatTitle" border="0" cellpadding="0" cellspacing="0" width="100%">
		<tbody><tr>
			<th height="40" valign="baseline" width="88%">
				UNIVERS LAVAGE				
				  <hr>
			</th>
			<td rowspan="2" class="ImgZone" width="12%"><img src="filtre_lave-linge.php_fichiers/26947.htm" alt=""></td>
		</tr>
		<tr>
			<td style="vertical-align: top;"><a style="color: rgb(51, 153, 51);" href="http://analog-design.net/DEV/acceuil.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e">Accueil</a> &gt; <a style="color: rgb(51, 153, 51);" href="http://analog-design.net/DEV/Archive/gros_menager.php?PHPSESSID=0b49e0891d3f02eafc3b7abe9a49ba1e">Gros ménager</a> &gt; Lave-Linge</td>
		</tr>
	</tbody></table>
	<table class="ProdFilter" style="clear: both;" border="0" cellpadding="0" cellspacing="0" width="100%;">
	  <tbody>
	    <tr>
	      <th align="left" height="30" valign="top" width="500">Filtres par caractéristiques
	        <input autocomplete="off" id="FilterSF" value="" type="hidden" /></th>
	      </tr>
	    <tr>
	      <td valign="top"><table class="ProdFilterList" border="0" cellpadding="0" cellspacing="0" width="100%">
	        <tbody>
	          <tr>
<!--	            <form name="form_select" method="post" action="">
	              <div align="center" >

	                <th><?php echo checkedSelect($nom1, $structure1, $contenu1, $_POST[$nom1]); ?></th> 
	                <th><?php echo checkedSelect($aanom2, $aastructure2, $aacontenu2, $_POST[$aanom2]); ?></th>  -->

   
	        <th>&nbsp;</th>
	        <th>&nbsp;</th>
	        <th>&nbsp;</th>
	               
	                
	                
	               
<!--	                <br />
	                <input type="submit" name="submit" value="envoyer" />
	                </div>
	              </form> -->
	            <th>&nbsp;</th>
	            <th>&nbsp;</th>
	            <th>&nbsp;</th>
	            <td>
	            <script type="text/javascript">
								Slide = new CSlide(36, 277, 200, 16);
								Slide.Create('FilterPrice', null);
								Slide.SetValues(0, 0);
								if(Slide.onchanged != 'undefined') {
									Slide.onchanged = function(MinVal, MaxVal) {
										ProdListUpdate("Disques_durs_internes_SATA");
									};
								}
			</script>
			</td>
	            </tr>
	          <tr>
	          	<form name="form_select" method="post" action="">
	              <div align="center" >
	            <th width="17%"><?php echo checkedSelect($item01, $struct01, $critere01, $_POST[$item01]); ?> &nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%"><?php echo checkedSelect($item02, $struct02, $critere02, $_POST[$item02]); ?>&nbsp;</th>
	            <th width="17%"></th>
	            <th width="17%"><?php echo checkedSelect($item03, $struct03, $critere03, $_POST[$item03]); ?></th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            </tr>
	          <tr>
	            <th width="17%"><?php echo checkedSelect($item04, $struct04, $critere04, $_POST[$item04]); ?></th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%"><?php echo checkedSelect($item05, $struct05, $critere05, $_POST[$item05]); ?></th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%"><?php echo checkedSelect($item06, $struct06, $critere06, $_POST[$item06]); ?></th>
	            <th width="17%">&nbsp;</th>
	            <td width="83%">&nbsp;</td>
	             <br />
	                <input type="submit" name="submit" value="envoyer" />
	                </div>
	              </form>
	            </tr>
	          <tr>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <td width="83%">&nbsp;</td>
	            </tr>
	          <tr>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <th width="17%">&nbsp;</th>
	            <td width="83%">&nbsp;</td>
	            </tr>
	          </tbody>
	        </table></td>
	      </tr>
	    <tr style="background:url(../images/CatFiltreLine.gif);">
	      <td align="left" style="padding:0"><img src="../images/CatFiltreLeft.gif" width="8" height="10" alt="" /></td>
	      <td style="padding:0"><img src="../images/CatFiltreRight.gif" width="8" height="10" alt="" align="right"/></td>
	      </tr>
	    </tbody>
	  </table>
	<!-- filtre -->
		<a name="prods"></a>
		<div id="ProdListArea" class="ProdList" style="margin-top: 20px;">
	<div id="Plc" class="ProdListCount">
	<div style="float: left; height: 34px;"><?php echo $nb_resultats_filtre; ?> produits correspondent à vos critères de sélection</div>

	<div id="DisplayType1" class="CatDisplayType" style="background: url(&quot;/images/gui/main/CatViewDetail.gif&quot;) no-repeat scroll center top transparent; -moz-background-inline-policy: continuous;" onclick="ProdListView('Disques_durs_internes_SATA', 1);"></div>
    
    
	<div id="DisplayType2" class="CatDisplayType" style="background: url(&quot;/images/gui/main/CatViewList.gif&quot;) no-repeat scroll center bottom transparent; -moz-background-inline-policy: continuous;" onclick="ProdListView('Disques_durs_internes_SATA', 2);"></div>
</div>

<div style="clear: both;"></div>

<?php
	if($_SESSION['reponse_requete'] == true)
	  {
	    echo "	<table class=\"ProdList\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"750px;\">
			<tbody>
			<tr>
			<th width=\"106\">&nbsp;</th>
			<th width=\"99\"><a href=\"#\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 1, 1, 1); return false;\">Marque</a></th>
			<th width=\"203\"><a href=\"#\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 2, 0, 1); return false;\">Nom</a></th>
			<th width=\"63\"><a href=\"#\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 3, 0, 1); return false;\">Prix TTC</a></th>
			<th width=\"40\"><a href=\"#\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 4, 0, 1); return false;\">Dispo</a></th>
			<th width=\"194\">Caracteristiques</th>
			<th colspan=\"2\" width=\"59\">&nbsp;</th>
			</tr>
			
			<tr class=\"ProdListHLine\">
			<td></td>
			<td width=\"99\"><img src=\"filtre_lave-linge.php_fichiers/ProdListHArrowA.htm\" alt=\"\"></td>
			<td width=\"203\"></td>
			<td width=\"63\"></td>
			<td width=\"40\"></td>
			<td width=\"194\"></td>
			<td colspan=\"2\" width=\"59\">
			</td>
			</tr> ";
	   }	
    
?>    

<?php

	   $ligne_par_page = 2;
	   
	   if(isset($_GET['page'])) 
	     {  
		$pageActuelle=intval($_GET['page']);
	     }
	    else  { $pageActuelle=1;   
	          }
	
	   if($_SESSION['recharge'] == true)
             {   $_SESSION['recharge'] = false;
                 $pageActuelle=1;
	     }	

	   $premiereEntree=($pageActuelle-1)*$ligne_par_page;    
	  
  	   if($_SESSION['mode'] == "filtre")
  	     {  //echo "filtrage";
  	        //echo "<br>"; 
  
  		$connexion = mysql_connect($db_host,$db_user,$db_pass); 
       	    	mysql_select_db($db_name, $connexion);	        
       	    	//echo $_SESSION['champ_requete'];
       	    	//echo "<br>"; 
       	    	$r = $_SESSION['champ_requete'];
  	        $retour_messages = mysql_query($r);
  	        $nb_resultats_filtre = mysql_num_rows($retour_messages);
  	     }

  	    if($_SESSION['mode'] == "defaut")
  	     {  //echo "defaut";
  	        //echo "<br>"; 
  	     	
  	     	$connexion = mysql_connect($db_host,$db_user,$db_pass); 
 		mysql_select_db($db_name, $connexion);
  	        
  	        $result = mysql_query("SELECT * FROM $table"); 
  	        $nb_resultats_filtre = mysql_num_rows($result);
  	        
  	        //echo ">>>>>> Resultats : " .$nb_resultats_filtre;
  	        
  	        $connexion = mysql_connect($db_host,$db_user,$db_pass); 
 		mysql_select_db($db_name, $connexion);
  
	        $retour_messages = mysql_query("SELECT * FROM $table"); 	
  	     } 

	        $nombre_pages = ceil($nb_resultats_filtre/$ligne_par_page); 	
	        //echo " >>> Nb pages >>> " .$nombre_pages;
	        //echo "<br>"; 
	  
	        $sauvegarde = array(array()); 
	        $ptr = 0;
	 	   
          while($data=mysql_fetch_assoc($retour_messages)) 
               {
		    $tab = array();
		    $chaine = "";
		    
		    $marque = $data['marque'];
   		    $prix_ttc = $data['prix_ttc'];
 		    $designation = $data['designation'];
   		    $reference = $data['reference'];
		    $dispo = $data['dispo'];
  		    $s1 = $designation ." " .$reference;
  		    
       	   	    $tab[] = $marque;
       	   	    $tab[] = $prix_ttc;
       	   	    $tab[] = $designation;
       	   	    $tab[] = $reference;
       	   	    $tab[] = $dispo;
       	   	    $tab[] = $s1;
		   
	    	    $motif_underscore = '_';
		    $espace = " ";
		  
		    for($j=1; $j<count($champs_filtre); $j++) 
	               {  $val = $champs_filtre[$j];
				 
			  if($j<count($champs_filtre) )
			    { $chaine = $chaine ." " .$val ." " .$data[$val] .",";
			    }
	
			   else {  $chaine = $chaine ." " .$val ." " .$data[$val] ;
			        }
				  
			}
	
		     if(preg_match('`\_`', $chaine))
		       { $chaine = str_replace($motif_underscore, $espace, $chaine);
		       }

		     $tab[] = $chaine;	
		     
		     // sauve dans le tableau multidimensionnel
        	     $sauvegarde[$ptr] = $tab;
        	     
        	     $ptr = $ptr + 1;
        	     
        	 }    
        	        
        	 	//echo "<br>"; 
			//echo "<pre>"; 
			//print_r($sauvegarde);
			//echo "</pre>";
             		//echo "<br>"; 
			
			/************************************/
			
			$nb_lignes = count($sauvegarde);
			//echo "nb_lignes: " .$nb_lignes;
			//echo "<br>";

			$limite = $nb_lignes - 1;

			//echo "Start: " .$premiereEntree;
			//echo "<br>";
			
			$final = $premiereEntree + $ligne_par_page;
			
			if($final > $nb_lignes )
			  { $final = $nb_lignes;
			  }	
		
			//echo "Stop: " .$final;
			//echo "<br>";
			//echo "Requete: " .$req;
			//echo "<br>";
			

			/************************************/

	if($_SESSION['reponse_requete'] == true)
	  {	
		for($i=$premiereEntree; $i<$final ; $i++) 
		    {
			  	$marque = $sauvegarde[$i][0];
   		    		$prix_ttc = $sauvegarde[$i][1];
 		    		$designation = $sauvegarde[$i][2];
   		    		$reference = $sauvegarde[$i][3];
		    		$dispo = $sauvegarde[$i][4];
  		    		$s1 = $sauvegarde[$i][5];
		    		$chaine = $sauvegarde[$i][6];
		    	
			        if($i%2 ==0)
			          { // paire;
			      	    echo "<tr class=\"ProdListL1\">";
			          }
		    
			        else { // impair;
			        	 echo "<tr class=\"ProdListL1\">";
				     } 
					   
			        switch($dispo)
	  		              {
					  case "24H" :
					          $dispo_logo  = "../images/stock_vert.gif";
					          $dispo_message = "En stock";
					    	  break;
					  case "48H" :
					          $dispo_logo  = "../images/stock_bleu.gif";
					          $dispo_message = "En cours d'approvisionnement";
					    	  break;
					  case "72H" :
					          $dispo_logo  = "../images/stock_rouge.gif";
					          $dispo_message = "Rupture de stock";
					    	  break;  	  		  
				     }		 
					 
				echo "
					<td class=\"Photo\" width=\"106\">
				        <a href=\"page.html\">
					<img src=\"filtre_lave-linge.php_fichiers/99897.htm\" alt=\"message\"></a></td>
					<td class=\"Marque\" width=\"99\">$marque</td>
					<td class=\"Desc  \" width=\"203\">
					<a href=\"page.html\">$s1</a>
				        <div class=\"TagLine\">message</div>
				        </td>
					<td class=\"Price\" width=\"63\">$prix_ttc &#8364;</td>
					<td class=\"AlignCenter\" width=\"40\">
					<img src=\"$dispo_logo\" alt=\"$dispo_message\" title=\"$dispo_message\" ></td>
	
	
			                <td class=\"Carac\" width=\"194\">$chaine</td>
					<td class=\"AlignCenter\">
					<input name=\"comp\" value=\"53771\" type=\"checkbox\"></td>
					<td class=\"AlignCenter\" width=\"30\">
					<a href=\"#\" onclick=\"ChangeAmount('53771', +1, 'Hitachi Deskstar 7K1000.C S-ATA - 1000 Go - 32 Mo'); return false; \">
					<img src=\"../images/ProdBuySmall.gif\" alt=\"Ajouter au panier\" title=\"Ajouter au panier\" border=\"0\"></a>
					</td>
					</tr>
						";
									
		   
			}
			
    				echo "
					<tr class=\"ProdListBLine\">
					<td width=\"106\">Page 1 sur 3</td>
					<td colspan=\"7\">
					<span class=\"Nav\">&lt;</span>	 ";
					
					
					for($i=1; $i<=$nombre_pages; $i++) //On fait notre boucle
				   	{ 	echo "<span class=\"Nav\"> 
				   		
				   		<a href=\"filtre_lave_linge2.php?page=$i \">$i</a></span> ";
				   	}
					
				echo "	
					<span class=\"Nav\">&gt;</span>
					</td>
					</tr> ";

/*					<tr class=\"ProdListBLine\">
					<td width=\"106\">Page 1 sur 3</td>
					<td colspan=\"7\">
					<span class=\"Nav\">&lt;</span>
					<span class=\"Nav\">1</span>
					<span class=\"Nav\">
					
					
					
					<a href=\"#prods\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 1, 0, 2);\">2</a></span>
					<span class=\"Nav\">
					<a href=\"#prods\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 1, 0, 3);\">3</a></span>
					<span class=\"Nav\">
					<a href=\"#prods\" onclick=\"ProdListUpdate('Disques_durs_internes_SATA', 1, 0, 2);\">&gt;</a></span>
					</td>
					</tr> ";
*/		

             			//Pour l'affichage, on centre la liste des pages 
             			echo '<p align="center">Page : '; 
		
	     			for($i=1; $i<=$nombre_pages; $i++) //On fait notre boucle
				   {
     		  			//On va faire notre condition
     		  			if($i==$pageActuelle) //Si il s'agit de la page actuelle...
     					  {
         				    echo ' [ '.$i.' ] '; 
     		     			  }	
     				        else //Sinon...
     					   {	//essai avec une variable post pour éviter ?page ....
	          			     echo ' <a href="filtre_lave_linge2.php?page='.$i.' ">'.$i.'</a> ';
	     			            }
		                   }
				
				echo '</p>';
				
				
        
	          echo "
	  		<tr>
	  		<td colspan=\"6\" height=\"40\">Afficher
			<select name=\"select\" onchange=\"ProdListPpp('Disques_durs_internes_SATA', this.value);\" style=\"height: 20px; font-size: 10px;\">
			<option value=\"10\">10 produits</option>
			<option value=\"25\" selected=\"selected\">25 produits</option>
			<option value=\"50\">50 produits</option>
			<option value=\"-1\">tous les produits</option>
			</select>
			</td>
	
			<td colspan=\"2\" align=\"right\">
			<input value=\"Comparer\" onclick=\"ProdComp();\" type=\"button\">
			</td>
			</tr>
        		</tbody>
        		</table>
			</div> ";
		}			

?>


<!-- filtre -->	
    
<div align="center"></div>


</div>
</div>		
</div>

			<!-- aside -->
			<div id="aside">
				<div id="search-bar">
	<form method="get" action="http://www.materiel.net/search.html"><input name="PHPSESSID" value="0b49e0891d3f02eafc3b7abe9a49ba1e" type="hidden">
		<input name="search" title="Recherche" type="text">
		<input value="Rechercher" type="submit">
	</form>
</div>
				<div id="account">
	<ul>
		<li class="icon"><a href="http://www.materiel.net/client/login.html">Mon espace perso</a></li>
	</ul>
	

	<div class="panel">
	<form action="/client/logincheck.nt.php" method="post"><input name="PHPSESSID" value="0b49e0891d3f02eafc3b7abe9a49ba1e" type="hidden">
	<dl>
	<dt><label for="login">Votre nom d'utilisateur</label></dt>
	<dd><input name="login" id="login" maxlength="20" type="text"></dd>
	<dt><label for="pass">Votre mot de passe</label></dt>
	<dd><input name="pass" id="pass" maxlength="10" type="password"></dd>
	</dl>
	<input value="Connexion" type="submit">
	<hr>
	<ul class="buttons">
	<li class="register"><a href="http://www.materiel.net/client/register.html">Créer mon compte</a></li>
	<li class="password"><a href="http://www.materiel.net/client/sendpass.html">Mot de passe oublié ?</a></li>
	</ul>
	</form>
	</div>
	</div>

	<div id="basket">
	<ul>
	<li id="BasketProdCount"><a href="http://www.materiel.net/panier.html">Votre panier est vide</a></li>
	<li id="BasketAmount"></li>
	</ul>
	</div>
	</div>

<!-- footer -->

	</div>
	</body>
	</html>