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 @@ +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 @@ 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 \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 @@ +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 @@ 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é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 él`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é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é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é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é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é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é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é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é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 @@ +Visite +
+
Coordonnées du praticien + + + +
Nom / Prenom "); + if ($action==="modifier") {echo "";$actif=null;} +echo ("
Rue "); + if ($action==="modifier") {echo "";$actif=null;} +echo ("
Code postal / Ville "); + if ($action==="modifier") {echo "";$actif=null;} +echo (" +
+
+
+
Rapport de visite + + + +
Date de visiteNom "); + if ($action==="modifier") {echo "";$actif=null;} +echo ("
Motif "); + if ($action==="modifier") {echo "";$actif=null;} +echo ("
Commentaires "); + if ($action==="modifier") {echo "";$actif=null;} +echo (" +
+
+ +"); \ 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 @@ + + +

'.$titre; ?> + +

' +?> + + + "> + + + + + + 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 @@ + + +

'.$titre; ?> + +

' +?> + + + "> + + + + + + 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 @@ + + + +
    +
  • '.$titre.'
  • +
  • Visites
  • +
'); +/* */ +/*================================================================================================== COORDONNEES (1) */ + + echo (" +
+ + + + + +
+
Coordonnées du praticien "); +echo (" + + + + + + + + + + "); +echo ("
Nom ".$lesInfosPraticien['pNom']."
Prénom ".$lesInfosPraticien['pPrenom']."
Rue ".$lesInfosPraticien['pRue']."
Code postal ".$lesInfosPraticien['pCP']."
Ville ".$lesInfosPraticien['pVille']."
Coefficient notoriete ".$lesInfosPraticien['pCoefNotoriete']."
Type praticien ".$lesInfosPraticien['wTypeLibelle']."
Région ".$lesInfosPraticien['wRegion']."
+
+
+
"); + + +/*================================================================================================== SUIVI DES VISITES(2)*/ + echo (" + "); + +/*================================================================================================== XXXXX */ +echo (" + + +
"); +?> \ 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 @@ - -
Coordonnées de l'utilisateur - "); - - echo(" - - - - - - - - - - - - - - - - - - -
Nom".$lesInfosProfil['uNom']."
Prenom".$lesInfosProfil['uPrenom']."
Adresse".$lesInfosProfil['uAdresse']."
Code Postal".$lesInfosProfil['uCP']."
Ville".$lesInfosProfil['uVille']."
Statut".$lesInfosProfil['wStatut']."
Nom de compte".$lesInfosProfil['uLogin']."
Region".$lesInfosProfil['wRegion']."
Secteur".$lesInfosProfil['wSecteur']."
- -
- -
Laboratoire - - - - - -
".$lesInfosProfil['lNom']."
-
-
- "); \ 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 @@ + + + + '); +/*================================================================================================== COORDONNEES (1) */ + + echo (" +
+ + + + + +
+
Coordonné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 (' '); + } +echo (" + + + + + + + + + + "); +echo ("
Nom ".$lesInfosUtilisateur['uNom']."
Prénom ".$lesInfosUtilisateur['uPrenom']."
Adresse ".$lesInfosUtilisateur['uAdresse']."
Code postal ".$lesInfosUtilisateur['uCP']."
Ville ".$lesInfosUtilisateur['uVille']."
Statut ".$lesInfosUtilisateur['wStatut']."
Nom de compte ".$lesInfosUtilisateur['uLogin']."
Région ".$lesInfosUtilisateur['wRegion']."
Secteur ".$lesInfosUtilisateur['wSecteur']."
+
+
+ +
Laboratoire + + + + +
".$lesInfosUtilisateur['lNom']."
+
+
"); + +/*================================================================================================== SUIVI DES VISITES(2)*/ + echo (" + "); + +/*================================================================================================== XXXXX */ +echo (" + + + "); +?> \ 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 @@ + +
Coordonnées du praticien + + + "); + + echo(" + + + + + + + + + + +
Nom".$lesInfosCompteRendu['pNom']."
Prenom".$lesInfosCompteRendu['pPrenom']."
Rue".$lesInfosCompteRendu['pRue']."
Code Postal".$lesInfosCompteRendu['pCP']."
Ville".$lesInfosCompteRendu['pVille']."
+ +
+ +
Rapport de visite + + + + + + + + + + + + + +
Ville".$lesInfosProfil['uVille']."
Ville".$lesInfosProfil['uVille']."
Ville".$lesInfosProfil['uVille']."
Ville".$lesInfosProfil['uVille']."
Ville".$lesInfosProfil['uVille']."
+
+ + "); 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 @@ + + +SUPPRESSION DE l\'ECHANTILLON'; + echo '
';} + if ($_REQUEST['action']=="modifierEchantillon") + { echo '

MODIFICATION DE l\'ECHANTILLON

'; + echo '';} + if ($_REQUEST['action']=="ajouterEchantillon") + { echo '

AJOUT D\'UN ECHANTILLON

'; + echo '';} + echo (" +
Visite du ".$lesInfosVisite['wDate']." chez ".$lesInfosVisite['pNom']." ".$lesInfosVisite['pPrenom']." + "); + if ($_REQUEST['action']=="supprimerEchantillon") //-------------------------------------------------------- cas suppression + { echo (" + + + + + + +
+
Médicament + + + + +
Famille ".$leMedicament['fLibelle']."
Médicament ".$leMedicament['mNomCommercial']." +
Quanté remise ".$leMedicament['qte']."
+
+
+
Rapport de visite + + + + + + + + + + +
Date de visite".$lesInfosVisite['wDate']."
Motif ".$lesInfosVisite['vMotif']."medicament 1 + BIVALIC +
Commentaires ".$lesInfosVisite['vRapport']."medicament 2 + APATOUX Vitamine C +
+
+
+
"); + //"); + + } + if ($_REQUEST['action']=="ajouterEchantillon") //-------------------------------------------------------- cas ajout d'un échantillon + { + echo (" + + +
Médicament + + + + +
Famille + +
Médicament + +
Quanté remise +
+
+ + + + +
Rapport de visite + + + + + + + + + + +
Date de visite".$lesInfosVisite['wDate']."
Motif ".$lesInfosVisite['vMotif']."medicament 1 + BIVALIC +
Commentaires ".$lesInfosVisite['vRapport']."medicament 2 + APATOUX Vitamine C +
+
+ + + + "); + } + + if ($_REQUEST['action']=="modifierEchantillon") //-------------------------------------------------------- cas modification + { + echo (" + + +
Médicament + + + + +
Famille ".$leMedicament['fLibelle']."
Médicament ".$leMedicament['mNomCommercial']." +
Quanté remise +
+
+ + + + +
Rapport de visite + + + + + + + + + + +
Date de visite".$lesInfosVisite['wDate']."
Motif ".$lesInfosVisite['vMotif']."medicament 1 + BIVALIC +
Commentaires ".$lesInfosVisite['vRapport']."medicament 2 + APATOUX Vitamine C +
+
+ + + + "); + + } +?> + + "> + + + + + + + + +
+ \ 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 @@ + + +SUPPRESSION DU PRATICIEN '.$lesInfosPraticien['pNom'].' '.$lesInfosPraticien['pPrenom'].''; + echo '
';} + if ($_REQUEST['action']=="modifier") + { echo '

MODIFICATION DU PRATICIEN '.$lesInfosPraticien['pNom'].' '.$lesInfosPraticien['pPrenom'].'

'; + echo '';} + if ($_REQUEST['action']=="ajouter") + { echo "

AJOUT D'UN NOUVEAU PRATICIEN

"; + echo ' + ';} + echo (" +
Coordonnées + "); + if ($_REQUEST['action']=="supprimer") //-------------------------------------------------------- cas suppression + { echo (" + + + + + + + + +
Nom ".$lesInfosPraticien['pNom']."
Prénom ".$lesInfosPraticien['pPrenom']."
Rue ".$lesInfosPraticien['pRue']."
Code postal ".$lesInfosPraticien['pCP']."
Ville ".$lesInfosPraticien['pVille']."
Coefficient Notoriete ".$lesInfosPraticien['pCoefNotoriete']."
Type praticien ".$lesInfosPraticien['wTypeLibelle']."
Région ".$lesInfosPraticien['wRegion']."
+
"); + //"); + + } + if ($_REQUEST['action']=="ajouter") //-------------------------------------------------------- cas ajout + { + echo (' + Nom + + + Prénom + '); + echo (' + Rue + Code postal '); + echo (" + + codes postaux + Ville + Coefficient Notoriété + Type praticien "); + echo (" Région + + "); + } + + + if ($_REQUEST['action']=="modifier") //------------------------------------------------------------------------------------ cas modification + { + echo (' + Nom + + Prénom + '); + echo (' + Adresse + Code postal '); + echo (" + + codes postaux + Ville "); + echo (' + Coefficient Notoriété '); + echo (" + Type praticien "); + echo (" + Région "); + echo (" + + "); + + } +?> + + + "> + + + + + + +
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 @@ + + +SUPPRESSION DE L\'UTILISATEUR '.$lesInfosUtilisateur['uNom'].' '.$lesInfosUtilisateur['uPrenom'].''; + echo '
';} + if ($_REQUEST['action']=="modifier") + { echo '

MODIFICATION DE L\'UTILISATEUR '.$lesInfosUtilisateur['uNom'].' '.$lesInfosUtilisateur['uPrenom'].'

'; + echo '';} + if ($_REQUEST['action']=="ajouter") + { echo "

AJOUT D'UN NOUVEL UTILISATEUR

"; + echo ' + ';} + echo (" +
Coordonnées + "); + if ($_REQUEST['action']=="supprimer") //-------------------------------------------------------- cas suppression + { echo (" + + + + + + + +
Nom ".$lesInfosUtilisateur['uNom']."
Prénom ".$lesInfosUtilisateur['uPrenom']."
Adresse ".$lesInfosUtilisateur['uAdresse']."
Code postal ".$lesInfosUtilisateur['uCP']."
Ville ".$lesInfosUtilisateur['uVille']."
Statut ".$lesInfosUtilisateur['wStatut']."
Nom de compte ".$lesInfosUtilisateur['uLogin']."
+
+ + + "); + } + if ($_REQUEST['action']=="ajouter") //-------------------------------------------------------- cas ajout + { + echo (' + + + '); + echo (' + + + + + "); + echo (" + + +
+
Laboratoire + +
+
Nom +
Prénom +
Adresse
Code postal '); + echo (" + + codes postaux
Ville
Statut
Nom de compte +
Mot de passe +
Région +
+ + + + +
+
Laboratoire +
"); + + } + if ($_REQUEST['action']=="modifier") //------------------------------------------------------------------------------------ cas modification + { + echo (' + Nom + + Prénom + '); + echo (' + Adresse + Code postal '); + echo (" + + codes postaux + Ville "); + + echo (" + Statut + Nom de compte + + Nouveau mot de passe ? Non Oui + + Région + + + + + +
+
Laboratoire +
"); + } +?> + + + "> + + + + + + +