<?php

				session_start(); 
			

 			    $email = $_SESSION['email'];	
								
			    $connexion = mysql_connect("localhost", "root", "");
		 	    mysql_select_db("boutique", $connexion);

			   
			
  		  	    $requete = "SELECT * FROM clients WHERE email='$email' ";
	   		    $result = mysql_query($requete);
		        $adr_facturation=mysql_fetch_array($result);
				  	
				
			
			    if($_SESSION['choix_adresse_livraison'] == 1)
			      {  $requete = "SELECT * FROM clients WHERE email='$email' ";
	   		         $result = mysql_query($requete);
		             $data=mysql_fetch_array($result);
				     $adr_livraison_nom = $data['nom'];
				     $adr_livraison_prenom = $data['prenom'];
				     $adr_livraison_adresse = $data['adresse'];
			  	     $adr_livraison_complement = $data['complement'];
			  	     $adr_livraison_cp = $data['cp'];
			         $adr_livraison_ville = $data['ville'];
			      }	
				  
			
				  if($_SESSION['choix_adresse_livraison'] == 2)
			      {  $requete = "SELECT * FROM adresses_livraison WHERE email='$email' ";
	   		         $result = mysql_query($requete);
		             $data=mysql_fetch_array($result);
				     $adr_livraison_nom = $data['nom1'];
				     $adr_livraison_prenom = $data['prenom1'];
				     $adr_livraison_adresse = $data['adresse1'];
			  	     $adr_livraison_complement = $data['complement1'];
			  	     $adr_livraison_cp = $data['cp1'];
			         $adr_livraison_ville = $data['ville1'];
			      }	
				  	
			       if($_SESSION['choix_adresse_livraison'] == 3)
			      {  $requete = "SELECT * FROM adresses_livraison WHERE email='$email' ";
	   		         $result = mysql_query($requete);
		             $data=mysql_fetch_array($result);
				     $adr_livraison_nom = $data['nom2'];
				     $adr_livraison_prenom = $data['prenom2'];
				     $adr_livraison_adresse = $data['adresse2'];
			  	     $adr_livraison_complement = $data['complement2'];
			  	     $adr_livraison_cp = $data['cp2'];
			         $adr_livraison_ville = $data['ville2'];
			      }	
				


?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml" lang="fr"><head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Patrice Delpy : Récaptitulatif de votre commande </title>

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


<link rel="stylesheet" href="gb_styles.css" media="screen,projection" type="text/css">
<link rel="stylesheet" href="gabarit_gps.css" type="text/css">
<link rel="stylesheet" href="gabarit_gris.css" type="text/css">

<link rel="stylesheet" href="style_new.css" type="text/css">
<link rel="stylesheet" href="top_gps.css" type="text/css">
<link rel="stylesheet" href="top.css" type="text/css">
<link rel="stylesheet" href="shopping_cart.css" type="text/css">




<style type="text/css">
	.AdrSpace { background:url(../images/RecapAdrBg.jpg) no-repeat; height:133px; width:263px; padding-top:13px; text-align:left; color:#3e76ba; }
	.AdrSpace h1 { text-transform:uppercase; font-weight:bold; font-size:12px; width:200px; margin:0px; margin-bottom:8px; left:38px; position:relative; color:#B91900; }	
	.AdrSpace div { left:30px; width:210px; overflow:hidden; position:relative; margin:4px; }
</style>

	
        
        
</head>
<body class="gecko">
        
        
				<!-- page -->
				<div id="page">

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


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

<ul class="nav-line">

<li class=""><a href="../acceuil.php" style="" title="Accueil"><span>Accueil</span></a></li>

<li class="Bonnes affaires"><a href="../catalogue/affaires.php" style="background-image:url(/live/97759.gif);" title="Bonnes affaires"><span>affaires</span></a></li>

<li class="Gros menager"><a href="../catalogue/gros_menager.php" style="background-image:url(/live/97760.gif);" title="Gros menager"><span>Gros Ménager</span></a></li>

<li class="Petit menager"><a href="../catalogue/petit_menager.php" style="background-image:url(/live/97761.gif);" title=" Petit ménager"><span>PEtit Menager</span></a></li>

<li class="Images"><a href="../catalogue/image.php" style="background-image:url(/live/97762.gif);" title="Images"><span>Images</span></a></li>

<li class="Son"><a href="../catalogue/son.php" style="background-image:url(/live/97763.gif);" title="SON"><span>SON</span></a></li>

<li class="Video"><a href="../catalogue/video.php" style="background-image:url(/live/97764.gif);" title="Video"><span>Video</span></a></li>

<li class="Photo et camescope"><a href="../catalogue/photo_camescope.php" style="background-image:url(/live/97769.gif);" title="Photo / cam&eacute;scopes">Photo / cam&eacute;scopes</a></li>

<li class="Telephonie"><a href="../catalogue/telephonie.php" style="background-image:url(/live/97770.gif);" title="T&eacute;l&eacute;phonie">T&eacute;l&eacute;phonie </a></li>

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

<li class="art de la table"><a href="../catalogue/art_de_la_table.php" style="background-image:url(/live/97766.gif);" title="Art de la table"><span>Art de la table</span></a></li>

<li class="Accessoires"><a href="../catalogue/accessoires.php" style="background-image:url(/live/97767.gif);" title="Accessoires &amp;Consommables"><span>accessoires &amp;consommables</span></a></li>

<li class="Chauffage & clim"><a href="../catalogue/chauffage_clim.php" style="background-image:url(/live/97768.gif);" title="Chauffage &amp; Clim"><span>chauffage &amp; clim</span></a></li>

<li class="Automobiles"><a href="../catalogue/automobile.php" style="background-image:url(/live/97769.gif);" title="Automobiles"><span>Automobiles</span></a></li>

<li class="GPS"><a href="../catalogue/gps.php" style="background-image:url(/live/97770.gif);" title="GPS"><span> GPS</span></a></li>

<li class="MP3"><a href="../catalogue/mp3.php" style="background-image:url(/live/97771.gif);" title="AUDIO / MP3 / MP4"><span>AUDIO / MP3 / MP4</span></a></li></ul>
			  </div>
				<!--cached-->			</div>

	   
        
        

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


<div id="pm-resume">

	<div style="padding: 0px; float: left; width: 950px; margin-left: 5px; display: inline;">

		<table class="BskTitle" width="100%" border="0" cellpadding="0" cellspacing="0">
			<tbody><tr>
				<th width="689" align="left" height="40" valign="bottom">
					Récapitulatif de ma commande <img src="../images/PuceBleue.gif" alt="" width="8" height="11">
					<hr>
				</th>
				<td rowspan="2" width="56" align="center"><img src="/images/RecapHeaderIco.gif" alt="" width="41" height="57"></td>
			</tr>
			<tr>
				<td height="26" valign="top"><a href="../acceuil.php">Accueil &gt;</a></td>
			</tr>
		</tbody></table>


<table style="margin-bottom: 10px;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>

<td><img src="/images/CmdProcessStart.gif" alt="" width="89" border="0" height="62"></td>
<td><img src="/images/CmdProcess1On.gif" alt="" width="95" border="0" height="62"></td>

<td><a href="https://www.materiel.net/pm/adresse.html"><img src="/images/CmdProcess2On.gif" alt="" width="98" border="0" height="62"></a></td>

<td><a href="https://www.materiel.net/pm/livraison.html"><img src="/images/CmdProcess3On.gif" alt="" width="113" border="0" height="62"></a></td>

<td><a href="https://www.materiel.net/pm/recap.html"><img src="/images/CmdProcess4On.gif" alt="" width="115" border="0" height="62"></a></td>

<td><a href="https://www.materiel.net/pm/paiement.html"><img src="/images/CmdProcess5On.gif" alt="" width="98" border="0" height="62"></a></td>

<td><img src="/images/CmdProcessEnd.gif" alt="" width="30" border="0" height="62"></td>

</tr>
</tbody>
</table>
    
   

    
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>

<td width="50%">
<div class="AdrSpace" style="float: right;">
<h1>Mon adresse de facturation</h1>
<div><?php echo $adr_facturation['prenom']; echo " "; echo $adr_facturation['nom']; ?></div>
<div><?php echo $adr_facturation['adresse'];  ?></div>
<div><?php echo $adr_facturation['complement'];  ?></div>
<div><?php echo $adr_facturation['cp']; echo " "; echo $adr_facturation['ville'];   ?></div>
<div>France Metropolitaine</div>
</div>
</td>

<td width="50%" align="center">
<div class="AdrSpace">
<h1>Mon adresse de livraison</h1>
<div><?php echo $adr_livraison_prenom ; echo " " ;echo $adr_livraison_nom ?></div>
<div><?php echo $adr_livraison_adresse;  ?></div>
<div><?php echo $adr_livraison_complement  ?></div>
<div><?php echo $adr_livraison_cp ; echo " "; echo $adr_livraison_ville;   ?></div>
<div>France Metropolitaine</div>

</div>
</td>
</tr>
</tbody>
</table>
            
            
	  <table class="BskSectionTitle" width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<td width="95%" align="left" nowrap="nowrap">Ma commande </td>
					<td width="5%" align="center" nowrap="nowrap">&nbsp;</td>
				</tr>
			</tbody></table>
            
            
            
<div class="cart">
<div class="cartheader clearfix">
<ul class="ListeHorizontale">
<li class="cartheadercol1">Article</li>
<li class="cartheadercol2">Quantité</li>
<li class="cartheadercol3">Prix unitaire HT<br>(Eco-participation incluse)</li>
<li class="cartheadercol4">Somme HT<br></li>


</ul>
</div>

	

<?php

	//print_r($_SESSION);

	
        
        $total_ht = 0;
        $total_ttc = 0;
        

	       for($i=0;$i<count($_SESSION['panier']['id']);$i++)
	          {  $total_ht+=$_SESSION['panier']['prix_ht'][$i]*$_SESSION['panier']['qte'][$i];
	             $total_ttc+=$_SESSION['panier']['prix_ttc'][$i]*$_SESSION['panier']['qte'][$i];
	    
?>
		<div class="cartlisting clearfix noLast">
		<ul class="ListeHorizontale">
		<li class="cartlistingcol1">
		<img src="shopping_cart.php_fichiers/m684708.jpg" alt="à définir" width="60"></li>	
		<li class="cartlistingcol2 TxtRouge">
		
		<b><?php echo $_SESSION['panier']['designation'][$i]; ?></b></a>
		</li>
		<li class="cartlistingcol3 "><b><?php echo $_SESSION['panier']['qte'][$i]; ?></b></li>

		<li class="cartlistingcolfinal "><b><?php echo $_SESSION['panier']['prix_ht'][$i]; ?> &#8364;</b></li>


		<li class="cartlistingcolfinal "><b><?php echo $_SESSION['panier']['prix_ht'][$i]*$_SESSION['panier']['qte'][$i]; ?> &#8364;</b></li>
		
		</ul>
		</div>
		
<?php
	}
	
	$total_TVA = $total_ttc - $total_ht;
	
	$_SESSION['total_ttc'] = $total_ttc;
	$_SESSION['total_ht'] = $total_ht;

	//header('Location: recharger_recapitulatif.php');

?>		




<div class="cartfooter clearfix">
<ul class="ListeHorizontale">
<li class="cartlistingcolautre TxtOrange"><b> Sous-total HT : <?php echo $total_ht;  ?> &#8364;</b></li>
</ul>
</div>

<div class="cartfooter clearfix">
<ul class="ListeHorizontale">
<li class="cartlistingcolautre TxtOrange"><b> Frais d'expédition: <?php echo $_SESSION['frais_livraison'];  ?> &#8364; </b></li>
</ul>
</div>

<div class="cartfooter clearfix">
<ul class="ListeHorizontale">
<li class="cartlistingcolautre TxtOrange"><b>Montant TVA: <?php echo $total_TVA;  ?> &#8364;</b></li>
</ul>
</div>

<div class="cartfooter clearfix">
<ul class="ListeHorizontale">
<li class="cartlistingcolautre TxtOrange"><b>Montant Total TTC: <?php echo $total_ttc;  ?> &#8364;</b></li>
</ul>
</div>



</div></div>
<div align="right">
<br>

<a href="paiement.php"><img src="../images/btn_passorder.gif" alt="Passez votre commande"></a>
</div>

</div></form>


		<div id="aside">
			<div id="search-bar">

			<form method="get" action="http://www.materiel.net/search.html">
			<input type="text" name="search" title="Recherche"/>
			<input type="submit" value="Rechercher" />
			</form>
			</div>
			

<?php
            
            if(isset($_SESSION['utilisateur_login']))
	      {	
					 
			    if($_SESSION['utilisateur_login']== "valide")
				  {         //echo '<body onLoad="alert(\'Identification par le panel.\')">'; 
							echo "
								<div id=\"account\" class=\"on\">
								<ul>
								<li class=\"icon\"><a href=\"../compte/compte.php\">Mon espace perso</a></li>
								<li class=\"logout\"><a href=\"../compte/logout.php\" title=\"Me d&eacute;connecter\">Me d&eacute;connecter</a></li>
								</ul>
								<div class=\"panel\">
								<ul class=\"buttons\">
								<li class=\"account\"><a href=\"../compte/compte.php\">Mon compte client</a></li>
								<li class=\"orders\"><a href=\"../commande/suivi_commande.php\">Mes commandes</a></li>
								<li class=\"addresses\"><a href=\"../compte/adresse_livraison.php\">Mon carnet d'adresse</a></li>
								<li class=\"repairs\"><a href=\"../compte/sav.html\">Mes retours S.A.V</a></li>
								<li class=\"parrainages\"><a href=\"../compte/parrainage.html\">Mes parrainages</a></li>
								<li class=\"refunds\"><a href=\"../compte/avoir.html\">Mes avoirs</a></li>
								<li class=\"carts\"><a href=\"../panier/shopping_liste.php\">Mes paniers</a></li>
								<li class=\"alertes\"><a href=\"compte/alerte.html\">Mes alertes</a></li>
								</ul>
								</div>
								</div> ";
					
				     }
					 
					 else {
						 		echo "
						 		<div id=\"account\">
								<ul>
								<li class=\"icon\"><a href=\"compte/login.php\">Mon espace perso</a></li>
								</ul>

								<div class=\"panel\">
								<form action=\"../compte/check.php\" method=\"post\">
								<dl>
								<dt><label for=\"login\">Votre nom 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=\"../compte/creation_compte.php\">Créer mon compte</a></li>
								<li class=\"password\"><a href=\"../compte/sendpass.php\">Mot de passe oublié ?</a></li>
								</ul>
								</form>
								</div>
								</div> ";
						 
					      }
					 
			}		 
			 

?>
      

<div id="basket" >
	<ul>
		<li id="BasketProdCount"><a href="../panier/panier.php">Votre panier est vide</a></li>
		<li id="BasketAmount"></li>
	</ul>
</div>
  </div>





<br>
</div>


</div>



</div>     
            
			
</div>

	</body>
    </html>