<?php

	include("../M0/communs_en_tete_HTML.html") ;

	$back_link = "../M97/index.php";
	include('../M0/communs_en_tete_home_back.html');


	include('../M0/display_user_site_without_BAT_NIV.php'); 

?>

<font size="1" face="Arial, Helvetica, sans-serif">&nbsp;</font>

<form name="frmChange" method="post" action="" onSubmit="return validatePassword()">
	<table align="center" width="<?php echo $tables_width ; ?>"  bgcolor="#000033" border="2" bordercolor="#ffffff">	
		<tr>
			<td align="center" >
			
				<table width="100%" >	
		
					<p class="titre_bleu_2" >
						<u>- modification du mot de passe -</u>
					</p>

					<tr>
						<td align="right" width="30%"><label>old password :&nbsp;</label></td>
						<td align="left">
							<input 
								type="text" 
								name="current_Password" 
								id="current_Password" 
								value=""
								placeholder="ancien_mot_de_passe" 
								class="txtField_A" 
								style="width:280px;color:#000000;backgroundcolor:#ffffff;font-family:Arial;" 
							/>
						</td>
					</tr>
					<tr>
						<td align="right"><label>new password :&nbsp;</label></td>
						<td align="left">
							<input 
								type="text" 
								name="newPassword" 
								id="newPassword" 
								value=""
								placeholder="nouveau_mot_de_passe" 
								class="txtField_A" 
								style="width:280px;color:#000000;backgroundcolor:#ffffff;font-family:Arial;" 
							/>
						</td>
					</tr>
					<tr>
						<td align="right"><label>confirmation :&nbsp;</label></td>
						<td align="left">
							<input 
								type="text" 
								name="confirmPassword" 
								id="confirmPassword" 
								value=""
								placeholder="nouveau_mot_de_passe" 
								class="txtField_A" 
								style="width:280px;color:#000000;backgroundcolor:#ffffff;font-family:Arial;" 
							/>
						</td>
						
					</tr>
					<tr>
						<td colspan="2">
							<font size="1" face="Arial, Helvetica, sans-serif">&nbsp;</font>
						</td>
					</tr>
					<tr>
						<td align="right">
							<input id="check_box_1" name="check_box_1" type="checkbox" checked onclick="myFunction()">
							<label>
							&nbsp;:&nbsp;
							</label>
						</td>
						<td align="left">
							<label for="check_box_1" class="txtField_B" >
								mots de passe visibles
							</label>
						</td>
						
					</tr>

					<tr>
						
						<td align="right" width="24%">
							<input id="modify_on_all_sites" name="modify_on_all_sites" type="checkbox"	>
							&nbsp;:&nbsp;
						</td>
						<td align="left">
							<label for="modify_on_all_sites"  class="txtField_C" >
								modifier sur tous les sites
							</label>
						</td>
						
					</tr>

					<tr>
						
						<td colspan="2" align="center" >
							<?php 
								if( isset($message) ) { 
									echo( '<p class="message" >' ) ; 
									echo( $message ) ; 
									echo( '</p>' ) ; 
								} 
							?>
						</td>
						
					</tr>

				</table>
				
				<input type="submit" name="submit" value="changer le mot de passe" class="button_A" style="margin-top:10px;" ></br></br>

			</td>
		</tr>
	</table>
</form>

<script>

	function myFunction() {
		
	  var check_1 = document.getElementById("check_box_1");
	  
	  var x = document.getElementById("current_Password");
	  var y = document.getElementById("newPassword");
	  var z = document.getElementById("confirmPassword");

	  if (check_1.checked == true) {
		x.style.fontFamily = "Arial";
		y.style.fontFamily = "Arial";
		z.style.fontFamily = "Arial";
	  } else {
		x.style.fontFamily = "password";
		y.style.fontFamily = "password";
		z.style.fontFamily = "password";
	  }

	}
	
</script>

</body>
</html>