<?php

	session_start(); 

	if(isset($_POST['choix']))
		 {
		 	//array_push($_SESSION['configuration'],$_POST['choix']);
		 	
		 	$_SESSION['mode_reglement'] = $_POST['choix'];
            
			if($_SESSION['mode_reglement'] == "carte_bancaire")
			  { header('location: banque.php');
			  }
			else { header('location: traitement_paiement.php');
			    }  
 
        }


?>


<!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">

</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>



		
	  <div id="section">


	<script type="text/javascript">
	
	 
		
	function show_div(id)
      {
	      document.getElementById('PmPanelNone').style.display = 'none';
	
		  for (var i = 1; i <= 5; i++)
		   {
			if (i == id)
		       {
				document.getElementById('div_' + i).style.display = 'block';
				
			  }
			else
				{
				document.getElementById('div_' + i).style.display = 'none';
				
				}
			}
		}
	
	
	function OpenWindow( url, name, width, height, centered )
	{

		if(centered) {
			WindowLeft = (screen.width - width) / 2;
			WindowTop = (screen.height - height) / 2;
		}
		newWindow = window.open(url, name, 'width=' + width + ',height=' + height + ',left=' + WindowLeft + ',top=' + WindowTop + ',scrollbars=yes');
		newWindow.focus();
	}

	
	function Validate(event)
	{
		var form = window.event ? event.srcElement : event.target;
		var isCGVChecked = document.getElementById('accept-terms').checked;

	    if(!isCGVChecked)
		 {
			alert("Pour valider votre commande, merci de cocher la case concernant l'acception des conditions générales de vente")
			return false;
		 }
		
		var test0 =document.selection.choix[0].checked ;
		var test1 =document.selection.choix[1].checked ;
		var test2 =document.selection.choix[2].checked ;
		var test3 =document.selection.choix[3].checked ;
		var test4 =document.selection.choix[4].checked ;
         
		if( test0 == false && test1 == false && test2 == false && test3 == false && test4 == false)
		   { alert("Vous devez faire un choix ")
		     return false;
		   }

		return true;  
		
	}
	
	
</script>

<style type="text/css">
	.PmType { background-color: #FFFFFF; margin: 0px; padding-right: 10px; border: 1px solid #CCCCCC; border-spacing: 0px; border-collapse: collapse; }
	.PmType td { border-bottom: 1px #CCCCCC solid; padding: 4px; }
	.PmType b {font-weight:bold;}
	#PmPanelCB { display:none; }
	.FormTitle { color:#990000; margin-top:10px; }
	.Error {padding-left: 10px; border:#333333 solid 2px; background-color:#FFFFCC; color:#FF0000; font-size:14px; font-weight:bold; width:715px; margin-bottom:10px; padding-top:10px; padding-bottom:10px; }
	.delay-on .delay-off {display: none;}
	.delay-off .delay-on {display: none;}
</style>


<div id="pm-checkout">



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

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="BskTitle">
<tr>
<th width="689" height="40" valign="bottom">
Paiement de ma commande <img src="../images/PuceBleue.gif" width="8" height="11" alt="" />
<hr />

</th>
<td width="56" rowspan="2" align="center"><img src="../images/PmHeaderIco.gif" alt="" width="60" height="60" /></td>
</tr>
<tr>

<td height="26" valign="top"><a href="../acceuil.php">Accueil &gt;</a></td>
</tr>
</table>

<form name="selection" action="paiement.php" method="post" onsubmit="return Validate(event);">

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

<tr>
<th width="5"><img src="../images/PromoBoxLeft.gif" alt="" width="5" height="22"></th>
<th width="720">Selection du mode de paiement&nbsp;  
<img src="../images/PromoBoxArrow.gif" style="display: inline;" alt="" width="8" height="11"></th>
<th width="5"><img src="../images/PromoBoxRight.gif" alt="" width="5" height="22"></th>
</tr>



<tr>
<td class="Inner" colspan="3" style="vertical-align: top;" align="center" width="730">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>

<tr>
<td style="vertical-align: top;" align="left" width="41%">
<table class="PmType" border="0" cellpadding="0" cellspacing="0" width="289">
<tbody>

<tr>
<td height="70" width="155">
<img src="../images/mini_CB.gif" width="50" height="35" />
<img src="../images/mini_mastercard.gif" width="49" height="35" />
<img src="../images/mini_visa.gif" width="51" height="35" /></td>
<td height="70" width="95">Carte de cr&eacute;dit</td>
<td align="center" width="38">
<input type="radio" name="choix"  value="carte_bancaire" onclick="show_div(1)" /> 

</td>
</tr>

<tr>
<td height="70" width="155"><img src="../images/moneyorder.gif" alt="" /></td>
<td height="70" width="95">Ch&eacute;que</td>
<td align="center" width="38">
<input type="radio" name="choix" value="cheque" onclick="show_div(2)" />
</td>
</tr>

<tr>
<td height="70" width="155"><img src="../images/paypal.gif" alt=""></td>
<td height="70" width="95">Paypal</td>
<td align="center" width="38">
<input type="radio" name="choix" value="paypal" onclick="show_div(3)" /> 
</td>
</tr>

<tr>
<td height="70" width="155"><img src="../images/mandatcash.gif" alt=""></td>
<td height="70" width="95">Mandat postal</td>
<td align="center" width="38">
<input type="radio" name="choix"  value="mandat" onclick="show_div(4)" /> 
</td>
</tr>

<tr>
<td height="70" width="155"><img src="../images/virement.gif" alt="" /></td>
<td height="70" width="95">Virement bancaire</td>
<td align="center" width="38">
<input type="radio" name="choix"  value="virement" onclick="show_div(5)" />
</td>
</tr>



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


<td style="text-align: center; border-left: 1px solid rgb(204, 204, 204); vertical-align: top; padding: 20px;" width="59%">
<div id="PmPanelNone" style="padding-top: 15px; display: block;">
<img src="../images/cheque.jpg" alt="" >
</div>




								
<div id="div_1" style="display: none">
<div style="width: 370px; text-align: left; margin-left: 20px; margin-top: 10px;">
<strong>PAIEMENT PAR CARTE BANCAIRE</strong>
<p>Message : <br>
blabla<br>
lkgjklgj<br>
emsflksemoteleg<br>
potpoetotpoer<br>
<br>
voila
</p>
</div>
</div>

<div id="div_2" style="display: none">Explication</div>
<div id="div_3" style="display: none">principe</div>
<div id="div_4" style="display: none">patou , il est pas partou - le gars !!</div>
<div id="div_5" style="display: none">Virement bancaire- comment ça marche</div>




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

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

<table width="730" border="0" cellspacing="0" cellpadding="0" class="ToolBox2">
<tr>
<th width="5"><img src="../images/PromoBoxLeft.gif" width="5" height="22" alt="" /></th>
<th width="720">
<strong>Acceptation des conditions générales de vente</strong>&nbsp; 
<img src="../images/PromoBoxArrow.gif" width="8" height="11" style="display:inline;" alt="" />
</th>
<th width="5"><img src="../images/PromoBoxRight.gif" width="5" height="22" alt="" /></th>
</tr>

<tr>
<td class="Inner" width="730" colspan="3" style="text-align:center;vertical-align:top;">
<br/>
<input type="checkbox" id="accept-terms" name="accept-terms" value="1" />
<label for="accept-terms">
Je déclare avoir pris connaissance et accepter les
</label>

<a href="javascript:void(0);" onclick="OpenWindow('cgv.htm', 'terms', 700 ,500, true);">termes et conditions générales de vente</a>.
<br/>
<br/>
</td>
</tr>
</table>


		<table class="ToolBox2" width="730" border="0" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<th width="5"><img src="../images/PromoBoxLeft.gif" alt="" width="5" height="22"></th>
					<th width="720" align="left"><strong>Informations complémentaires</strong>&nbsp; <img src="../images/PromoBoxArrow.gif" style="display: inline;" alt="" width="8" height="11"></th>
					<th width="5"><img src="../images/PromoBoxRight.gif" alt="" width="5" height="22"></th>
				</tr>
				<tr>
					<td class="Inner" colspan="3" width="730" align="center" valign="top"><textarea id="Commentaire" name="Commentaire" wrap="virtual" cols="50" rows="8" style="width: 99%; height: 80px;"></textarea></td>
				</tr>
			</tbody></table>
			<br>
				<table class="BskAddLine" width="730" border="0" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<td style="text-align: right;" width="100%"><img src="RecapAddLineSep.gif" alt="" width="568" height="1"></td>
				</tr>
				<tr>
					<td style="text-align: right;" height="30"><input name="imageField2" src="../images/btn_nextstep.gif" type="image" /></td>
				</tr>
			</tbody></table>
   





<p>&nbsp;</p>
<p><br>
</p>
</form>

</div>

</div>

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

			<form method="get" action="rechercher.php">
			<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/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> ";
						 
					      }
					 
	$mess1 = $_SESSION['nb_article_panier'] ." " ."article" ; 
      if($_SESSION['nb_article_panier'] >1)
        { $mess1 = $mess1 ."s";
	}

      $mess2 = $_SESSION['total_ttc_panier'] ." &euro";	

?>
      

      <div id="basket" class="on">
      <ul>
      <li id="BasketProdCount"><a href="../panier/panier.php"><?php echo $mess1; ?></a></li>  
      <li id="BasketAmount"><?php echo $mess2; ?></li> 
      </ul>
      </div>
      </div> 


	
        
</body>
</html>