<?php

	//--------------------------------------------------------------------------------------------------------
	// On prolonge la session
	//--------------------------------------------------------------------------------------------------------
	include("../M0/session_start.php") ;

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

	include("./AQCM_get_SMTP_parameters.php") ;
?>

<?php
	include('../M0/display_user_only.php'); 
?>

<div align="center">
<form name="form2" method="post" action="./AQCM_set_SMTP_parameters.php">
	
	<table width="<?php echo($tables_width); ?>" border="2" cellspacing="2" cellpadding="2" bordercolor="#ffffff" bgcolor="#000033">	
		
		<tr valign="middle" bordercolor="#666666"> 
			<td align="center">
			
				<table width="90%" align="center" >
					<tr valign="middle" bordercolor="#666666"> 
						<td align="justify">
							<div style="margin-top:10px;" >
								<font color="orange" >
								Le paramétrage du serveur SMTP est destiné 
								aux administrateurs suffisamment sûrs de leur niveau 
								d'expertise.
								</font>
							</div>
							<div style="margin-top:10px;margin-bottom:10px;" >
								Le serveur SMTP permet d'envoyer les mails lors des 
								configurations des sites, des sondes et des utilisateurs.
							</div>
						</td>
					</tr>
				</table>
				
				<table width="98%" align="center" >

					<tr>
						<td align="right"  width="30%">
							<label style="font-size:15px;" >serveur SMTP :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_Host" name="aqcm_SMTP_Host" value="<?php echo($aqcm_SMTP_Host);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >n° de port :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_Port" name="aqcm_SMTP_Port" value="<?php echo($aqcm_SMTP_Port);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
			
					<tr>
						<td align="right">
							<label style="font-size:15px;" >SMTPSecure :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_SMTPSecure" name="aqcm_SMTP_SMTPSecure" value="<?php echo($aqcm_SMTP_SMTPSecure);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >identifiant :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_Username" name="aqcm_SMTP_Username" value="<?php echo($aqcm_SMTP_Username);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >mot de passe :&nbsp;</label>
						</td>
						<td align="left">
							<input type="password" id="aqcm_SMTP_Password" name="aqcm_SMTP_Password" value="<?php echo($aqcm_SMTP_Password);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >setFrom :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_setFrom" name="aqcm_SMTP_setFrom" value="<?php echo($aqcm_SMTP_setFrom);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >addBCC :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_SMTP_addBCC" name="aqcm_SMTP_addBCC" value="<?php echo($aqcm_SMTP_addBCC);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>
					<tr>
						<td align="right">
							<label style="font-size:15px;" >site AQCM05 :&nbsp;</label>
						</td>
						<td align="left">
							<input type="text" id="aqcm_URL_AQCM05" name="aqcm_URL_AQCM05" value="<?php echo($aqcm_URL_AQCM05);?>" maxlength="64" style="width:284px;"  size="30" class="txtField" >
						</td>
					</tr>


					<tr>
						<td align="center" colspan="2">
								<input id="check_box_1" type="checkbox" onclick="myFunction()" style="margin-top:15px;margin-bottom:10px;">
								<label for="check_box_1"  class="text_checkbox" >
									&nbsp;&nbsp;afficher le mot de passe
								</label>
						</td>
					</tr>


				</table>

				<table width="98%" align="center">
					<tr>
						<td align="center" colspan="2">
						
								<button type="button" onclick="SetDefaultsValues()" class="button_A">réinitialiser les valeurs</button>
						
						</td>
					</tr>
					
					<tr>
						<td align="center" colspan="2">
						
								<input type="submit" value="enregistrer ces valeurs" class="button_A" >
						
						</td>
					</tr>
				</table>
				
			</td>
		</tr>

	</table>

	
</form>
</div>

<script>
function myFunction() {
  var x = document.getElementById("aqcm_SMTP_Password");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
</script>

<script>
function SetDefaultsValues() {
  document.getElementById("aqcm_SMTP_Host").value = "smtp.gmail.com";
  document.getElementById("aqcm_SMTP_Port").value = "465";
  document.getElementById("aqcm_SMTP_SMTPSecure").value = "ssl";
  document.getElementById("aqcm_SMTP_Username").value = "mon_adresse@gmail.com";
  document.getElementById("aqcm_SMTP_Password").value = "12345678";
  document.getElementById("aqcm_SMTP_setFrom").value = "adresse_expediteur@gmail.com";
  document.getElementById("aqcm_SMTP_addBCC").value = "adresse_en_copie@gmail.com";
  document.getElementById("aqcm_URL_AQCM05").value = "URL du site AQCM05";
}
</script>

</body>
</html>