<?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";
	 }
	
       if(isset($_SESSION['identifiant']) && isset($_SESSION['password']) && isset($_SESSION['prenom'])) 
	     {          $prenom = $_SESSION['prenom'];
		 	$email = $_SESSION['email']; 
		        $id = $_SESSION['id']; 
		 
			$connexion = mysql_connect($db_host,$db_user,$db_pass); 
	               	mysql_select_db($db_name, $connexion);
		 
		 	$sql = "SELECT * FROM clients WHERE email = '".$email."' ";
 			$requete = mysql_query($sql);
			$result = mysql_fetch_assoc($requete);
			
		 
		 }
	else { // page de redirection pour les truand
			 //echo '<body onLoad="alert(\'Membre non reconnu...\')">'; 
             		 //echo '<meta http-equiv="refresh" content="0;URL=intrusion.htm">'; 
             		 header('Location: ../acceuil.php');

	     }

?>


<?php

		    if(isset($_POST['valide']))
	              {
			        if($_POST['valide'] == "ok")
				      {	 
				      	
				      	 if($_POST['valide_email'] == "non" )
				     	   { 	 echo '<body onLoad="alert(\'Email invalide.\')">'; 

				           }
				   
				         if($_POST['valide_identifiant']== "non" )	
				           { 	echo '<body onLoad="alert(\'Identifiant invalide.\')">'; 
				           }	
				   
				   if($_POST['valide_email'] == "ok" && $_POST['valide_identifiant']== "ok" )
				     {	
				      	       $connexion = mysql_connect($db_host,$db_user,$db_pass); 
					       mysql_select_db($db_name, $connexion);

					   
						$email     = $_POST["email"] ;
						$identifiant     = $_POST["identifiant"] ;
						$password     = $_POST["password1"] ;
						$telephone     = $_POST["telephone"] ;

						$num_civilite     = $_POST["civ"] ;
						$nom     = $_POST["nom"] ;
						$prenom = $_POST["prenom"] ;
						$adr1 = $_POST["adr1"] ;
						$adr2 = $_POST["adr2"] ;
						$cp = $_POST["cp"] ;
						$ville = $_POST["ville"] ;
						
						$abonnement = $_POST['pub'];
					
						$jour = $_POST['jour'];
						$mois = $_POST['mois'];
						$annee = $_POST['annee'];
					
						$naissance = $jour ."-" .$mois ."-" .$annee;
					
						switch($num_civilite)
  			  			      {
					  		case 1 :
					          		 $civilite = "M";
					    	  		 break;
					  		case 2 :
					          		 $civilite = "Mme";
					    	  		 break;		  
					  		case 3 :
					          		 $civilite = "Mlle";
					    	  		 break;		  
					             }
					
					$date = date("d-m-Y"); 
					$heure = date("H:i");
					
					/*$sql = "UPDATE clients SET email  = '$email', 
	          			           identifiant  = '$identifiant', 
								   password = '$password' ,
								   telephone = '$telephone' ,
	          		        	   prenom     = '$prenom',
		  		           	   	   adresse1    = '$adr1',
		  		           	   	   adresse2    = '$adr2',
		  		           	       cp           = '$cp',
		  		           	       ville = '$ville' ,
		  		           	   	   WHERE nom = '$nom' ";*/
								   
					$sql = "UPDATE clients SET  email  = '$email', 
	          			                 identifiant  = '$identifiant', 
							 telephone = '$telephone' ,
 							 civilite     = '$civilite',
							 nom     = '$nom',
				          		 prenom     = '$prenom',
		  					 adresse    = '$adr1',
		  		        		 complement    = '$adr2',
		  		           	       	 cp           = '$cp',
		  		           	       	 ville = '$ville' , 
							 age = '$naissance' 
							 WHERE id = '$id' " ;
								   
					
					
  				$requete = mysql_query($sql);
		 
	 	                //echo '<body onLoad="alert(\'Mise à jour de vos données personnelles.\')">'; 
		 
		 		//echo "<script language='JavaScript'>alert('Mdp foiré !!')</script>"; 
		 
		                //header('Location: compte.php');
		                
		                echo "		                
		                <SCRIPT LANGUAGE=\"JavaScript\">document.location.href = \"compte.php\";
				</script> "; 
			}	
					
	                  }
				  }


?>

<!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</title>
<link href="../feuille.css" rel="stylesheet" type="text/css">

<meta http-equiv="content-style-type" content="text/css">

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

	

</head>

<body class="gecko">


		
                <div id="page">

		
		<div id="header">
		<h1><a name="top" href="/">Chez_moi.net</a></h1>
		</div>


<?php		
	 include('../menu_site.php'); 

?>	

		
<div id="section">
		
<div id="client">
<table class="CatTitle" border="0" cellpadding="0" cellspacing="0" width="100%">
		<tbody><tr>
<th align="left" height="40">Mon espace perso 
<img src="../images/BskHeaderArrow.gif" alt="" height="11" width="8">
<hr></th>
<td rowspan="2" width="50"><img src="../images/people-icon.png" alt="" height="48" width="48"></td>
</tr>
<tr>
        
<td style="vertical-align: top;" height="40">
<a href="../acceuil.php">Accueil</a> &gt; 
<a href="compte.php">mon espace perso</a>
 &gt; Mon compte client </td>
		</tr>
	</tbody></table>

	<table border="0" cellpadding="0" cellspacing="0" width="950">
		<tbody><tr>
			<td colspan="2">

<div class="EpWelcome">
	<h3>Bienvenue <?php echo $_SESSION['prenom']; ?> dans votre espace perso !</h3>
	<div>Gr&acirc;ce &agrave; cet espace qui vous est dédié, vous pourrez 
gérer votre compte client, vos adresses, consulter la liste et 
l&#8217;évolution de vos dernières commandes, de vos avoirs, de vos codes de 
promotions et profiter de bien d&#8217;autres fonctionnalités.</div>
</div></td>
		</tr>
		<tr>

<td style="vertical-align: top;" width="270">
	<div class="clientmenu">
	<div style="margin-left: 10px;">

<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='compte.php';" width="266">

<tbody><tr style="background: url(../images/EpMenuBg.gif) repeat-x scroll center bottom transparent;">

<td style="vertical-align: middle; text-align: center;" width="84">
<img src="../images/User_Folder.jpg" alt="Mon compte personnel" border="0" height="64" width="64"></td>

<td width="181">
<div class="EpTitre">MON COMPTE CLIENT :</div>
<div class="EpDesc">Consulter ou mettre à jour mon adresse e-mail, 
mon adresse de facturation, mes abonnements, etc.</div>
</td>
			</tr>
		</tbody></table>
        
<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='../commande/suivi_commande.php';" width="266">
<tbody><tr>

<td style="vertical-align: middle; text-align: center;" width="84"><img src="../images/Forklift-Containers-64.png" alt="Mon compte personnel" border="0" height="64" width="64" /></td>

<td width="181">
<div class="EpTitre">SUIVI DE MES COMMANDES :</div>
<div class="EpDesc">La liste de mes commandes en cours et passées 
sur Materiel.net, leur état de traitement, leur détail, date, etc.</div>
</td>
			</tr>
		</tbody></table>
        

<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='adresse_livraison.php';" width="266">
<tbody><tr>
            
<td style="vertical-align: middle; text-align: center;" width="84">
<img src="../images/addressbook_icon.jpg" alt="Mon carnet d'adresse" border="0" height="68" width="68"></td>

<td width="181">
<div class="EpTitre">Mon carnet d'adresses :</div>
<div class="EpDesc">Ajouter, modifier ou supprimer mes adresses de livraison.</div>
				</td>
			</tr>
		</tbody></table>
        
<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='sav.html';" width="266">
<tbody><tr>
<td style="vertical-align: middle; text-align: center;" width="84">
<img src="../images/sav.gif" alt="Service après vente" border="0" height="64" width="64"></td>

<td width="181">
<div class="EpTitre">Service après vente :</div>
<div class="EpDesc">Toutes les informations sur le SAV et sur les demandes de retour.</div>
</td>
			</tr>
		</tbody></table>
        
<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='parrainage.html';" width="266">
	<tbody><tr>
<td style="vertical-align: middle; text-align: center;" width="84">
<img src="cpte_parrainage_on.gif" alt="Mes parrainages" border="0" height="70" width="64"></td>

<td width="181">
<div class="EpTitre">MES PARRAINAGES :</div>
<div class="EpDesc">Parrainez vos amis et gagnez des crédits d&#8217;achats d&#8217;une valeur de 10&#8364; !</div>

					</td>
				</tr>
			</tbody></table>
            
<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='avoir.html';" width="266">
<tbody><tr>
            
<td style="vertical-align: middle; text-align: center;" width="84">
<img src="../images/100euro_bills_icon.jpg" alt="Mes avoirs" border="0" height="64" width="64"></td>

<td width="181">
<div class="EpTitre">MES AVOIRS :</div>
<div class="EpDesc">Consulter mes avoirs et leurs utilisations.</div>
	</td>
			</tr>
		</tbody></table>

<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='../panier/shopping_liste.php';" width="266">
<tbody><tr>

<td style="vertical-align: middle; text-align: center;" width="84">
<img src="../images/shoping_list_128x128.png" alt="Mes avoirs" border="0" height="64" width="64"></td>

<td width="181">
<div class="EpTitre">MA SHOPPING LIST:</div>
<div class="EpDesc">Mes paniers enregistrés, mes achats à venir, ma sélection de cadeaux pour mon anniversaire. </div>
</td>
</tr>

		</tbody></table>
<table class="EpMenu" style="cursor: pointer;" onclick="document.location.href='alerte.html';" width="266">
			<tbody><tr>

<td style="vertical-align: middle; text-align: center;" width="84">
<img src="EpIcoAlerte.gif" alt="Mes alertes" border="0" height="74" width="63"></td>

<td width="181">
<div class="EpTitre">MES ALERTES:</div>
<div class="EpDesc">Consulter mes alertes. </div>
</td>
			</tr>
		</tbody></table>

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

<td style="vertical-align: top;" width="100%">

<div style="border: 1px solid rgb(154, 154, 154); margin-left: 20px; margin-right: 5px; padding: 12px;">

	<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tbody><tr>
		<td align="left" width="13%">
<img src="../images/compte.jpeg" alt="" height="119" width="108"></td>

<td style="padding: 12px;" width="87%">
<div class="EpTitre">Gestion de mon compte client : </div>
<div class="EpDesc">Vous souhaitez modifier votre adresse de 
facturation ? Vous avez changé d&#8217;adresse e-mail ? Vous souhaitez vous 
abonner à notre newsletter afin de profiter vous aussi des offres 
exceptionnelles réservées à nos abonnés ? Cette interface vous permettra
 de gérer toutes les données de votre compte client.</div>
 
							</td>
						</tr>
					</tbody></table>




		<form name="modification" action=""  method="post" onsubmit="return traitement();">

		<table style="margin-top: 10px;" border="0" cellpadding="0" cellspacing="0" width="100%">
		<tbody><tr>
		<td style="vertical-align: top;" width="50%">
		<table class="ToolBox2" border="0" cellpadding="0" cellspacing="0" width="300">
		<tbody><tr>
		<th width="5"><img src="../images/PromoBoxLeft.gif" alt="" height="22" width="5"></th>
		<th align="left" width="290">Mon identité 
		<img src="../images/PromoBoxArrow.gif" style="display: inline;" alt="" height="11" width="8"></th>
		<th width="5"><img src="../images/PromoBoxRight.gif" alt="" height="22" width="5"></th>
		</tr>
		<tr>

		<td class="Inner" colspan="3" style="vertical-align: top; padding: 10px;" align="left" height="100" width="100%">

		<div class="ElemMandat">Mon adresse e-mail : </div>

		<div>
		<input name="email" id="email" style="height: 12px; font-size: 10px; width: 150px;" 
		value="<?php echo($result['email']) ;?>" onKeyUp="verif_email(this.value)" type="text">
		</div>
		<div id="email_box"><br>
		</div>

		

		<div class="ElemMandat">Mon nom d'utilisateur</div>

		<div>
		<input name="identifiant" id="identifiant" style="height: 12px; font-size: 10px; width: 150px;" 
		value="<?php echo($result['identifiant']) ;?>" onKeyUp="verif_identifiant(this.value)" type="text" />
		</div>
		<div id="identifiant_box"><br>
		</div>


		<div class="ElemMandat">Mon mot de passe</div>

		<div>
		<input name="password1" id="password1" style="height: 12px; font-size: 10px; width: 150px;" maxlength="10" type="password">
		</div>

		<div class="ElemMandat">Confirmation du mot de passe</div>

		<div>
		<input name="password2" id="password2" style="height: 12px; font-size: 10px; width: 150px;" maxlength="10" type="password">
		</div>
		
		<br>
		
		<div style="margin-top: 4px;">
<!--
		<input name="newsletter" id="newsletter" value="1" checked="checked" type="checkbox">
-->

<?php 

		if($result['abonnement'] == "oui")
		  { echo "<input name=\"publicite\" value=\"0\" checked=\"checked\" type=\"checkbox\">";
		  }	
		  
		if($result['abonnement'] == "non")
		  { echo "<input name=\"publicite\" value=\"0\" type=\"checkbox\">";
		  }	   
?>



		<label for="newsletter">Je souhaite m'inscrire à la newsletter et recevoir par 
		e-mail les promotions et les réductions exclusives !.</label>
		</div>

		<input type="hidden" name="valide" id="valide" value="">

		<input type="hidden" name="valide_email" id="valide_email" value="">
		<input type="hidden" name="valide_identifiant" id="valide_identifiant" value="">


		<div class="ElemNormal">Date de naissance</div>
		<select name="jour" id="jour">
		<option selected="selected" value="">&nbsp;</option>
										
<?php	
		$nom_du_mois=array("Janvier","Fevrier","Mars","Avril","Mai","Juin",
                "Juillet","Aout","Septembre","Octobre","Novembre","Decembre");

		$date_naissance = $result['age'];
		$date_explosee = explode("-", $date_naissance);
		$jour = $date_explosee[0];
		$mois = $date_explosee[1];
		$annee = $date_explosee[2];

		for($i=1; $i<=31; $i++)
	   	{ if($i == $jour)
	       	    { echo "<option value=\"$i\" selected=\"selected\">$i</option>";
	            }	
	       else { echo "<option value=\"$i\">$i</option>";  
                    } 	   
	        }    	
?>		   	
										
		</select>
		<select name="mois" id="mois">
		<option selected="selected" value="">&nbsp;</option>
										

<?php
	        for($i=1; $i<=12; $i++)
	           { $mois_tab = $nom_du_mois[$i-1];
	   	     if($i == $mois)
	               { echo "<option value=\"$i\" selected=\"selected\">$mois_tab</option>";
	               }	
	          else { echo "<option value=\"$i\">$mois_tab</option>";  
                       } 	   
	           }   
?>	   
				
		</select>
		<select name="annee" id="annee">
		<option selected="selected" value="">&nbsp;</option>
										
		
<?php

		for($i=2010; $i>=1920; $i--)
	           { if($i == $annee)
	               { echo "<option value=\"$i\" selected=\"selected\">$i</option>";
	               }	
	          else { echo "<option value=\"$i\">$i</option>";  
                       } 	   
	           }   


?>		
	
		</select>
		<div>

<!--
		<table style="margin-top: 6px;" border="0" cellpadding="0" cellspacing="0" width="100%">
		<tbody><tr>
		<td class="ElemMandat" valign="top" width="57">Je suis </td>
		<td valign="top" width="157">

		<input name="type" value="0" id="type0" checked="checked" onclick="TvaBox(false); SocieteBox(false,'');" type="radio">
		<label for="type0">un particulier</label>
		<br>

		<input name="type" value="1" id="type1" onclick="TvaBox(true); SocieteBox(true,'Société : ');" type="radio">
		<label for="type1">une entreprise</label>
		<br>

		<input name="type" value="2" id="type2" onclick="TvaBox(true); SocieteBox(true,'Administration : ');" type="radio">
		<label for="type2">une administration</label>
		<br>

		<input name="type" value="3" id="type3" onclick="TvaBox(true); SocieteBox(true,'Association : ');" type="radio">
		<label for="type3">une association</label>

		</td>
		<td valign="top" width="130"></td>
		</tr>
		</tbody>
		</table>
-->		

		<div class="ElemMandat">Téléphone : </div>

		<div>
		<input name="telephone" id="telephone" maxlength="10" style="height: 12px; font-size: 10px; width: 150px;"  
		value="<?php echo($result['telephone']) ;?>" type="text"><br>
		</div>

		<div class="ElemNormal">Autre numéro de téléphone : </div>

		<div>
		<input name="autre_telephone" id="autre_telephone" maxlength="10" style="height: 12px; font-size: 10px; width: 150px;" type="text">
		</div>

		<div class="ElemNormal">fax : </div>

		<div>
		<input name="fax" id="fax" maxlength="10" style="height: 12px; font-size: 10px; width: 150px;" type="text">
		</div>

		</div>

		<div style="color: rgb(144, 144, 144);">Vous devez impérativement indiquer un numéro de téléphone fixe ou portable et une 
		adresse e-mail. Ces informations sont indispensables pour que votre commande soit enregistrée et traitée.</div></td>
		</tr>
		</tbody>
		</table>
		</td>

		<td style="vertical-align: top; padding-left: 9px; padding-right: 3px;" width="50%">

		<table class="ToolBox2" border="0" cellpadding="0" cellspacing="0" width="300">
		<tbody><tr>

		<th width="5">
		<img src="../images/PromoBoxLeft.gif" alt="" height="22" width="5"></th>

		<th align="left" width="290">Mon adresse de facturation 
		<img src="../images/PromoBoxArrow.gif" style="display: inline;" alt="" height="11" width="8"></th>

		<th width="5"><img src="../images/PromoBoxRight.gif" alt="" height="22" width="5"></th>

		</tr>		

		<tr style="background: url(&quot;/images/gui/main/CptAddrIco.jpg&quot;) no-repeat scroll right center transparent;">

		<td class="Inner" colspan="3" style="padding: 10px;" align="left" height="100" valign="top" width="100%">

		<div style="color: rgb(144, 144, 144);">Les informations 
		ci-après servent de base à la facturation de votre prochaine commande. 
		Votre adresse de livraison est à renseigner dans votre carnet d'adresse 
		ci-contre </div>

		<div class="AccSmall">
		<input name="civ" value="1" id="civ1" <?php if($result['civilite']=="M") echo ' checked="checked"';?> type="radio">
		<label for="civ1">M.</label>
		<input name="civ" value="2" id="civ2" <?php if($result['civilite']=="Mme") echo ' checked="checked"';?> type="radio">
		<label for="civ2">Mme</label>
		<input name="civ" value="3" id="civ3" <?php if($result['civilite']=="Mlle") echo ' checked="checked"';?> type="radio">
		<label for="civ3">Mlle</label>
		</div>

		<div class="ElemMandat">Nom : </div>
		
		<div>
		<input name="nom" id="nom" style="height: 12px; font-size: 10px; width: 150px;" 
		value="<?php echo($result['nom']) ;?>"
		type="text">
		</div>
		
		<div class="ElemMandat">Prénom : </div>
		
		<div>
		<input name="prenom" id="prenom" style="height: 12px; font-size: 10px; width: 150px;"  
		value="<?php echo($result['prenom']) ;?>"
		type="text">
		</div>
													
		<div class="ElemMandat">Adresse : </div>
		
		<div>
		<input name="adr1" id="adr1" style="height: 12px; font-size: 10px; width: 150px;" maxlength="60"
		value="<?php echo($result['adresse']) ;?>"
		type="text">
		</div>
		
		<div class="ElemNormal">Complément d'adresse : </div>
		
		<div>
		<input name="adr2" id="adr2" style="height: 12px; font-size: 10px; width: 150px;" maxlength="60" 
		value="<?php echo($result['complement']) ;?>"
		type="text">
		</div>
		
		<div class="ElemMandat">Code postal : </div>
		
		<div>
		<input name="cp" id="cp" style="height: 12px; font-size: 10px; width: 150px;"  maxlength="5" 
		value="<?php echo($result['cp']) ;?>"
		type="text">
		</div>
		
		<div class="ElemMandat">Ville : </div>

		<div>
		<input name="ville" id="ville" style="height: 12px; font-size: 10px; width: 150px;"  
		value="<?php echo($result['ville']) ;?>"
		type="text">
		
		</div>
		<br>
		
		<div id="TvaBlock" style="display: none;">
		<div class="ElemNormal">Numéro de TVA : </div>
		
		<div>
		<input name="tva" id="tva" style="height: 12px; font-size: 10px; width: 150px;" type="text">
		</div>
		</div>


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

		<td colspan="2">
		<table class="ToolBox2" style="margin-top: 10px;" border="0" cellpadding="0" cellspacing="0" width="620">
		<tbody><tr>
		<th width="5">
		
		<img alt="" src="../images/PromoBoxLeft.gif" height="22" width="5"></th>
		
		<th align="left" width="610">Validation 
		<img alt="" style="display: inline;" src="../images/PromoBoxArrow.gif" height="11" width="8"></th>
		
		<th width="5">
		<img alt="" src="../images/PromoBoxRight.gif" height="22" width="5"></th>
		</tr>
		<tr>
		
		<td class="Inner" style="padding: 10px;" colspan="3" align="left" height="100" valign="top">
		
		<input name="verif" id="verif" type="checkbox">
		<label for="verif"> Je certifie exactes les informations renseignées dans les 
		champs ci-dessus et conformes à chaque libellé et accepte que celles-ci 
		servent de base à la facturation de mes prochaines commandes.</label>

		<br>
		<input name="imageField" src="../images/btn_modifier.jpg" style="margin-top: 10px; float: right;" type="image">

		</td>
		</tr>
		</tbody></table>
		</td>
		</tr>
		</tbody></table>
		</form>
		</div>
		</td>
		</tr>
	        </tbody></table>
    
  
		</div>		
		</div>


		<div id="aside">
		<div id="search-bar">
		<form method="get" action="recherche.html">
		<input type="text" name="search" title="Recherche"/>
		<input type="submit" value="Rechercher" />
		</form>
		</div>
			

<?php
            
            //if(isset($_SESSION['connexion']))
			 
			    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.php\">Mon espace perso</a></li>
								<li class=\"logout\"><a href=\"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.php\">Mon compte client</a></li>
								<li class=\"orders\"><a href=\"../commande/suivi_commande.php\">Mes commandes</a></li>
								<li class=\"addresses\"><a href=\"adresse_livraison.php\">Mon carnet d'adresse</a></li>
								<li class=\"repairs\"><a href=\"sav.html\">Mes retours S.A.V</a></li>
								<li class=\"parrainages\"><a href=\"parrainage.html\">Mes parrainages</a></li>
								<li class=\"refunds\"><a href=\"avoir.html\">Mes avoirs</a></li>
								<li class=\"carts\"><a href=\"../panier/shopping_liste.php\">Mes paniers</a></li>
								<li class=\"alertes\"><a href=\"alerte.html\">Mes alertes</a></li>
								</ul>
								</div>
								</div> ";
					
				     }
					 
					 else {
						 		echo "
						 		<div id=\"account\">
								<ul>
								<li class=\"icon\"><a href=\"login.php\">Mon espace perso</a></li>
								</ul>

								<div class=\"panel\">
								<form action=\"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=\"creation_compte.php\">Créer mon compte</a></li>
								<li class=\"password\"><a href=\"sendpass.html\">Mot de passe oublié ?</a></li>
								</ul>
								</form>
								</div>
								</div> ";
						 
					      }
					 
					 
	if($_SESSION['nb_article_panier']!=0)
	  {  	
	     $mess1 = $_SESSION['nb_article_panier'] ." " ."article" ; 
             if($_SESSION['nb_article_panier'] >1)
               { $mess1 = $mess1 ."s";
	       }
            $mess2 = $_SESSION['total_ttc_panier'] ." &euro";		
	  	
	    echo "
	  		<div id=\"basket\" class=\"on\">
      			<ul>
      			<li id=\"BasketProdCount\"><a href=\"../panier/panier.php\">$mess1</a></li>  
      			<li id=\"BasketAmount\">$mess2</li> 
      			</ul>
		        </div>
      			</div>  "; 
	  }						 
	else
	{  echo "
		  <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> ";
	}					 
					 
			 

?>
			
        <div id="loginbox"><br></div>

	<!-- footer -->
	<div id="footer">
  	<!--cached until Monday 29-Mar-10 21:52:19 CEST-->			
  	</div>

<?php
	//print_r($_SESSION);
	$nada = 0;

?>

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