From a93efbd3becd2b526210a9696a7dc792ca07feff Mon Sep 17 00:00:00 2001
From: Adrien Clinet <adrien.clinet@localhost>
Date: Thu, 7 Apr 2022 10:12:20 +0200
Subject: [PATCH] modif

---
 controleurs/c_praticien.php   |  83 +++++++++++++
 controleurs/c_utilisateur.php | 107 +++++++++++++----
 controleurs/c_visite.php      |  50 ++++++++
 modele/classPDO.php           | 217 +++++++++++++++++++++++++++++++++-
 vues/v_ModifVisite.php        |  35 ++++++
 vues/v_choixPraticien.php     |  45 +++++++
 vues/v_choixUtilisateur.php   |  44 +++++++
 vues/v_fichePraticien.php     |  82 +++++++++++++
 vues/v_ficheProfil.php        |  43 -------
 vues/v_ficheUtilisateur.php   |  96 +++++++++++++++
 vues/v_ficheVisites.php       |  42 +++++++
 vues/v_unEchantillon.php      | 210 ++++++++++++++++++++++++++++++++
 vues/v_unPraticien.php        | 119 +++++++++++++++++++
 vues/v_unUtilisateur.php      | 153 ++++++++++++++++++++++++
 14 files changed, 1255 insertions(+), 71 deletions(-)
 create mode 100644 controleurs/c_praticien.php
 create mode 100644 controleurs/c_visite.php
 create mode 100644 vues/v_ModifVisite.php
 create mode 100644 vues/v_choixPraticien.php
 create mode 100644 vues/v_choixUtilisateur.php
 create mode 100644 vues/v_fichePraticien.php
 delete mode 100644 vues/v_ficheProfil.php
 create mode 100644 vues/v_ficheUtilisateur.php
 create mode 100644 vues/v_ficheVisites.php
 create mode 100644 vues/v_unEchantillon.php
 create mode 100644 vues/v_unPraticien.php
 create mode 100644 vues/v_unUtilisateur.php

diff --git a/controleurs/c_praticien.php b/controleurs/c_praticien.php
new file mode 100644
index 0000000..2af8c8d
--- /dev/null
+++ b/controleurs/c_praticien.php
@@ -0,0 +1,83 @@
+<?php
+// ****************************************'
+//  Le CASTEL-BTS SIO/ PROJET GSB PPE2     '
+//  Programme: c_praticien.php             '
+//  Objet    : gestion des praticiens      '
+//  Client   : Bts SIO1                    '
+//  Version  : 22.03                       '
+//  Date     : 09/03/2022 à 20h00          '
+//  Auteur   : Pascal.Blain@ac-dijon.fr    '
+//*****************************************'
+$action = $_REQUEST['action'];
+switch($action) {
+case 'voir':
+	{   
+		$formulaire			="choixP";
+		$champ				="lstPraticiens";	
+		include("vues/v_entete.php");
+		$region=$_SESSION['region'];
+		$lesLignes	 	=$pdo->getLesPraticiens($region);
+		include("vues/v_choixPraticien.php");
+		$lesInfosPraticien   =  $pdo->getInfosPraticien($choix);
+		$lesVisitesPraticien = $pdo->getLesVisitesPraticien($choix);
+		include("vues/v_fichePraticien.php");
+		break;
+	}
+//----------------------------------------- FORMULAIRE DE SAISIE
+case 'ajouter':
+case 'modifier':
+case 'supprimer':
+	{ 
+		$formulaire		="frmA";
+		$champ			="ztNom";	
+		include("vues/v_entete.php");
+		
+		$choix= $_REQUEST['lstPraticiens'];
+		$lesInfosPraticien  = $pdo->getInfosPraticien($choix);
+		$lesRegions			= $pdo->getParametre("region");
+		$lesTypesPraticien	= $pdo->getLesTypesPraticien();
+		include("vues/v_unPraticien.php");
+		break;
+	}
+//----------------------------------------- VALIDATION	
+case 'validerAjouter':
+case 'validerModifier':	
+case 'validerSupprimer':
+	{
+	(isset($_REQUEST['praticien']))?$valeur=$_REQUEST['praticien']:$valeur='erreur'; 
+	if ($_REQUEST['zOk']=="OK") 
+	{
+		if ($action==="validerSupprimer")
+		{
+			$pdo->supprimePraticien($valeur);
+			header ('location: index.php?choixTraitement=praticien&action=voir');	
+			break;
+		}
+		else
+		{
+			$nom		   = addslashes ($_REQUEST['ztNom']);
+			$prenom		   = addslashes ($_REQUEST['ztPrenom']);
+			$adresse	   = addslashes ($_REQUEST['ztAdresse']);
+			if (strlen($_REQUEST['ztCP'])>1)	{$cp	= $_REQUEST['ztCP'];} else {$cp = "Null";}
+			$ville		   = addslashes ($_REQUEST['ztVille']);
+			$coefNotoriete = addslashes ($_REQUEST['ztCoefNotoriete']);
+			$typePraticien = addslashes($_REQUEST['ldrTypePraticien']);
+			$region		   = addslashes($_REQUEST['ldrRegion']);
+			if ($action==="validerAjouter") 
+				{	$valeur=$pdo->nouveauCodePraticien();						
+					$pdo->ajoutPraticien($valeur,$nom,$prenom,$adresse,$cp,$ville,$coefNotoriete,$typePraticien,$region);}
+			else 
+				{$pdo->majPraticien($valeur,$nom,$prenom,$adresse,$cp,$ville,$coefNotoriete,$typePraticien,$region);}			
+		}
+	}
+	header ('location: index.php?choixTraitement=praticien&action=voir&lstPraticiens='.$valeur);	
+	break;
+	}
+	//----------------------------------------- 
+default :
+	{
+		echo 'erreur d\'aiguillage !'.$action;
+		break;
+	}
+}
+?>
diff --git a/controleurs/c_utilisateur.php b/controleurs/c_utilisateur.php
index 6ba85c4..b82777f 100644
--- a/controleurs/c_utilisateur.php
+++ b/controleurs/c_utilisateur.php
@@ -1,50 +1,107 @@
 <?php
 // ****************************************'
-//  Le CASTEL-BTS SIO/ PROJET démonstration'
-//  Programme: c_param.php                 '
-//  Objet    : gestion des parametres      '
+//  Le CASTEL-BTS SIO/ PROJET GSB PPE2 2020'
+//  Programme: c_utilisateur.php           '
+//  Objet    : gestion des utilisateurs    '
 //  Client   : Bts SIO1                    '
 //  Version  : 22.03                       '
-//  Date     : 09 mars 2022 à 19H51        '
-//  Auteur  : pascal-blain@wanadoo.fr      '
+//  Date     : 09/03/2022 à 19h18          '
+//  Auteur   : pascal.blain@ac-dijon.fr    '
 //*****************************************'
-
-$action 	= $_REQUEST['action'];
-
-
+$action = $_REQUEST['action'];
 switch($action) {
 case 'voir':
 	{
+		$formulaire			="choixP";
+		$champ				="lstUtilisateur";	
 		include("vues/v_entete.php");
-		$lesInfosProfil = $pdo->getInfosUtilisateur("*",$_SESSION['idUtilisateur']);
-		include("vues/v_ficheProfil.php");
+		if ($_SESSION['statut']==0)
+		{
+			$lesLignes		=$pdo->getLesUtilisateurs();
+			include("vues/v_choixUtilisateur.php");
+		}
+		else
+		{
+			$choix=$_SESSION['idUtilisateur'];	
+		}
+		$lesInfosUtilisateur= $pdo->getInfosUtilisateur("*",$choix);
+		$lesVisités			= $pdo->getLesVisités($choix);
+		include("vues/v_ficheUtilisateur.php");
 		break;
 	}
-
-//----------------------------------------- /MODIFICATION/
-
+//----------------------------------------- FORMULAIRE DE SAISIE
+case 'ajouter':
 case 'modifier':
-
+case 'supprimer':
 	{ 
+		$formulaire		="frmA";
+		$champ			="ztNom";	
 		include("vues/v_entete.php");
-		$infosParam = $pdo->getInfosParam($type, $valeur);
-		include("vues/v_unParam.php");
+		
+		$choix= $_REQUEST['lstUtilisateurs'];
+		$lesInfosUtilisateur= $pdo->getInfosUtilisateur("*",$choix);
+		$lesStatuts		= $pdo->getParametre("statUti");
+		$lesRegions		= $pdo->getParametre("region");
+		$lesLabos		= $pdo->getLesLabos();
+		include("vues/v_unUtilisateur.php");
 		break;
 	}
+//----------------------------------------- VALIDATION	
 
-//----------------------------------------- VALIDATION MODIFICATION
-case 'validerModifier':
-	{ 
-		if ($_REQUEST['zOk']=="OK") {$pdo->majParametre($type, $valeur, addslashes ($_REQUEST['zLibelle']), $_REQUEST['zTerritoire'], $_REQUEST['zDep'], $plancher, $plafond);}	
-		header ('location: index.php?choixTraitement=param&action=voir&lstParam='.$type);
+case 'validerAjouter':
+case 'validerModifier':	
+case 'validerSupprimer':
+	{
+	(isset($_REQUEST['utilisateur']))?$valeur=$_REQUEST['utilisateur']:$valeur=$_SESSION['idUtilisateur'];
+	if (!strlen($valeur)==3){$valeur=$_SESSION['idUtilisateur'];}
+		if ($_REQUEST['zOk']=="OK") 
+		{
+			if ($action==="validerSupprimer") 
+				{$pdo->supprimeUtilisateur($valeur);$valeur=$_SESSION['idUtilisateur'];}
+			else
+				{
+				$nom		= addslashes ($_REQUEST['ztNom']);
+				$prenom		= addslashes ($_REQUEST['ztPrenom']);
+				$statut		= $_REQUEST['ldrStatut'];
+				$login		= $_REQUEST['ztLogin'];
+				$region		= substr($_REQUEST['ldrRegion'],0, strpos($_REQUEST['ldrRegion'],"*"));
+				$secteur	= substr($_REQUEST['ldrRegion'],strpos($_REQUEST['ldrRegion'],"*")+1,strlen($_REQUEST['ldrRegion'])-1); 
+				//$mdp		= md5($_REQUEST['ztMdp']);
+				$mdp		= $_REQUEST['ztMdp'];	
+				if($_REQUEST['brMdp']==0 AND $action==="validerModifier") {$mdp="*";}
+				$adresse	= addslashes ($_REQUEST['ztAdresse']);
+				if (strlen($_REQUEST['ztCP'])>1)				{$cp	= $_REQUEST['ztCP'];} else {$cp = "Null";}
+				$ville			= addslashes ($_REQUEST['ztVille']);
+				$labo		= $_REQUEST['ldrLabo'];
+				if ($action==="validerAjouter") 
+					{$valeur=$pdo->nouveauCodeUtilisateur($nom);					
+					$pdo->ajoutUtilisateur($valeur,$nom,$prenom,$statut,$login,$mdp,$adresse,$cp,$ville,$region,$secteur,$labo);
+					$sujet 	= "nouveau compte";
+					$msg = "Bonjour ".$prenom." ".$nom.", \r\nLe Castel vient de créer un compte pour vous  ...\r\n";
+					}
+				else 
+					{$pdo->majUtilisateur($valeur,$nom,$prenom,$statut,$login,$mdp,$adresse,$cp,$ville,$region,$secteur,$labo);
+					$sujet 	= "nouveau mot de passe";
+					$msg = "Bonjour ".$prenom." ".$nom.", \r\nLe Castel vient de modifier votre mot de passe  ...\r\n";
+					}		
+				$entete	= "From: Pascal Blain <pascal.blain@ac-dijon.fr>\r\n";
+				$entete	.= "Mime-Version: 1.0\r\n";
+				$entete	.= "Content-type: text/html; charset=utf-8\r\n";
+				$entete	.= "\r\n";
+				$msg .= "Statut : ".$statut."\r\n";
+				$msg .= "Identifiant : ".$login."\r\n";
+				$msg .= "Mot de passe : ".$_REQUEST['ztMdp']."\r\n";
+				//$pdo->envoyerMail($mail, $sujet, $msg, $entete);
+				}
+		}
+		header ('location: index.php?choixTraitement=utilisateur&action=voir&lstUtilisateurs='.$valeur);
 		break;
 	}
-
-	
+	//----------------------------------------- 
 default :
 	{
 		echo 'erreur d\'aiguillage !'.$action;
 		break;
 	}
 }
-?>
\ No newline at end of file
+?>
diff --git a/controleurs/c_visite.php b/controleurs/c_visite.php
new file mode 100644
index 0000000..b4e8683
--- /dev/null
+++ b/controleurs/c_visite.php
@@ -0,0 +1,50 @@
+<?php
+// ****************************************'
+//  Le CASTEL-BTS SIO/ PROJET démonstration'
+//  Programme: c_param.php                 '
+//  Objet    : gestion des parametres      '
+//  Client   : Bts SIO1                    '
+//  Version  : 22.03                       '
+//  Date     : 09 mars 2022 à 19H51        '
+//	Auteur : CLINET Adrien                 '
+//*****************************************'
+
+$action 	= $_REQUEST['action'];
+
+
+switch($action) {
+case 'voir':
+	{
+		include("vues/v_entete.php");
+		$lesInfosCompteRendu = $pdo->getInfosCompteRendu();
+		include("vues/v_ficheVisites.php");
+		break;
+	}
+
+//----------------------------------------- /MODIFICATION/
+
+case 'modifier':
+
+	{ 
+		include("vues/v_entete.php");
+		$lesInfosCompteRendu = $pdo->getInfosCompteRendu();
+		include("vues/v_ModifVisite.php");
+		break;
+	}
+
+//----------------------------------------- VALIDATION MODIFICATION
+case 'validerModifier':
+	{ 
+		if ($_REQUEST['zOk']=="OK") {$pdo->majProfil($type, $valeur, addslashes ($_REQUEST['zLibelle']), $_REQUEST['zTerritoire'], $_REQUEST['zDep'], $plancher, $plafond);}	
+		header ('location: index.php?choixTraitement=utilisateur&action=voir');
+		break;
+	}
+
+	
+default :
+	{
+		echo 'erreur d\'aiguillage !'.$action;
+		break;
+	}
+}
+?>
\ No newline at end of file
diff --git a/modele/classPDO.php b/modele/classPDO.php
index b83dfef..6af174d 100644
--- a/modele/classPDO.php
+++ b/modele/classPDO.php
@@ -1,7 +1,7 @@
 <?php
 /** 
  * @author 	:Pascal BLAIN, lycee le castel à Dijon
- * @version :2022-03-09
+ * @version :2022-03-31
  * Classe d'acces aux donnees. Utilise les services de la classe PDO pour l'application
  * Les attributs sont tous statiques, les 4 premiers pour la connexion
  * $monPdo est de type PDO - $monPdoBD contient l'unique instance de la classe
@@ -60,8 +60,220 @@ class PdoBD
 		$ligne = $rs->fetch();
 		return $ligne;
 	}
-/** ---------------------------------------------- Fin module Connexion
+/** ---------------------------------------------- Fin module Connexion*/
+/** ---------------------------------------------- Infos des praticiens*/
+public function getInfosCompteRendu()
+{
+	$req = "SELECT pNom,pPrenom,pRue,pCP,pVille,vDate,vMotif,vRapport
+	FROM praticien INNER JOIN visite ON praticien.pNum = visite.pNum";
+	$rs = PdoBD::$monPdo->query($req);
+	if ($rs === false) {afficherErreurSQL("Probleme lors de la recherche des informations dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
+	$lesLignes = $rs->fetchAll();
+	return $lesLignes;
+}
+
+/** ---------------------------------------------- module gestion des UTILISATEURS
+ * Retourne les informations des UTILISATEURS
 */
+	public function getLesUtilisateurs()
+	{		
+		$req = "SELECT uId,uNom,uPrenom,uLogin,uMdp,uStatut
+					FROM utilisateur 
+					ORDER BY uNom,uPrenom;";
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des &eacute;l&grave;ves ..", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes; 
+	}
+/**
+ * Retourne les informations des praticiens visités par un visiteur médical
+*/
+	public function getLesVisités($choix)
+	{
+		$req = "SELECT p.pNum,pNom,pPrenom,pVille,count(*) as nbVisites
+					FROM praticien p INNER JOIN visite v ON p.pNum=v.pNum
+					WHERE uId='$choix'
+					GROUP BY p.pNum,pNom,pPrenom,pVille
+					ORDER BY pNom,pPrenom;";
+		//echo $req;
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations des praticiens visit&eacute;s...", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes; 
+	}
+/**
+ * Retourne les informations des labos
+*/
+	public function getLesLabos()
+	{
+		$req = "SELECT lCode, lNom
+					FROM labo
+					ORDER BY lNom;";
+		//echo $req;
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations des labos...", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes; 
+	}
+/**
+ * Met à jour une ligne de la table utilisateur 
+*/
+	public function majUtilisateur($valeur,$nom,$prenom,$statut,$login,$mdp,$adresse,$cp,$ville,$region,$secteur,$labo)
+	{
+		$req = "UPDATE utilisateur SET
+					uNom='$nom', uPrenom='$prenom', uStatut=$statut, uLogin='$login', uAdresse='$adresse',
+					uCP=$cp, uVille='$ville', uRegion=$region, uSecteur=$secteur, ulabo='$labo', uDateModif=NOW()";
+		if ($mdp<>"*") {$req.= ",uMdp='$mdp' ";}
+		$req.=" WHERE uId='$valeur';";
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la mise à jour de l'utilisateur dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
+	}
+/**
+ * supprime une ligne de la table utilisateur 
+*/
+	public function supprimeUtilisateur($valeur)
+	{
+		$req = "DELETE 
+				FROM utilisateur
+				WHERE  uId='$valeur';";
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la suppression de l'utilisateur dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
+	}	
+/**
+ * ajoute une ligne dans la table utilisateur
+*/
+	public function nouveauCodeUtilisateur($nom)
+	{			
+		$req = "SELECT if( isnull( max(cast(SUBSTRING(uid, 2, length(uid)-1) as unsigned integer)) ) , 1, max(cast(SUBSTRING(uid, 2, length(uid)-1) as unsigned integer))+1) as num 
+				FROM utilisateur 
+				WHERE LEFT(uId, 1) ='$nom[0]';";
+		$rs = PdoBD::$monPdo->query($req);
+		if($rs === false){afficherErreurSQL("Acces impossible a la table utilisateur. ", $req, PdoBD::$monPdo->errorInfo());}
+		$ligne=$rs->fetch();
+		return $nom[0].strval($ligne['num']);
+	}	
+	
+	public function ajoutUtilisateur($valeur,$nom,$prenom,$statut,$login,$mdp,$adresse,$cp,$ville,$region,$secteur,$labo)
+	{			
+		$req = "INSERT INTO utilisateur (uId,uNom,uPrenom,uStatut,uLogin,uMdp,uAdresse,uCP,uVille,uRegion,uSecteur,uLabo,uDateEnreg,uDateModif) 
+				VALUES 
+					('$valeur','$nom','$prenom',$statut,'$login','$mdp','$adresse',$cp,'$ville',$region,$secteur,'$labo', NOW(),NOW());";
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de l'insertion de l'utilisateur dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}	
+	}
+/** ---------------------------------------------- fin module gestion des UTILISATEURS
+
+/** ---------------------------------------------- module gestion des praticiens
+ * Retourne les informations des praticiens 
+*/
+	public function getLesPraticiens($region)
+	{		
+		$req = "SELECT distinct p.pNum,pNom,pPrenom,region,count(vNum) as nbVisites
+					FROM praticien p LEFT JOIN visite v ON (p.pNum=v.pNum";
+		($_SESSION['region']==0)?$req.=") group by pNom,pPrenom,p.pNum,region;":$req.=" and uId='".$_SESSION['idUtilisateur']."') WHERE region = $region group by pNom,pPrenom,p.pNum,region;";
+		
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des praticiens ..", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes; 
+	}	
+/**
+ * Retourne les informations d'un praticien sous la forme d'un tableau associatif
+*/
+	public function getInfosPraticien($idfP)
+	{
+		$req = "SELECT pNum,pNom,pPrenom,pRue,pCP,pVille,pCoefNotoriete,p.tCode,tp.tLibelle as wTypeLibelle,p.region,r.plibelle as wRegion
+					FROM praticien p
+					INNER JOIN type_praticien tp ON tp.tCode = p.tCode
+					INNER JOIN parametre r ON (r.pType='region' AND r.pIndice=p.region) 
+					WHERE pNum='$idfP'
+					";
+		
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations d'un praticien...", $req, PdoBD::$monPdo->errorInfo());}
+		$ligne = $rs->fetch();
+		return $ligne;
+	}	
+/**
+ * Retourne les informations des visites chez un praticien sous la forme d'un tableau associatif
+*/
+	public function getLesVisitesPraticien($idP)
+	{
+	$req = "SELECT  v.uId,vNum,DATE_FORMAT(vDate,'%d/%m/%Y') as wDateVisite,uNom as wNomVisiteur, vRapport, vMotif
+					FROM visite v
+					INNER JOIN utilisateur u ON u.uId = v.uId
+					WHERE pNum='$idP'
+					ORDER BY vDate desc;";
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des praticiens ..", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes;
+	}	
+/**
+ * Retourne les informations des types praticien
+*/
+	public function getLesTypesPraticien()
+	{
+		$req = "SELECT tCode, tLibelle
+					FROM type_praticien 
+					ORDER BY tLibelle;";
+		$rs = PdoBD::$monPdo->query($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations des types de praticien...", $req, PdoBD::$monPdo->errorInfo());}
+		$lesLignes = $rs->fetchAll();
+		return $lesLignes; 
+	}
+/**
+ * Met à jour une ligne de la table praticien 
+*/
+	public function majPraticien($valeur,$nom,$prenom,$adresse,$cp,$ville,$coefNotoriete,$type,$region)
+	{
+		$req = "UPDATE praticien SET
+					pNom='$nom', pPrenom='$prenom', pRue='$adresse',
+					pCP=$cp, pVille='$ville', region='$region', tCode='$type', pCoefNotoriete='$coefNotoriete'";
+		$req.=" WHERE pNum='$valeur';";
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la mise à jour de l'utilisateur dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
+	}	
+/**
+ * Supprime une ligne de la table praticien 
+*/
+	public function supprimePraticien($valeur)
+	{
+		$req = "DELETE 
+				FROM praticien
+				WHERE  pNum='$valeur';";
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de la suppression du praticien dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
+	}	
+/**
+ * Ajoute une ligne dans la table praticien
+*/
+	public function nouveauCodePraticien()
+	{			
+		$req="SELECT if( isnull( max(pNum) ) , 1, max(pNum)+1 ) AS numNouveau from praticien;";
+		$rs = PdoBD::$monPdo->query($req);
+		if($rs === false){afficherErreurSQL("Acces impossible a la table praticien. ", $req, PdoBD::$monPdo->errorInfo());}
+		$ligne=$rs->fetch();
+		return $ligne['numNouveau'];
+	}
+	public function ajoutPraticien($valeur,$nom,$prenom,$adresse,$cp,$ville,$coefNotoriete,$typePraticien,$region)
+	{	
+		$req = "INSERT INTO praticien (pNum,pNom,pPrenom,pRue,pCP,pVille,pCoefNotoriete,tCode,region) 
+					VALUES 
+						('$valeur','$nom','$prenom','$adresse','$cp','$ville','$coefNotoriete','$typePraticien','$region');";
+
+		$rs = PdoBD::$monPdo->exec($req);
+		if ($rs === false) {afficherErreurSQL("Probleme lors de l'insertion du praticien dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}	
+	}
+/** ---------------------------------------------- fin module gestion des praticiens
+
+/** ---------------------------------------------- module gestion des visites	
+/**
+ * 
+*/
+
+
+/** ---------------------------------------------- fin module gestion des visites
 	
 /** ---------------------------------------------- gestion des PARAMETRES
 /**
@@ -147,6 +359,5 @@ class PdoBD
 		if ($rs === false) {afficherErreurSQL("Probleme lors de l'insertion d'un parametre dans la base de donn&eacute;es.", $req, PdoBD::$monPdo->errorInfo());}
 	}
 /** ---------------------------------------------- fin gestion des PARAMETRES
-*/
 }
 ?>
\ No newline at end of file
diff --git a/vues/v_ModifVisite.php b/vues/v_ModifVisite.php
new file mode 100644
index 0000000..770a2f3
--- /dev/null
+++ b/vues/v_ModifVisite.php
@@ -0,0 +1,35 @@
+<?php
+//Auteur : CLINET Adrien -- dernière modif : 17/03/2022
+
+echo("
+			<fieldset><legend>Visite</legend>
+		<div>
+			<fieldset><legend>Coordonnées du praticien</legend>
+		<table>
+                        <tr> <th>Nom / Prenom</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uNom, uPrenom']."'>";$actif=null;}
+echo ("				</td> </tr>
+                        <tr> <th>Rue</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uPrenom']."'>";$actif=null;}  
+echo ("				</td> </tr>
+                        <tr> <th>Code postal / Ville</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uAdresse']."'>";$actif=null;}
+echo ("
+	  				</table>
+			</fieldset>	
+		<div>
+			<fieldset><legend>Rapport de visite</legend>
+		<table>
+                        <tr> <th>Date de visiteNom</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uNom']."'>";$actif=null;}  
+echo ("				</td> </tr>
+                        <tr> <th>Motif</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uPrenom']."'>";$actif=null;}  
+echo ("				</td> </tr>
+                        <tr> <th>Commentaires</th>			<td>");
+						if ($action==="modifier") 	{echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosProfil['uAdresse']."'>";$actif=null;}
+echo ("
+	  				</table>
+			</fieldset>	
+			</fieldset>	
+");
\ No newline at end of file
diff --git a/vues/v_choixPraticien.php b/vues/v_choixPraticien.php
new file mode 100644
index 0000000..4ee1f9e
--- /dev/null
+++ b/vues/v_choixPraticien.php
@@ -0,0 +1,45 @@
+<!-- choix d'un praticien / Derniere modification le 19 avril 2020 par Pascal Blain -->
+<?php
+	$nbL=count($lesLignes); 
+	echo ' 
+	<form name="choixP" action="index.php?choixTraitement=praticien&action=voir" method="post">
+	<h2>'.$titre; ?>
+	        <select name="lstPraticiens" STYLE="width:350px;" onchange="submit();">
+	            <?php 
+				$noL=1;   // ?
+	            if (!isset($_REQUEST['lstPraticiens'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstPraticiens'];}
+	            $i=1; 
+	            foreach ($lesLignes as $uneLigne) 
+				{	
+					if($uneLigne['pNum'] == $choix or $choix == 'premier')
+						{echo "<option selected value=\"".$uneLigne['pNum']."\">".$uneLigne['pNom']." ".$uneLigne['pPrenom']." (".$uneLigne['nbVisites']." visites)</option>\n	";
+						$choix = $uneLigne['pNum'];
+						$noL=$i;
+						}
+					else
+						{echo "<option value=\"".$uneLigne['pNum']."\">".$uneLigne['pNom']." ".$uneLigne['pPrenom']." (".$uneLigne['nbVisites']." visites)</option>\n		";
+						$i=$i+1;}
+				}	           
+			    echo '   
+	        </select>			
+			</h2>'
+?>
+	        <!-- ============================================================== navigation dans la liste -->
+	        <div id='navigation'>
+		        <input type="image"		id="zNouveau" 	title="Ajouter" 	src="images/ajout.gif" 		onclick="faire('choixP', 'ajouter')">
+                <input type="image"		id="zModif" 	title="Modifier" 	src="images/modif.gif" 		onclick="faire('choixP', 'modifier')">
+                <input type="image"		id="zSupprime" 	title="Supprimer"	src="images/supprimer.gif" 	onclick="faire('choixP', 'supprimer')">&nbsp;&nbsp;
+                <input type="image"		id="zPremier" 	title="premier" 	src="images/goPremier.gif" 	onclick="premier('choixP','lstPraticiens')">    
+		        <input type="image" 	id="zPrecedent" title="pr&eacute;c&eacute;dent" src="images/goPrecedent.gif" onclick="precedent('choixP','lstPraticiens')"> 
+<?php echo '	
+				<input type="text" 	id="zNumero" value="'.$noL.'/'.$nbL.'" disabled="true" size="5" style="text-align:center;vertical-align:top;">'; ?>
+		        <input type="image" 	id="zSuivant" 	title="suivant" 	src="images/goSuivant.gif" 	onclick="suivant('choixP','lstPraticiens')">    
+		        <input type="image"	id="zDernier" 		title="dernier" 	src="images/goDernier.gif" 	onclick="dernier('choixP','lstPraticiens')">    
+		    </div>
+            <input type="hidden"		name="action"	value="<?php if($_REQUEST['action']=="liste") {echo "voir";} else {echo $_REQUEST['action'];}?>">
+            <input type="hidden"		name="type" 	value="*">
+        	<input type="hidden"		name="zType"	value="*">
+        	<input type="hidden"		name="zIndice"	value="*">
+            <input type="hidden"		name="zColonne"	value="*">
+	</form>
+<!-- fin liste de choix -->
diff --git a/vues/v_choixUtilisateur.php b/vues/v_choixUtilisateur.php
new file mode 100644
index 0000000..b4b1da4
--- /dev/null
+++ b/vues/v_choixUtilisateur.php
@@ -0,0 +1,44 @@
+<!-- choix d'un utilisateur / Derniere modification le 9 avril 2020 par Pascal Blain -->
+<?php
+	$nbL=count($lesLignes); 
+	echo ' 
+	<form name="choixP" action="index.php?choixTraitement=utilisateur&action=voir" method="post">
+	<h2>'.$titre; ?>
+	        <select name="lstUtilisateurs" STYLE="width:350px;" onchange="submit();">
+	            <?php 
+	            if (!isset($_REQUEST['lstUtilisateurs'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstUtilisateurs'];}
+	            $i=1; 
+	            foreach ($lesLignes as $uneLigne) 
+				{	
+					if($uneLigne['uId'] == $choix or $choix == 'premier')
+						{echo "<option selected value=\"".$uneLigne['uId']."\">".$uneLigne['uNom']." ".$uneLigne['uPrenom']."</option>\n	";
+						$choix = $uneLigne['uId'];
+						$noL=$i;
+						}
+					else
+						{echo "<option value=\"".$uneLigne['uId']."\">".$uneLigne['uNom']." ".$uneLigne['uPrenom']."</option>\n		";
+						$i=$i+1;}
+				}	           
+			    echo '   
+	        </select>			
+			</h2>'
+?>
+	        <!-- ============================================================== navigation dans la liste -->
+	        <div id='navigation'>
+		        <input type="image"		id="zNouveau" 	title="Ajouter" 	src="images/ajout.gif" 		onclick="faire('choixP', 'ajouter')">
+                <input type="image"		id="zModif" 	title="Modifier" 	src="images/modif.gif" 		onclick="faire('choixP', 'modifier')">
+                <input type="image"		id="zSupprime" 	title="Supprimer"	src="images/supprimer.gif" 	onclick="faire('choixP', 'supprimer')">&nbsp;&nbsp;
+                <input type="image"		id="zPremier" 	title="premier" 	src="images/goPremier.gif" 	onclick="premier('choixP','lstUtilisateurs')">    
+		        <input type="image" 	id="zPrecedent" title="pr&eacute;c&eacute;dent" src="images/goPrecedent.gif" onclick="precedent('choixP','lstUtilisateurs')"> 
+<?php echo '	
+				<input type="text" 	id="zNumero" value="'.$noL.'/'.$nbL.'" disabled="true" size="5" style="text-align:center;vertical-align:top;">'; ?>
+		        <input type="image" 	id="zSuivant" 	title="suivant" 	src="images/goSuivant.gif" 	onclick="suivant('choixP','lstUtilisateurs')">    
+		        <input type="image"	id="zDernier" 		title="dernier" 	src="images/goDernier.gif" 	onclick="dernier('choixP','lstUtilisateurs')">    
+		    </div>
+            <input type="hidden"		name="action"	value="<?php if($_REQUEST['action']=="liste") {echo "voir";} else {echo $_REQUEST['action'];}?>">
+            <input type="hidden"		name="type" 	value="*">
+        	<input type="hidden"		name="zType"	value="*">
+        	<input type="hidden"		name="zIndice"	value="*">
+            <input type="hidden"		name="zColonne"	value="*">
+	</form>
+<!-- fin liste de choix -->
diff --git a/vues/v_fichePraticien.php b/vues/v_fichePraticien.php
new file mode 100644
index 0000000..1f1c985
--- /dev/null
+++ b/vues/v_fichePraticien.php
@@ -0,0 +1,82 @@
+
+<!-- affichage du detail de la fiche Praticien / Derniere modification le 19 avril 2020  -->
+<?php 
+$titre="Caract&eacute;ristiques du praticien";
+echo ('
+		<div id="fiche">
+			<ul class="lesOnglets">	
+				<li class="actif onglet" 	id="onglet1" onclick="javascript:Affiche(\'1\',2);">'.$titre.'</li>
+				<li class="inactif onglet" 	id="onglet2" onclick="javascript:Affiche(\'2\',2);">Visites</li>
+			</ul>');
+/*  */
+/*================================================================================================== COORDONNEES (1) */
+
+ echo ("	
+	 	<div style='display: block;' class='unOnglet' id='contenuOnglet1'> 
+ 			<table style='border: 0px solid white;'>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Coordonn&eacute;es du praticien ");
+echo ("						</legend>
+					<table>
+						<tr><th style='width:120px;'>Nom</th>	<td>".$lesInfosPraticien['pNom']."</td> </tr>
+						<tr><th>Pr&eacute;nom</th>				<td>".$lesInfosPraticien['pPrenom']."</td></tr>
+						<tr><th>Rue</th>						<td>".$lesInfosPraticien['pRue']."</td></tr>
+						<tr><th>Code postal</th>				<td>".$lesInfosPraticien['pCP']."</td></tr>
+						<tr><th>Ville</th>						<td>".$lesInfosPraticien['pVille']."</td></tr>
+						<tr><th>Coefficient notoriete</th>		<td>".$lesInfosPraticien['pCoefNotoriete']."</td></tr>
+						<tr><th>Type praticien</th>				<td>".$lesInfosPraticien['wTypeLibelle']."</td></tr>
+						<tr><th>R&eacute;gion</th>				<td>".$lesInfosPraticien['wRegion']."</td></tr>						
+						");
+echo ("				</table>
+				</fieldset>
+				</td>	
+				
+			</tr>
+			</table>
+	</div>");		
+				
+		
+/*================================================================================================== SUIVI DES VISITES(2)*/		
+ echo ("	
+	 	<div style='display: none;' class='unOnglet' id='contenuOnglet2'> 
+ 			<table style='border: 0px solid white;'>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset><legend>Visites chez le praticien</legend>
+				<table>
+				<tr><th class='controle' >Date visite</th>
+					<th class='controle' >Visiteur médical</th>
+					<th class='controle' >Rapport</th>
+					<th class='controle' >Motif</th>
+				</tr>");
+		foreach ($lesVisitesPraticien as $uneVisite)		
+		{echo(" 
+				<tr><td class='controle'>
+<a href='index.php?choixTraitement=visite&action=voir&lstVisites=".$uneVisite['uId']."-".$uneVisite['vNum']."' style='text-decoration:none;'>".$uneVisite['wDateVisite']."</a></td>
+					<td class='controle' >".$uneVisite['wNomVisiteur']."</td>
+					<td class='controle' >".$uneVisite['vRapport']."</td>
+					<td class='controle' >".$uneVisite['vMotif']."</td>
+				</tr>");
+		}					
+		echo ("
+				</table>
+				</fieldset>
+				</td>");				
+	echo ("	</tr>
+			</table>
+		</div>");   
+
+/*================================================================================================== XXXXX */
+echo ("
+		<div style='display: none;' class='unOnglet' id='contenuOngletX'>
+			<fieldset><legend>XXXX</legend>
+			<table>
+				<tr><th style='width:130px;'>.....</th></tr>
+				<tr><td>xxxx</td></tr>
+			</table>
+			</fieldset>
+		</div>
+
+	</div>");				
+?>
\ No newline at end of file
diff --git a/vues/v_ficheProfil.php b/vues/v_ficheProfil.php
deleted file mode 100644
index 8ace9fd..0000000
--- a/vues/v_ficheProfil.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
-*auteur : Hadrien Rommel, lycée le castel à 
-*dernière modif : 17/03/2022**/
-
-echo("
-		<div>
-			<fieldset><legend>Coordonnées de l'utilisateur</legend>
-				<table>");
-					
-					echo("<tr> <th style='width:20px;text-align:center;'>Nom</th>
-					<td>".$lesInfosProfil['uNom']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Prenom</th>
-					<td>".$lesInfosProfil['uPrenom']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Adresse</th>
-					<td>".$lesInfosProfil['uAdresse']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Code Postal</th>
-					<td>".$lesInfosProfil['uCP']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Ville</th>
-					<td>".$lesInfosProfil['uVille']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Statut</th>
-					<td>".$lesInfosProfil['wStatut']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Nom de compte</th>
-					<td>".$lesInfosProfil['uLogin']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Region</th>
-					<td>".$lesInfosProfil['wRegion']."</td></tr>
-					<tr> <th style='width:20px;text-align:center;'>Secteur</th>
-					<td>".$lesInfosProfil['wSecteur']."</td></tr>
-
-				</table>
-					
-			</fieldset>	
-			
-			<fieldset><legend>Laboratoire</legend>
-				<table style='border: 0px solid white;'>
-					<tr> 
-						 <td><tr>
-					<td>".$lesInfosProfil['lNom']."</td></tr>	</td>
-					</tr>
-				</table>
-			</fieldset>			
-		</div>
-	");	
\ No newline at end of file
diff --git a/vues/v_ficheUtilisateur.php b/vues/v_ficheUtilisateur.php
new file mode 100644
index 0000000..fd77476
--- /dev/null
+++ b/vues/v_ficheUtilisateur.php
@@ -0,0 +1,96 @@
+
+<!-- affichage du detail de la fiche Utilisateur / Derniere modification le 11 avril 2020 par Pascal BLAIN -->
+<?php 
+$titre="caract&eacute;ristiques de l'utilisateur";
+echo ('
+		<div id="fiche">
+			<ul class="lesOnglets">	
+				<li class="actif onglet" 	id="onglet1" onclick="javascript:Affiche(\'1\',2);">'.$titre.'</li>
+				<li class="inactif onglet" 	id="onglet2" onclick="javascript:Affiche(\'2\',2);">Praticiens visités</li>
+			</ul>');
+/*================================================================================================== COORDONNEES (1) */
+
+ echo ("	
+	 	<div style='display: block;' class='unOnglet' id='contenuOnglet1'> 
+ 			<table style='border: 0px solid white;'>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset><legend>Coordonn&eacute;es de  l'utilisateur ");
+				if ($lesInfosUtilisateur['uId']==$_SESSION['idUtilisateur'] and $_SESSION['statut']<>0)
+				{$lien=$_SERVER['PHP_SELF'].'?choixTraitement=utilisateur&action=modifier&lstUtilisateurs='.$lesInfosUtilisateur['uId'];
+echo ('			<input type="image"	title="Modifier" src="images/modif.gif" onclick="document.location.href=\''.$lien.'\'">');
+				}
+echo ("</legend>
+					<table>
+						<tr><th style='width:120px;'>Nom</th>	<td>".$lesInfosUtilisateur['uNom']."</td> </tr>
+						<tr><th>Pr&eacute;nom</th>				<td>".$lesInfosUtilisateur['uPrenom']."</td></tr>
+						<tr><th>Adresse</th>					<td>".$lesInfosUtilisateur['uAdresse']."</td></tr>
+						<tr><th>Code postal</th>				<td>".$lesInfosUtilisateur['uCP']."</td></tr>
+						<tr><th>Ville</th>						<td>".$lesInfosUtilisateur['uVille']."</td></tr>
+						<tr><th>Statut</th>						<td>".$lesInfosUtilisateur['wStatut']."</td></tr>
+						<tr><th>Nom de compte</th>				<td>".$lesInfosUtilisateur['uLogin']."</td></tr>
+						<tr><th>R&eacute;gion</th>				<td>".$lesInfosUtilisateur['wRegion']."</td></tr>						<tr><th>Secteur</th>					<td>".$lesInfosUtilisateur['wSecteur']."</td></tr>						
+						");
+echo ("			</table>
+				</fieldset>
+				</td>	
+				
+			</tr>
+			</table>
+			
+			<fieldset><legend>Laboratoire</legend>
+			<table style='border: 0px solid white;'>
+				<tr> 
+					 <td>".$lesInfosUtilisateur['lNom']."</td>
+				</tr>
+			</table>
+			</fieldset>
+		</div>");
+		
+/*================================================================================================== SUIVI DES VISITES(2)*/		
+ echo ("	
+	 	<div style='display: none;' class='unOnglet' id='contenuOnglet2'> 
+ 			<table style='border: 0px solid white;'>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset><legend>Praticiens visit&eacute;s</legend>
+				<table>
+				<tr><th class='controleLong'>Nom et prenom du praticien</th>
+						<th class='controle' style='text-align : center;'>Nombre de visites</th>
+				</tr>");
+		foreach ($lesVisités as $uneLigne)		
+		{echo(" 
+				<tr><td class='controleLong'>
+<a href='index.php?choixTraitement=praticien&action=voir&lstPraticiens=".$uneLigne['pNum']."' style='text-decoration:none;'>".$uneLigne['pNom']." ".$uneLigne['pPrenom']." (".$uneLigne['pVille'].")</a></td>
+						<td class='controle' style='text-align : center;'>".$uneLigne['nbVisites']."</td>
+				</tr>");
+		}					
+		echo ("
+				</table>
+				</fieldset>
+				</td>				
+			</tr>
+			</table>
+			
+			<fieldset><legend>Laboratoire</legend>
+			<table style='border: 0px solid white;'>
+				<tr> 
+					 <td>".$lesInfosUtilisateur['lNom']."</td>
+				</tr>
+			</table>
+			</fieldset>
+		</div>");
+
+/*================================================================================================== XXXXX */
+echo ("
+		<div style='display: none;' class='unOnglet' id='contenuOngletX'>
+			<fieldset><legend>XXXX</legend>
+			<table>
+				<tr><th style='width:130px;'>.....</th></tr>
+				<tr><td>xxxx</td></tr>
+			</table>
+			</fieldset>
+		</div>
+
+	</div>");				
+?>
\ No newline at end of file
diff --git a/vues/v_ficheVisites.php b/vues/v_ficheVisites.php
new file mode 100644
index 0000000..ef6cf56
--- /dev/null
+++ b/vues/v_ficheVisites.php
@@ -0,0 +1,42 @@
+<?php
+//auteur : CLINET Adrien -- dernière modif : 31/03/2022
+echo("
+		<div>
+			<fieldset><legend>Coordonnées du praticien
+			<td style='width:10px;text-align:center;'><a href='index.php?choixTraitement=visite&action=voir'><img src='images/modif.gif'  title='voir'></a></td>
+			<td style='width:10px;text-align:center;'></legend>
+				<table>");
+					
+					echo("<tr> <th style='width:20px;text-align:center;'>Nom</th>
+					<td>".$lesInfosCompteRendu['pNom']."</td></tr>
+					<tr> <th style='width:20px;text-align:center;'>Prenom</th>
+					<td>".$lesInfosCompteRendu['pPrenom']."</td></tr>
+					<tr> <th style='width:20px;text-align:center;'>Rue</th>
+					<td>".$lesInfosCompteRendu['pRue']."</td></tr>
+                    <tr> <th style='width:20px;text-align:center;'>Code Postal</th>
+					<td>".$lesInfosCompteRendu['pCP']."</td></tr>
+                    <tr> <th style='width:20px;text-align:center;'>Ville</th>
+					<td>".$lesInfosCompteRendu['pVille']."</td></tr>
+
+				</table>
+					
+			</fieldset>	
+			
+			<fieldset><legend>Rapport de visite</legend>
+				<table style='border: 0px solid white;'>
+					<tr> 
+                    <tr> <th style='width:20px;text-align:center;'>Ville</th>
+					<td>".$lesInfosProfil['uVille']."</td></tr>
+                    <tr> <th style='width:20px;text-align:center;'>Ville</th>
+					<td>".$lesInfosProfil['uVille']."</td></tr>
+                    <tr> <th style='width:20px;text-align:center;'>Ville</th>
+					<td>".$lesInfosProfil['uVille']."</td></tr>
+                    <tr> <th style='width:20px;text-align:right;'>Ville</th>
+					<td>".$lesInfosProfil['uVille']."</td></tr>
+                    <tr> <th style='width:20px;text-align:right;'>Ville</th>
+					<td>".$lesInfosProfil['uVille']."</td></tr>
+					</tr>
+				</table>
+			</fieldset>			
+		</div>
+	");	
diff --git a/vues/v_unEchantillon.php b/vues/v_unEchantillon.php
new file mode 100644
index 0000000..1155b53
--- /dev/null
+++ b/vues/v_unEchantillon.php
@@ -0,0 +1,210 @@
+<!-- Derniere modification le 25 mars 2022 par Pascal Blain -->
+
+<?php
+ 	if ($_REQUEST['action']=="supprimerEchantillon") 
+		{ 	echo '<h2>SUPPRESSION DE l\'ECHANTILLON</h2>';
+		 	echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerSupprimerEchantillon&lstVisites='.$lesInfosVisite['vNum'].'" method="post">';} 
+ 	if ($_REQUEST['action']=="modifierEchantillon") 
+		{ 	echo '<h2>MODIFICATION DE l\'ECHANTILLON</h2>'; 	
+			echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerModifierEchantillon&lstVisites='.$lesInfosVisite['vNum'].'" method="post">';}
+ 	if ($_REQUEST['action']=="ajouterEchantillon") 
+		{ 	echo '<h2>AJOUT D\'UN ECHANTILLON</h2>';
+			echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerAjouterEchantillon" method="post" onsubmit="return valider(this)">';}
+	echo ("	
+    <fieldset><legend>Visite du ".$lesInfosVisite['wDate']." chez ".$lesInfosVisite['pNom']." ".$lesInfosVisite['pPrenom']."</legend>
+		<table>");	
+ if ($_REQUEST['action']=="supprimerEchantillon")  //-------------------------------------------------------- cas suppression
+	{		echo ("
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Médicament</legend>
+					<table>
+						<tr><th style='width:120px;'>Famille</th>		<td>".$leMedicament['fLibelle']."</td></tr>
+						<tr><th style='width:120px;'>Médicament</th>	<td>".$leMedicament['mNomCommercial']."
+						<input type='hidden' name='lstMedicaments' value='".$leMedicament['mDepotLegal']."'></td></tr>
+						<tr><th style='width:120px;'>Quanté remise</th>	<td>".$leMedicament['qte']."</td></tr>
+					</table>
+				</fieldset>
+				</td>		
+			</tr>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Rapport de visite</legend>
+					<table>
+						<tr><th style='width:120px;'>Date de visite</th><td>".$lesInfosVisite['wDate']."</td></tr>
+						<tr><th>Motif</th>								<td>".$lesInfosVisite['vMotif']."</td>
+							<th>medicament 1</th>
+							<td>
+								BIVALIC
+							</td>
+						</tr>
+						<tr><th>Commentaires</th>						<td>".$lesInfosVisite['vRapport']."</td>
+							<th>medicament 2</th>
+							<td>
+								APATOUX Vitamine C
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+				</td>					
+			</tr>
+        </table>
+    </fieldset>");
+	//</td>");
+				
+	}
+ if ($_REQUEST['action']=="ajouterEchantillon")  //-------------------------------------------------------- cas ajout d'un échantillon
+	{
+	 		echo ("
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Médicament</legend>
+					<table>
+						<tr><th style='width:120px;'>Famille</th>	<td>
+						<select name='lstFamilles' style='width:350px;'  onchange='myFunction(this.name, this.value)'>");
+							$noF=1;   // 
+							if (!isset($_REQUEST['lstFamilles'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstFamilles'];}
+							$i=1; 
+							foreach ($lesFamilles as $uneLigne) 
+							{	
+								if($uneLigne['fCode'] == $choix or $choix == 'premier')
+									{echo "<option selected value=\"".$uneLigne['fCode']."\">".$uneLigne['fLibelle']." (".$uneLigne['nbM'].")</option>\n	";
+									$choix = $uneLigne['fCode'];
+									$noF=$i;
+									}
+								else
+									{echo "<option value=\"".$uneLigne['fCode']."\">".$uneLigne['fLibelle']." (".$uneLigne['nbM'].")</option>\n		";
+									$i=$i+1;}
+							}	           
+							echo ("
+						</select>
+						</td></tr>
+						<tr><th style='width:120px;'>Médicament</th>	<td>
+						<select name='lstMedicaments' style='width:350px;'>");
+							$noM=1;   // 
+							if (!isset($_REQUEST['lstMedicaments'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstMedicaments'];}
+							$i=1; 
+							foreach ($lesMedicaments as $uneLigne) 
+							{	
+								if($uneLigne['mDepotLegal'] == $choix or $choix == 'premier')
+									{echo "<option selected value=\"".$uneLigne['mDepotLegal']."\">".$uneLigne['mNomCommercial']."</option>\n	";
+									$choix = $uneLigne['mDepotLegal'];
+									$noM=$i;
+									}
+								else
+									{echo "<option value=\"".$uneLigne['mDepotLegal']."\">".$uneLigne['mNomCommercial']."</option>\n		";
+									$i=$i+1;}
+							}	           
+							echo ("
+						</select>
+						</td></tr>
+						<tr><th style='width:120px;'>Quanté remise</th>	<td><input class='controle' type='text' name='ztQuantite'>
+						</td></tr>
+					</table>
+				</fieldset>
+				</td>		
+			</tr>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Rapport de visite</legend>
+					<table>
+						<tr><th style='width:120px;'>Date de visite</th><td>".$lesInfosVisite['wDate']."</td></tr>
+						<tr><th>Motif</th>								<td>".$lesInfosVisite['vMotif']."</td>
+							<th>medicament 1</th>
+							<td>
+								BIVALIC
+							</td>
+						</tr>
+						<tr><th>Commentaires</th>						<td>".$lesInfosVisite['vRapport']."</td>
+							<th>medicament 2</th>
+							<td>
+								APATOUX Vitamine C
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+				</td>					
+			</tr> 	
+		</table>
+    </fieldset>");
+	} 		
+	
+ if ($_REQUEST['action']=="modifierEchantillon")	//-------------------------------------------------------- cas modification
+	{		
+	 		echo ("
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Médicament</legend>
+					<table>
+						<tr><th style='width:120px;'>Famille</th>		<td>".$leMedicament['fLibelle']."</td></tr>
+						<tr><th style='width:120px;'>Médicament</th>	<td>".$leMedicament['mNomCommercial']."
+						<input type='hidden' name='lstMedicaments' value='".$leMedicament['mDepotLegal']."'></td></tr>
+						<tr><th style='width:120px;'>Quanté remise</th>	<td><input class='controle' type='text' name='ztQuantite' value='".$leMedicament['qte']."'>
+						</td></tr>
+					</table>
+				</fieldset>
+				</td>		
+			</tr>
+			<tr>
+				<td style='border :0px;'>
+				<fieldset>	<legend>Rapport de visite</legend>
+					<table>
+						<tr><th style='width:120px;'>Date de visite</th><td>".$lesInfosVisite['wDate']."</td></tr>
+						<tr><th>Motif</th>								<td>".$lesInfosVisite['vMotif']."</td>
+							<th>medicament 1</th>
+							<td>
+								BIVALIC
+							</td>
+						</tr>
+						<tr><th>Commentaires</th>						<td>".$lesInfosVisite['vRapport']."</td>
+							<th>medicament 2</th>
+							<td>
+								APATOUX Vitamine C
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+				</td>					
+			</tr> 	
+		</table>
+    </fieldset>");
+	
+	} 
+?>         	
+			<td style='border: 0px solid white; witdh:130px; text-align:right;'>
+				<input type="hidden" 	name="zTypeAdm"		value="<?php if ($_SESSION['statut']==0) {echo ("true");} else {echo ("false");} ?>"> 
+				<input type="hidden" 	name="ztVisiteur"	value="<?php echo $lesInfosVisite['uId']; ?>">
+				<input type="hidden" 	name="lstVisites"	value="<?php echo $lesInfosVisite['vNum']; ?>">
+				<input type="hidden" 	name="zOk"			value="OK">
+				<input type="image" 	name="btValider" 	alt="Valider" 	src="images/valider.jpg" value="OK" >
+				<input type="image"		name="btAnnuler" 	alt="Annuler" 	src="images/annuler.jpg" value="nonOK" 	onclick="annuler('frmE');"> 
+			</td>
+			</tr>
+		</table>         
+    </form>
+<script type="text/javascript">
+  // Mon code Javascript
+function  myFunction(liste, choix)
+	{
+<?php	 
+	  echo substr ($script,0 ,strlen($script)-1).");\n";
+?>	  
+	  for (i=document.forms["frmE"].elements["lstMedicaments"].length; i>=0; i--)
+	  {document.forms["frmE"].elements["lstMedicaments"].options[i]=null;}
+	  //document.forms["frmE"].elements["lstMedicaments"].options.length=0;
+	  var option=0;
+	  for (var i = 0; i < lesMedicaments.length; i++) 
+		{
+		if (lesMedicaments[i][2]==choix) 
+			{		
+				document.forms["frmE"].elements["lstMedicaments"].options[option]=new Option(lesMedicaments[i][1],lesMedicaments[i][0]);
+				option++;
+			}
+		}
+	}
+function raz(liste)
+	{l=document.formu.elements[liste].length;
+	for (i=l; i>=0; i--)
+	   document.formu.elements[liste].options[i]=null;
+	}
+</script>
\ No newline at end of file
diff --git a/vues/v_unPraticien.php b/vues/v_unPraticien.php
new file mode 100644
index 0000000..1720e6f
--- /dev/null
+++ b/vues/v_unPraticien.php
@@ -0,0 +1,119 @@
+<!-- Derniere modification le 15 avril 2020 par Guy Mehl -->
+
+<?php
+ 	if ($_REQUEST['action']=="supprimer") 
+		{ 	echo '<h2>SUPPRESSION DU PRATICIEN '.$lesInfosPraticien['pNom'].' '.$lesInfosPraticien['pPrenom'].'</h2>';
+		 	echo '<form name="frmA" 	action="index.php?choixTraitement=praticien&action=validerSupprimer&praticien='.$lesInfosPraticien['pNum'].'" method="post">';} 
+ 	if ($_REQUEST['action']=="modifier") 
+		{ 	echo '<h2>MODIFICATION DU PRATICIEN '.$lesInfosPraticien['pNom'].' '.$lesInfosPraticien['pPrenom'].'</h2>'; 	
+			echo '<form name="frmA" 	action="index.php?choixTraitement=praticien&action=validerModifier&praticien='.$lesInfosPraticien['pNum'].'" method="post">';}
+ 	if ($_REQUEST['action']=="ajouter") 
+		{ 	echo "<h2>AJOUT D'UN NOUVEAU PRATICIEN </h2>";
+			echo '
+			<form name="frmA" 	action="index.php?choixTraitement=praticien&action=validerAjouter" method="post" onsubmit="return valider(this)">';}
+	echo ("	
+    <fieldset><legend>Coordonn&eacute;es</legend>
+		<table>");	
+ if ($_REQUEST['action']=="supprimer")  //-------------------------------------------------------- cas suppression
+	{		echo ("
+			<tr><th style='width:120px;'>Nom</th>	<td>".$lesInfosPraticien['pNom']."</td> </tr>
+			<tr><th>Pr&eacute;nom</th>				<td>".$lesInfosPraticien['pPrenom']."</td> </tr>
+			<tr><th>Rue</th>						<td>".$lesInfosPraticien['pRue']."</td> </tr>
+			<tr><th>Code postal</th>				<td>".$lesInfosPraticien['pCP']."</td> </tr>
+			<tr><th>Ville</th>						<td>".$lesInfosPraticien['pVille']."</td></tr>
+			<tr><th>Coefficient Notoriete</th>		<td>".$lesInfosPraticien['pCoefNotoriete']."</td></tr>			
+			<tr><th>Type praticien</th>				<td>".$lesInfosPraticien['wTypeLibelle']."</td> </tr>
+			<tr><th>Région</th>						<td>".$lesInfosPraticien['wRegion']."</td></tr>
+        </table>
+    </fieldset>");
+	//</td>");
+				
+	}
+ if ($_REQUEST['action']=="ajouter")  //-------------------------------------------------------- cas ajout
+	{
+	 		echo ('
+			<tr><th style="width:120px;">Nom</th><td>
+				<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required><input type="hidden" name="praticien" value="'.$choix.'"></td>
+			</tr>
+			<tr><th>Pr&eacute;nom</th>	<td>
+				<input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)"></td> </tr>');
+			echo ('	
+	  		<tr><th>Rue</th>			<td><input class="controleLong" type="text" name="ztAdresse"></td> </tr>
+			<tr><th>Code postal</th>	<td><input  class="controle" type="text"  pattern="[0-9]{5}" id="Code postal"  name="ztCP">'); 
+			echo ("
+			<a href=\"javascript:openCodesPostaux('ztCP','ztVille');\" title='Trouvez un code postal en France'>
+			<img src='images/cp.gif' width='16' height='13' alt='codes postaux' title='S&eacute;l&eacute;ctionnez votre code postal gr&acirc;ce &agrave; www.codes-postaux.org'></a></td> </tr>
+			<tr><th>Ville</th>					<td><input class='controleLong' type='text' name='ztVille'></td></tr>
+			<tr><th>Coefficient Notoriété</th>	<td><input class='controleLong' type='text' name='ztCoefNotoriete'></td></tr>
+			<tr> <th>Type praticien</th>		<td><select name = 'ldrTypePraticien' style='width:200px;'>"); 
+			foreach ($lesTypesPraticien as $unTypePraticien)
+			{	if($unTypePraticien['tCode']===$lesInfosPraticien['tCode']){$selected = "selected";} else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unTypePraticien['tCode'].'">'.$unTypePraticien['tLibelle'].'</option>';
+			}  
+			echo ("
+			</select></td> </tr> ");
+			echo ("<tr> <th>R&eacute;gion</th>	<td>  <select name = 'ldrRegion' style='width:200px;'>"); 
+			foreach ($lesRegions as $uneRegion)
+			{	if($uneRegion['pIndice']===$lesInfosPraticien['region']){$selected = "selected";}
+				else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$uneRegion['pIndice'].'*'.$uneRegion['pCategorie'].'">'.$uneRegion['pLibelle'].'</option>';
+			}
+			echo ("
+			</select></td> </tr> 	
+		</table>
+    </fieldset>");
+	} 
+			
+	
+ if ($_REQUEST['action']=="modifier")	//------------------------------------------------------------------------------------ cas modification
+	{		
+	 		echo ('
+			<tr>	<th style="width:120px;">Nom</th>			<td>
+					<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required value="'.$lesInfosPraticien['pNom'].'"></td> </tr>
+			<tr>	<th>Pr&eacute;nom</th>									<td>
+					<input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)" value="'.$lesInfosPraticien['pPrenom'].'"></td> </tr>');
+			echo ('	
+	  		<tr><th>Adresse</th>			<td><input class="controleLong" type="text" name="ztAdresse" value="'.$lesInfosPraticien['pRue'].'"></td> </tr>
+			<tr><th>Code postal</th>		<td><input  class="controle" type="text"  pattern="[0-9]{5}" id="Code postal"  name="ztCP" value="'.$lesInfosPraticien['pCP'].'" >'); 
+			echo ("
+			<a href=\"javascript:openCodesPostaux('ztCP','ztVille');\" title='Trouvez un code postal en France'>
+			<img src='images/cp.gif' width='16' height='13' alt='codes postaux' title='S&eacute;l&eacute;ctionnez votre code postal gr&acirc;ce &agrave; www.codes-postaux.org'></a></td> </tr>
+			<tr><th>Ville</th>				<td><input class='controleLong' type='text' name='ztVille' value='".$lesInfosPraticien['pVille']."'></td></tr>");
+			echo ('	
+	  		<tr><th>Coefficient Notoriété</th>	<td><input class="controleLong" type="text" name="ztCoefNotoriete" value="'.$lesInfosPraticien['pCoefNotoriete'].'"></td> </tr>');
+			echo ("
+			<tr> <th>Type praticien</th>	<td><select name = 'ldrTypePraticien' style='width:200px;'>"); 
+			foreach ($lesTypesPraticien as $unTypePraticien)
+			{	if($unTypePraticien['tCode']===$lesInfosPraticien['tCode']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unTypePraticien['tCode'].'">'.$unTypePraticien['tLibelle'].'</option>';
+			}  
+			echo ("
+			</select></td> </tr>	");
+			echo ("
+			<tr> <th>R&eacute;gion</th>		<td><select name = 'ldrRegion' style='width:200px;'>"); 
+			foreach ($lesRegions as $uneRegion)
+			{	if($uneRegion['pIndice']===$lesInfosPraticien['region']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$uneRegion['pIndice'].'*'.$uneRegion['pCategorie'].'">'.$uneRegion['pLibelle'].'</option>';
+			}  
+			echo ("
+			</select></td> </tr>	");
+			echo ("
+		</table>
+    </fieldset> ");
+	
+	} 
+?>         
+		
+			<td style='border: 0px solid white; witdh:130px; text-align:right;'>
+				<input type="hidden" 	name="zTypeAdm"		value="<?php if ($_SESSION['statut']==0) {echo ("true");} else {echo ("false");} ?>"> 
+				<input type="hidden" 	name="zOk"			value="OK"> 
+				<input type="image" 	name="btValider" 	alt="Valider" 	src="images/valider.jpg" value="OK" >
+				<input type="image"		name="btAnnuler" 	alt="Annuler" 	src="images/annuler.jpg" value="nonOK" 	onclick="annuler('frmA');"> 
+			</td>
+			</tr>
+		</table>         
+    </form>
diff --git a/vues/v_unUtilisateur.php b/vues/v_unUtilisateur.php
new file mode 100644
index 0000000..77408af
--- /dev/null
+++ b/vues/v_unUtilisateur.php
@@ -0,0 +1,153 @@
+<!-- Derniere modification le 11 avril 2020 par Pascal Blain -->
+
+<?php
+ 	if ($_REQUEST['action']=="supprimer") 
+		{ 	echo '<h2>SUPPRESSION DE L\'UTILISATEUR '.$lesInfosUtilisateur['uNom'].' '.$lesInfosUtilisateur['uPrenom'].'</h2>';
+		 	echo '<form name="frmA" 	action="index.php?choixTraitement=utilisateur&action=validerSupprimer&utilisateur='.$lesInfosUtilisateur['uId'].'" method="post">';} 
+ 	if ($_REQUEST['action']=="modifier") 
+		{ 	echo '<h2>MODIFICATION DE L\'UTILISATEUR '.$lesInfosUtilisateur['uNom'].' '.$lesInfosUtilisateur['uPrenom'].'</h2>'; 	
+			echo '<form name="frmA" 	action="index.php?choixTraitement=utilisateur&action=validerModifier&utilisateur='.$lesInfosUtilisateur['uId'].'" method="post">';}
+ 	if ($_REQUEST['action']=="ajouter") 
+		{ 	echo "<h2>AJOUT D'UN NOUVEL UTILISATEUR</h2>";
+			echo '
+			<form name="frmA" 	action="index.php?choixTraitement=utilisateur&action=validerAjouter" method="post" onsubmit="return valider(this)">';}
+	echo ("	
+    <fieldset><legend>Coordonn&eacute;es</legend>
+		<table>");	
+ if ($_REQUEST['action']=="supprimer")  //-------------------------------------------------------- cas suppression
+	{		echo ("
+			<tr><th style='width:120px;'>Nom</th>	<td>".$lesInfosUtilisateur['uNom']."</td> </tr>
+			<tr><th>Pr&eacute;nom</th>				<td>".$lesInfosUtilisateur['uPrenom']."</td> </tr>
+			<tr><th>Adresse</th>					<td>".$lesInfosUtilisateur['uAdresse']."</td> </tr>
+			<tr><th>Code postal</th>				<td>".$lesInfosUtilisateur['uCP']."</td> </tr>
+			<tr><th>Ville</th>						<td>".$lesInfosUtilisateur['uVille']."</td></tr>					
+			<tr><th>Statut</th>						<td>".$lesInfosUtilisateur['wStatut']."</td> </tr>
+			<tr><th>Nom de compte</th>				<td>".$lesInfosUtilisateur['uLogin']."</td></tr>
+        </table>
+    </fieldset>
+	<table style='border: 0px solid white; '>
+			<tr>
+			<td style='border: 0px solid white;'>
+				<fieldset><legend>Laboratoire</legend>
+				<textarea name='ztObs' cols='70' rows='1'>".$lesInfosUtilisateur['lNom']."</textarea>
+				</fieldset>
+			</td>");	
+	}
+ if ($_REQUEST['action']=="ajouter")  //-------------------------------------------------------- cas ajout
+	{
+	 		echo ('
+			<tr><th style="width:120px;">Nom</th><td>
+				<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required></td>
+			</tr>
+			<tr><th>Pr&eacute;nom</th>									<td>
+				<input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)"></td> </tr>');
+			echo ('	
+	  		<tr><th>Adresse</th>			<td><input class="controleLong" type="text" name="ztAdresse"></td> </tr>
+			<tr><th>Code postal</th>		<td><input  class="controle" type="text"  pattern="[0-9]{5}" id="Code postal"  name="ztCP">'); 
+			echo ("
+			<a href=\"javascript:openCodesPostaux('ztCP','ztVille');\" title='Trouvez un code postal en France'>
+			<img src='images/cp.gif' width='16' height='13' alt='codes postaux' title='S&eacute;l&eacute;ctionnez votre code postal gr&acirc;ce &agrave; www.codes-postaux.org'></a></td> </tr>
+			<tr><th>Ville</th>				<td><input class='controleLong' type='text' name='ztVille'></td></tr>
+			<tr> <th>Statut</th>			<td><select name = 'ldrStatut' style='width:200px;'>"); 
+			foreach ($lesStatuts as $unStatut)
+			{	if($unStatut['pIndice']===$lesInfosUtilisateur['uStatut']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unStatut['pIndice'].'">'.$unStatut['pLibelle'].'</option>';
+			}
+			echo ("
+			</select></td> </tr> 
+			<tr><th>Nom de compte</th>					<td>
+				<input class='controleLong' type='text' name='ztLogin' id='Nom de compte' onblur='verifTexte(this.form, this, 15)'></td></tr>");
+			echo ("
+			<tr><th>Mot de passe </th>					<td><input type='hidden' name='brMdp' value='0'>
+				<input class='controleLong' type='text' name='ztMdp' id='Mot de passe'></td></tr>
+			<tr> <th>R&eacute;gion</th>			<td>
+			<select name = 'ldrRegion' style='width:200px;'>"); 
+			foreach ($lesRegions as $uneRegion)
+			{	if($uneRegion['pIndice']===$lesInfosUtilisateur['uRegion']){$selected = "selected";}
+				else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$uneRegion['pIndice'].'*'.$uneRegion['pCategorie'].'">'.$uneRegion['pLibelle'].'</option>';
+			}
+			echo ("
+			</select></td> </tr>	
+		</table>
+    </fieldset>
+	<table style='border: 0px solid white; '>
+			<tr>
+			<td style='border: 0px solid white;'>
+				<fieldset><legend>Laboratoire</legend>
+				<select name = 'ldrLabo' style='width:200px;'>"); 
+			foreach ($lesLabos as $unLabo)
+			{	if($unLabo['lCode']===$lesInfosUtilisateur['uLabo']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unLabo['lCode'].'">'.$unLabo['lNom'].'</option>';
+			}
+				echo ("
+				</select></td> </tr>	
+	</table>");
+			
+	}
+ if ($_REQUEST['action']=="modifier")	//------------------------------------------------------------------------------------ cas modification
+	{		
+	 		echo ('
+			<tr>	<th style="width:120px;">Nom</th>			<td>
+					<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required value="'.$lesInfosUtilisateur['uNom'].'"></td> </tr>
+			<tr>	<th>Pr&eacute;nom</th>									<td>
+					<input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)" value="'.$lesInfosUtilisateur['uPrenom'].'"></td> </tr>');
+			echo ('	
+	  		<tr><th>Adresse</th>			<td><input class="controleLong" type="text" name="ztAdresse" value="'.$lesInfosUtilisateur['uAdresse'].'"></td> </tr>
+			<tr><th>Code postal</th>		<td><input  class="controle" type="text"  pattern="[0-9]{5}" id="Code postal"  name="ztCP" value="'.$lesInfosUtilisateur['uCP'].'" >'); 
+			echo ("
+			<a href=\"javascript:openCodesPostaux('ztCP','ztVille');\" title='Trouvez un code postal en France'>
+			<img src='images/cp.gif' width='16' height='13' alt='codes postaux' title='S&eacute;l&eacute;ctionnez votre code postal gr&acirc;ce &agrave; www.codes-postaux.org'></a></td> </tr>
+			<tr><th>Ville</th>				<td><input class='controleLong' type='text' name='ztVille' value='".$lesInfosUtilisateur['uVille']."'></td></tr>");
+			
+			echo ("
+			<tr> <th>Statut</th>			<td><select name = 'ldrStatut' style='width:200px;'>"); 
+			foreach ($lesStatuts as $unStatut)
+			{	if($unStatut['pIndice']===$lesInfosUtilisateur['uStatut']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unStatut['pIndice'].'">'.$unStatut['pLibelle'].'</option>';
+			}
+			echo ("
+			</select></td> </tr> 
+			<tr><th>Nom de compte</th>					<td>
+				<input class='controleLong' type='text' name='ztLogin' id='Nom de compte' onblur='verifTexte(this.form, this, 15)'  value='".$lesInfosUtilisateur['uLogin']."'></td></tr>
+			<tr><th>Nouveau mot de passe ?</th>			<td><input type='radio' name='brMdp' value='0' checked>Non <input type='radio' name='brMdp' value='1'>Oui
+				<input class='controleLong' type='text' name='ztMdp' id='Mot de passe'></td></tr>
+			<tr> <th>R&eacute;gion</th>			<td><select name = 'ldrRegion' style='width:200px;'>"); 
+			foreach ($lesRegions as $uneRegion)
+			{	if($uneRegion['pIndice']===$lesInfosUtilisateur['uRegion']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$uneRegion['pIndice'].'*'.$uneRegion['pCategorie'].'">'.$uneRegion['pLibelle'].'</option>';
+			}
+			echo ("
+			</select></td> </tr>	
+		</table>
+    </fieldset>
+	<table style='border: 0px solid white; '>
+			<tr>
+			<td style='border: 0px solid white;'>
+				<fieldset><legend>Laboratoire</legend>
+				<select name = 'ldrLabo' style='width:200px;'>"); 
+			foreach ($lesLabos as $unLabo)
+			{	if($unLabo['lCode']===$lesInfosUtilisateur['uLabo']){$selected = "selected";}	else {$selected = null;}
+				echo '
+					<option '.$selected.' value="'.$unLabo['lCode'].'">'.$unLabo['lNom'].'</option>';
+			}
+				echo ("
+				</select></td> </tr>	
+	</table>");
+	} 
+?>         
+		
+			<td style='border: 0px solid white; witdh:130px; text-align:right;'>
+				<input type="hidden" 	name="zTypeAdm"		value="<?php if ($_SESSION['statut']==0) {echo ("true");} else {echo ("false");} ?>"> 
+				<input type="hidden" 	name="zOk"			value="OK"> 
+				<input type="image" 	name="btValider" 	alt="Valider" 	src="images/valider.jpg" value="OK" >
+				<input type="image"		name="btAnnuler" 	alt="Annuler" 	src="images/annuler.jpg" value="nonOK" 	onclick="annuler('frmA');"> 
+			</td>
+			</tr>
+		</table>         
+    </form>