
		<head>
	       <title>Electroménager - Lavage - Lave-linge:</title>
	       <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
		<link href="filtre.css" rel="stylesheet" type="text/css">


		<script src="tablefilter.js" language="javascript" type="text/javascript"></script>

		
		</head>

		<body>

<?php


	
		


	echo "

		<h1>Filtrage Lave-Linge</h1>
		<div id=\"extGrid\">

  		<label>Marque:</label><br/>
		<span id=\"sel_marque\"></span><br/>
	    
		<label>Chargement:</label><br/>
		<span id=\"sel_chargement\"></span><br/><br/>

		<label>Capacit&eacute;:</label><br/>
		<span id=\"sel_capacite\"></span><br/>
    
    		<label>Classe:</label><br/>
		<span id=\"sel_classe\"></span><br/>
    
    		<label>Essorage:</label><br/>
		<span id=\"sel_essorage\"></span><br/>

		
		</form>
		<hr/>
		<div style=\"float:left;\">
	  	<input id=\"btnFlt\" value=\"Filtrer\" type=\"button\" onclick=\"tf_demo.Filter();\" />&nbsp;
	  	<input id=\"btnClr\" value=\"Tout voir\" type=\"button\" 
			onclick=\"tf_demo.ClearFilters(); 
				//clears radio btns				
				for( var o=frmRadioInps.elements, p=o.length - 1; p > -1; p--) {
				  if ( o[p].type ) o[p].checked = false;
				}			
			\" />
		</div>

		<div id=\"statusDiv\"></div>
		<div style=\"clear:both;\"></div>
		<hr/>
		
		
		
		
		<input type=\"checkbox\" id=\"paging\" 
			onclick=\"if(this.checked){
				if( tf_demo.paging ) return;
				tf_Id('pagingFeatures').style.display = '';
				tf_demo.AddPaging(true); //easy way to add paging when filter grid bar is already set
			}else{
				if( !tf_demo.paging ) return;
				tf_Id('pagingFeatures').style.display = 'none';
				tf_demo.paging = false; //behaviour is removed here
				tf_demo.RemovePaging();
				tf_demo.Filter();
			} \" /> Mise en page 
		<br/>

			

		<hr/>
	
		<div id=\"pagingFeatures\" style=\"display:none; font-size:10px;\">
			Aller à la page : 
		<input type=\"text\" id=\"goto\" name=\"goto\" size=\"3\" /><input type=\"button\" value=\"Aller à la page\" 
				onclick=\"javascript: 
				if(!tf_demo.paging) return; 
				tf_demo.SetPage(parseInt(tf_Id('goto').value)); \" />
		<br/>
		
		<a href=\"javascript:tf_demo.SetPage('Previous');\">Page precedente</a> |
		<a href=\"javascript:tf_demo.SetPage('first');\">Premiére page</a> |
		<a href=\"javascript:tf_demo.SetPage('last');\">Derniére page</a> |
		<a href=\"javascript:tf_demo.SetPage('Next');\">Page suivante</a>
		
		</div>
		</div> ";

	echo "

		<div style=\"float:left; border:1px solid #333; width:680px;\">
		<table id=\"demo\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">

		<thead>
		<tr>
	  	<th width=\"12%\" nowrap=\"\">Marque</th>
	  	<th width=\"13%\" nowrap=\"\">Mod&eacute;le</th>
		<th width=\"13%\" nowrap=\"\">Chargement</th>
		<th width=\"12%\" align=\"right\" nowrap=\"\">Capacit&eacute;</th>
		<th width=\"10%\" align=\"right\" nowrap=\"\">Classe</th>
		<th width=\"10%\" align=\"right\" nowrap=\"\">Essorage</th>
		<th width=\"7%\" align=\"right\" nowrap=\"\">Dispo</th>
		<th width=\"13%\" align=\"right\" nowrap=\"\">Prix TTC</th>
		<th width=\"7%\" align=\"right\" nowrap=\"\">Panier</th>
		</tr>
		</thead> ";
		
		
		$db_type   = "mysql";
		$db_user   = "analogde";
		$db_pass   = "rainbow";
		$db_name   = "analogde";
		$db_host    = "sql2";
		
		//$connexion = mysql_connect($db_host,$db_user,$db_pass); 
		$connexion = mysql_connect("localhost", "root", "");

        	if(!$connexion)
          	{ die('Could not connect: ' . mysql_error());
          	}
  
        	//echo 'Connexion réussie';
        	//$db = mysql_select_db($db_name,$connexion); 
        	mysql_select_db("boutique", $connexion);

        	$sql = 'SELECT marque,modele,chargement,capacite,essorage,classe,stocke,prix_ttc FROM lave_linge'; 
  
  		$result = mysql_query($sql);
  		
  		echo " 
    		 	<tbody> ";
  		
  		$table_produit = "lave_linge";
  		
  		while ($data=mysql_fetch_row($result))  
                {
    		  
	    		$lien_marque = "Logo marque/" . $data[0] .".jpg";
	    		$lien_capacite = "Logo capacite/logo-capacite-" . $data[3] .".jpg";
			$lien_classe = "Logo energie/logo-energetique-" . $data[5] .".jpg";
			$lien_essorage = "Logo essorage/logo-" . $data[4] . "-trsmin.jpg";

    		// style=display:none
    		 // style=visibility:hidden
    		
    		 echo " 
    		 
    		 
    		 	
    		 	<tr>

        		<td style=\"color:#FFF\">$data[0]<img src=\"$lien_marque\"  width=\"75\" height=\"24\"  align=\"right\"  /></td>

		        <td><div align=\"center\"><a href=\"produit.php?id=$data[1]&table=$table_produit\">$data[1]</a></div></td>

		        <td><div align=\"center\">$data[2]</div></td>
        
		        <td style=\"color:#FFF\" align=\"right\">$data[3]<img src=\"$lien_capacite\" width=\"55\" height=\"40\" /></td>

        		<td style=\"color:#FFF\" align=\"right\">$data[5]<img src=\"$lien_classe\" width=\"45\" height=\"25\" /></td>

        		<td align=\"right\"><span style=\"color:#FFF\">$data[4]<img src=\"$lien_essorage\" width=\"40\" height=\"33\" /></span></td>

		        <td style=\"color:#FFF\" align=\"right\">$data[6]<img src=\"images/disponible.gif\" width=\"17\" height=\"18\" alt=\"Disponible\" title=\"Dsiponible\"/></td>

        		<td align=\"right\"><div align=\"center\">$data[7] &#8364;</div></td>

        		<td align=\"right\"><img src=\"images/caddie.gif\" width=\"30\" height=\"11\" /></td>




		        </tr>";
		       
		}
		
		echo "
		
			</tbody>
			</table>	
			</div> ";		        
			


	echo "
		<div style=\"clear:both; margin:25px 0 25px 0;\">&nbsp;</div>
		<script language=\"javascript\" type=\"text/javascript\">
		var props = {
			sort: true,
			alternate_rows: false,
			rows_counter: true,
			rows_counter_text: \"Nombre de produits: \",
			loader: true,
			loader_html: '<img src=\"loader.gif\" alt=\"\" style=\"vertical-align:middle; margin-right:5px;\" />Chargement...',
			status: true,
			status_bar: true,
			paging : true,
			paging_length: 25,
			col_number_format: [null,null,null,null,null,'EU','EU','EU','EU'],
			display_all_text: \" [ Tout voir ] \",
			status_bar_target_id: 'statusDiv',
			col_0: \"checklist\",
			col_1: \"none\",
			col_2: \"checklist\",
			col_3: \"checklist\",
			col_4: \"checklist\",
			col_5: \"checklist\",
			col_8: \"none\",
			external_flt_grid: true,
			external_flt_grid_ids: ['sel_marque', 'null','sel_chargement','sel_capacite','sel_classe','sel_essorage']
		}
		setFilterGrid(\"demo\",props);
		
		</script> ";



?>

</body> 



