visite
This commit is contained in:
parent
fe44383872
commit
5d5330b5ab
83
controleurs/c_praticien.php
Executable file
83
controleurs/c_praticien.php
Executable file
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,47 +1,103 @@
|
||||
<?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");
|
||||
|
||||
$lesInfosUtilisateur = $pdo->getInfosUtilisateur("*",$_SESSION['idUtilisateur']);
|
||||
//modification mamadou
|
||||
$lesInfosUtilisateurVisite = $pdo->getInfosUtilisateurVisite($_SESSION['nom'],$_SESSION['prenom']);
|
||||
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;
|
||||
}
|
||||
|
||||
//----------------------------------------- AJOUT/MODIFICATION/SUPPRESSION
|
||||
|
||||
//----------------------------------------- FORMULAIRE DE SAISIE
|
||||
case 'ajouter':
|
||||
case 'modifier':
|
||||
|
||||
case 'supprimer':
|
||||
{
|
||||
$formulaire ="frmA";
|
||||
$champ ="ztNom";
|
||||
include("vues/v_entete.php");
|
||||
$lesInfosUtilisateur = $pdo->getInfosUtilisateur("*",$_SESSION['idUtilisateur']);
|
||||
|
||||
$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 'validerAjouter':
|
||||
case 'validerModifier':
|
||||
{ //majUtilisateur <---faire la fonction dans la classe pdo
|
||||
if ($_REQUEST['zOk']=="OK") {$pdo->majUtilisateur($type, $valeur, addslashes ($_REQUEST['zLibelle']), $_REQUEST['zTerritoire'], $_REQUEST['zDep'], $plancher, $plafond);}
|
||||
header ('location: index.php?choixTraitement=utilisateur&action=voir');
|
||||
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;
|
||||
|
195
controleurs/c_visite.php
Executable file
195
controleurs/c_visite.php
Executable file
@ -0,0 +1,195 @@
|
||||
<?php
|
||||
// ****************************************'
|
||||
// Le CASTEL-BTS SIO/ PROJET GSB PPE2 '
|
||||
// Programme: c_visite.php '
|
||||
// Objet : gestion rapports de visites '
|
||||
// Client : Bts SIO1 '
|
||||
// Version : 22.03 '
|
||||
// Date : 25/03/2022 <20> 10h57 '
|
||||
// Auteur : Pascal.Blain@ac-dijon.fr '
|
||||
//*****************************************'
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
switch($action) {
|
||||
case 'voir':
|
||||
{
|
||||
$formulaire ="choixV";
|
||||
$champ ="lstV";
|
||||
include("vues/v_entete.php");
|
||||
$lesLignes =$pdo->getLesVisites($_SESSION['idUtilisateur']);
|
||||
include("vues/v_choixVisite.php");
|
||||
//$lesInfosPraticien = $pdo->getInfosPraticien($choix);
|
||||
$UneVisitePraticien = $pdo->getUneVisitePraticien($choix,$choix2);
|
||||
$LesNomsMedsUneVisite = $pdo->getNomMedUneVisite($choix,$choix2);
|
||||
|
||||
$lesEchantillons = $pdo->getEchantillons($choix,$choix2);
|
||||
include("vues/v_ficheVisite.php");
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- FORMULAIRE DE SAISIE
|
||||
case 'ajouter':
|
||||
case 'modifier':
|
||||
case 'supprimer':
|
||||
{
|
||||
$formulaire ="frmA";
|
||||
$champ ="ztNom";
|
||||
include("vues/v_entete.php");
|
||||
$lesLignes =$pdo->getLesVisites($_SESSION['idUtilisateur']);
|
||||
//echo substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
$lesMotifs = $pdo->getParametre('MotifVi');
|
||||
$LesMedicaments = $pdo->getLesMedicaments();
|
||||
$UneVisitePraticien = $pdo->getUneVisitePraticien(substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-')),substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1));
|
||||
$choix = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
$choix2 =substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
$LesNomsMedsUneVisite = $pdo->getNomMedUneVisite($choix,$choix2);
|
||||
$choix= $_REQUEST['lstV'];
|
||||
//(isset($_REQUEST['Med']))?$Medicament=$_REQUEST['Med']:$Medicament="null";
|
||||
//(isset($_REQUEST['Med2']))?$Medicament2=$_REQUEST['Med']:$Medicament2="null";
|
||||
if(isset($LesNomsMedsUneVisite['0']['Medicament'])&&isset($LesNomsMedsUneVisite['1']['Medicament'])){
|
||||
$Medicament=$LesNomsMedsUneVisite['0']['Medicament'];
|
||||
$Medicament2=$LesNomsMedsUneVisite['1']['Medicament'];
|
||||
}
|
||||
else{
|
||||
$Medicament="null";
|
||||
$Medicament2="null";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$lesInfosPraticien = $pdo->getInfosPraticien($choix);
|
||||
|
||||
//ajout
|
||||
$region=$_SESSION['region'];
|
||||
$lesLignes =$pdo->getLesPraticiens($region);
|
||||
|
||||
include("vues/v_uneVisite.php");
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- FORMULAIRE DE SAISIE enchantillon
|
||||
case 'ajouterE':
|
||||
case 'modifierE':
|
||||
case 'supprimerE':
|
||||
{
|
||||
include("vues/v_entete.php");
|
||||
$choix = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
$choix2 = substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
$UneVisitePraticien = $pdo->getUneVisitePraticien(substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-')),substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1));
|
||||
$LesNomsMedsUneVisite = $pdo->getNomMedUneVisite($choix,$choix2);
|
||||
$lesEchantillons = $pdo->getEchantillons(substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-')),substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1));
|
||||
$UneVisitePraticien = $pdo->getUneVisitePraticien($choix,$choix2);
|
||||
$LesNomsMedsUneVisite = $pdo->getNomMedUneVisite($choix,$choix2);
|
||||
$depotlegal = $_REQUEST['depot'];
|
||||
|
||||
$UnEchantillon = $pdo->getUnEchantillon($choix,$choix2,$depotlegal);
|
||||
$LesMedicaments = $pdo->getLesMedicaments();
|
||||
|
||||
include("vues/v_unEchantillon.php");
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- VALIDATION
|
||||
//enlever information inutile
|
||||
case 'validerAjouter':
|
||||
case 'validerModifier':
|
||||
case 'validerSupprimer':
|
||||
{
|
||||
(isset($_REQUEST['visite']))?$valeur=$_REQUEST['visite']:$valeur='erreur';
|
||||
|
||||
if ($_REQUEST['zOk']=="OK")
|
||||
{
|
||||
if ($action==="validerSupprimer")
|
||||
{
|
||||
|
||||
$id = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
|
||||
$idV = substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
$pdo->supprimeVisite($id,$idV);
|
||||
header ('location: index.php?choixTraitement=visite&action=voir');
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
|
||||
$idV = substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
$idP = addslashes ($_REQUEST['lstPraticiens']);
|
||||
$date = addslashes ($_REQUEST['ztDate']);
|
||||
$rapport = addslashes ($_REQUEST['ztRapport']);
|
||||
$motif = addslashes ($_REQUEST['lstMotif']);
|
||||
$med = addslashes ($_REQUEST['listMed']);
|
||||
$med2 = addslashes ($_REQUEST['listMedBis']);
|
||||
|
||||
|
||||
/*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")
|
||||
{ $NewIdV=$pdo->nouveauCodeVisite($id);
|
||||
|
||||
$pdo->ajoutVisite($id,$NewIdV,$idP,$date,$rapport,$motif,$med,$med2);}
|
||||
else
|
||||
{$pdo->majVisite($id ,$idV,$date,$rapport,$motif,$med,$med2);}
|
||||
}
|
||||
}
|
||||
header ('location: index.php?choixTraitement=visite&action=voir');
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- VALIDATION Echantillon
|
||||
case 'validerAjouterE':
|
||||
case 'validerModifierE':
|
||||
case 'validerSupprimerE':
|
||||
{
|
||||
(isset($_REQUEST['visite']))?$valeur=$_REQUEST['visite']:$valeur='erreur';
|
||||
|
||||
if ($_REQUEST['zOk']=="OK")
|
||||
{
|
||||
if ($action==="validerSupprimerE")
|
||||
{
|
||||
$id = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
$idV = substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
$depotlegal = addslashes($_REQUEST['depot']);
|
||||
$pdo->supprimeEchantillon($id,$idV,$depotlegal);
|
||||
header ('location: index.php?choixTraitement=visite&action=voir');
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = substr($_REQUEST['lstV'],0,strpos($_REQUEST['lstV'],'-'));
|
||||
|
||||
$idV = substr($_REQUEST['lstV'],strpos($_REQUEST['lstV'],'-')+1);
|
||||
|
||||
$qte = addslashes($_REQUEST['ztQuantite']);
|
||||
$depotlegal = addslashes($_REQUEST['listOff']);
|
||||
|
||||
/*
|
||||
$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==="validerAjouterE")
|
||||
{
|
||||
|
||||
|
||||
$pdo->ajoutEchantillon($id,$idV,$depotlegal,$qte);
|
||||
}
|
||||
else
|
||||
{$depotlegal = addslashes($_REQUEST['depot']);
|
||||
$pdo->majEchantillon($id,$idV,$depotlegal,$qte);}
|
||||
}
|
||||
}
|
||||
header ('location: index.php?choixTraitement=visite&action=voir');
|
||||
break;
|
||||
}
|
||||
//-----------------------------------------
|
||||
default :
|
||||
{
|
||||
echo 'erreur d\'aiguillage !'.$action;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
@ -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
|
||||
@ -9,7 +9,13 @@
|
||||
*/
|
||||
|
||||
class PdoBD
|
||||
{
|
||||
{ /*
|
||||
private static $serveur='mysql:host=localhost';
|
||||
private static $bdd='dbname=gsb';
|
||||
private static $user='root';
|
||||
private static $mdp='';
|
||||
private static $monPdo;
|
||||
private static $monPdoBD=null;*/
|
||||
private static $serveur='mysql:host=10.121.38.79';
|
||||
private static $bdd='dbname=gsb2022';
|
||||
private static $user='gsbsio';
|
||||
@ -60,26 +66,355 @@ class PdoBD
|
||||
$ligne = $rs->fetch();
|
||||
return $ligne;
|
||||
}
|
||||
/** ---------------------------------------------- Fin module Connexion
|
||||
/** ---------------------------------------------- Fin module Connexion*/
|
||||
|
||||
/** ---------------------------------------------- module gestion des UTILISATEURS
|
||||
* Retourne les informations des UTILISATEURS
|
||||
*/
|
||||
//Modification mamadou
|
||||
//-----------------------------praticien visité
|
||||
public function getInfosUtilisateurVisite($nom,$prenom)
|
||||
public function getLesUtilisateurs()
|
||||
{
|
||||
|
||||
$req = "SELECT pNom, pPrenom,COUNT(vNum)
|
||||
$req = "SELECT uId,uNom,uPrenom,uLogin,uMdp,uStatut
|
||||
FROM utilisateur
|
||||
INNER JOIN visite ON utilisateur.uId = visite.uId
|
||||
INNER JOIN praticien ON visite.pNum=praticien.pNum
|
||||
WHERE uPrenom='$prenom' AND uNom='$nom'
|
||||
GROUP BY pNom";
|
||||
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']);
|
||||
}
|
||||
|
||||
if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations d'un utilisateur...", $req, PdoBD::$monPdo->errorInfo());}
|
||||
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;
|
||||
}
|
||||
/** ---------------------------------------------- gestion des PARAMETRES
|
||||
/**
|
||||
* 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 */
|
||||
/* Retourne les informations des visites d'un utilisateur */
|
||||
//dans la requette enleve le info inutil
|
||||
public function getLesVisites($id)
|
||||
{
|
||||
$req = "SELECT visite.uId ,vNum,visite.pNum,SUBSTR(vDate,1,10) AS vDate,vMotif, pNom,pPrenom,uAdresse,uCP,uVille
|
||||
FROM visite
|
||||
INNER JOIN utilisateur ON visite.uId = utilisateur.uId
|
||||
INNER JOIN praticien ON visite.pNum = praticien.pNum
|
||||
WHERE visite.uId = '".$_SESSION['idUtilisateur']."';";
|
||||
|
||||
$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 de la table TYPEPARAMETRE
|
||||
*/
|
||||
public function getEchantillons($id,$idV)
|
||||
{
|
||||
$req = "SELECT offrir.uId, offrir.vNum,fLibelle,mNomCommercial ,mComposition, offrir.mDepotLegal AS DepotLegal,OFF_QTE
|
||||
FROM offrir INNER JOIN medicament ON offrir.mDepotLegal = medicament.mDepotLegal
|
||||
INNER JOIN famille ON medicament.fCode = famille.fCode
|
||||
WHERE offrir.uId= '$id' AND offrir.vNum =$idV
|
||||
ORDER by fLibelle;";
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {afficherErreurSQL("Probleme lors de la recherche dans la base de données.", $req, PdoBD::$monPdo->errorInfo());}
|
||||
$lesLignes = $rs->fetchAll();
|
||||
return $lesLignes;
|
||||
}
|
||||
/**
|
||||
* Retourne les informations dun echantillon
|
||||
*/
|
||||
public function getUnEchantillon($id,$idV,$depotlegal)
|
||||
{
|
||||
$req = "SELECT offrir.uId, offrir.vNum,fLibelle,mNomCommercial ,mComposition, offrir.mDepotLegal AS DepotLegal,OFF_QTE
|
||||
FROM offrir INNER JOIN medicament ON offrir.mDepotLegal = medicament.mDepotLegal
|
||||
INNER JOIN famille ON medicament.fCode = famille.fCode
|
||||
WHERE offrir.uId= '$id' AND offrir.vNum =$idV AND offrir.mDepotLegal = '$depotlegal';";
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {afficherErreurSQL("Probleme lors de la recherche dans la base de données.", $req, PdoBD::$monPdo->errorInfo());}
|
||||
$ligne = $rs->fetch();
|
||||
return $ligne;
|
||||
}
|
||||
/* Retourne les informations d'une visites d'un praticien */
|
||||
public function getUneVisitePraticien($id,$idV)
|
||||
{
|
||||
$req = "SELECT visite.uId AS uId,vNum,DATE_FORMAT(vDate,'%Y/%m/%d') as wDateVisite, vRapport, vMotif AS pIndice , mt.pLibelle AS vMotif,praticien.pNum AS pNum,pNom,pPrenom,pRue,pCP,pVille
|
||||
FROM visite
|
||||
INNER JOIN praticien ON visite.pNum = praticien.pNum
|
||||
INNER JOIN parametre mt ON (mt.pType='MotifVi' AND mt.pIndice=vMotif)
|
||||
WHERE visite.uId='$id' AND vNum=$idV;";
|
||||
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des visite ..", $req, PdoBD::$monPdo->errorInfo());}
|
||||
$uneLignes = $rs->fetch();
|
||||
return $uneLignes;
|
||||
|
||||
|
||||
}
|
||||
/* Retourne les medicaments */
|
||||
public function getLesMedicaments()
|
||||
{
|
||||
$req = "SELECT mDepotLegal,mNomCommercial FROM medicament;";
|
||||
|
||||
$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 medicament d'une visite
|
||||
*/
|
||||
|
||||
public function getNomMedUneVisite($id,$idV)
|
||||
{
|
||||
$req = "SELECT visite.Medicament1 AS Medicament ,mNomCommercial FROM visite
|
||||
INNER JOIN medicament ON visite.Medicament1 = medicament.mDepotLegal
|
||||
WHERE visite.uId='$id' AND vNum=$idV
|
||||
UNION
|
||||
SELECT visite.Medicament2,mNomCommercial FROM visite
|
||||
INNER JOIN medicament ON visite.Medicament2 = medicament.mDepotLegal
|
||||
WHERE visite.uId='$id' AND vNum=$idV;";
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des visite ..", $req, PdoBD::$monPdo->errorInfo());}
|
||||
$lesLignes = $rs->fetchAll();
|
||||
return $lesLignes;
|
||||
}
|
||||
/**
|
||||
* Supprime une ligne de la table visite*/
|
||||
public function supprimeVisite($id ,$idV)
|
||||
{
|
||||
$req = "DELETE FROM visite WHERE uId='$id' AND vNum='$idV';";
|
||||
$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());}
|
||||
}
|
||||
/**
|
||||
|
||||
|
||||
* Met à jour une ligne de la table visite
|
||||
*/
|
||||
public function majVisite($id ,$idV,$Date,$Rapport,$Motif,$Med,$Med2)
|
||||
{//fairez modif avec les medicamment
|
||||
$req = "UPDATE visite SET
|
||||
vDate='$Date', vRapport='$Rapport', vMotif='$Motif', Medicament1='$Med' , Medicament2='$Med2' WHERE uId='$id' AND vNum='$idV' ;";
|
||||
$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());}
|
||||
}
|
||||
///Ajoute une ligne dans la table visite
|
||||
public function nouveauCodeVisite($id)
|
||||
{
|
||||
$req="SELECT if( isnull( max(vNum) ) , 1, max(vNum)+1 ) AS numNouveau from visite WHERE uId='$id';";
|
||||
$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 ajoutVisite($id,$NewIdV,$idP,$date,$rapport,$motif,$med,$med2)
|
||||
{
|
||||
$req = "INSERT INTO visite (uId,vNum,pNum,vDate,vRapport,vMotif,Medicament1,Medicament2)
|
||||
VALUES ('$id',$NewIdV,$idP,'$date','$rapport',$motif,'$med','$med2');";
|
||||
|
||||
$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());}
|
||||
}
|
||||
|
||||
/**
|
||||
* Met à jour une ligne de la table offrir
|
||||
*/
|
||||
public function majEchantillon($id ,$idV,$depotlegal,$qte)
|
||||
{//fairez modif avec les medicamment
|
||||
$req = "UPDATE offrir SET OFF_QTE='$qte' WHERE uId='$id' AND vNum=$idV AND mDepotLegal='$depotlegal';";
|
||||
$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());}
|
||||
}
|
||||
public function ajoutEchantillon($id,$idV,$depotlegal,$qte)
|
||||
{
|
||||
$req = "INSERT INTO offrir (uId,vNum,mDepotLegal,OFF_QTE)
|
||||
VALUES ('$id',$idV,'$depotlegal',$qte);";
|
||||
|
||||
$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());}
|
||||
}
|
||||
/* Supprime une ligne de la table offrir*/
|
||||
public function supprimeEchantillon($id ,$idV,$depotlegal)
|
||||
{
|
||||
$req = "DELETE FROM offrir WHERE uId='$id' AND vNum='$idV' AND mDepotLegal='$depotlegal';";
|
||||
$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());}
|
||||
}
|
||||
/** ---------------------------------------------- fin module gestion des visites*/
|
||||
|
||||
/** ---------------------------------------------- gestion des PARAMETRES*/
|
||||
/**
|
||||
* Retourne les informations de la table TYPEPARAMETRE
|
||||
*/
|
||||
@ -162,7 +497,6 @@ public function getInfosUtilisateurVisite($nom,$prenom)
|
||||
$rs = PdoBD::$monPdo->exec($req);
|
||||
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
|
||||
*/
|
||||
/** ---------------------------------------------- fin gestion des PARAMETRES*/
|
||||
}
|
||||
?>
|
45
vues/v_choixPraticien.php
Executable file
45
vues/v_choixPraticien.php
Executable file
@ -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')">
|
||||
<input type="image" id="zPremier" title="premier" src="images/goPremier.gif" onclick="premier('choixP','lstPraticiens')">
|
||||
<input type="image" id="zPrecedent" title="précé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 -->
|
44
vues/v_choixUtilisateur.php
Executable file
44
vues/v_choixUtilisateur.php
Executable file
@ -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')">
|
||||
<input type="image" id="zPremier" title="premier" src="images/goPremier.gif" onclick="premier('choixP','lstUtilisateurs')">
|
||||
<input type="image" id="zPrecedent" title="précé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 -->
|
49
vues/v_choixVisite.php
Executable file
49
vues/v_choixVisite.php
Executable file
@ -0,0 +1,49 @@
|
||||
<!-- choix d'un praticien / Derniere modification le 19 avril 2020 par Pascal Blain -->
|
||||
<?php
|
||||
$nbL=count($lesLignes);
|
||||
|
||||
echo '
|
||||
<form name="choixV" action="index.php?choixTraitement=visite&action=voir" method="post">
|
||||
<h2>'.$titre; ?>
|
||||
<select name="lstV" STYLE="width:350px;" onchange="submit();">
|
||||
<?php
|
||||
$noL=1; // ?
|
||||
if (!isset($_REQUEST['lstV'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstV'];}
|
||||
$i=1;
|
||||
foreach ($lesLignes as $uneLigne)
|
||||
{
|
||||
if($uneLigne['vNum'] == $choix or $choix == 'premier')
|
||||
{echo "<option selected value=\"".$uneLigne['uId']."-".$uneLigne['vNum']."\">".$uneLigne['vDate']." ".$uneLigne['pNom']." ".$uneLigne['pPrenom']."</option>\n ";
|
||||
|
||||
$choix = $uneLigne['uId'];
|
||||
$choix2 = $uneLigne['vNum'];
|
||||
$noL=$i;
|
||||
}
|
||||
else
|
||||
{echo "<option value=\"".$uneLigne['vNum']."\">".$uneLigne['vDate']." ".$uneLigne['pNom']." ".$uneLigne['pPrenom']."</option>\n ";
|
||||
$i=$i+1;}
|
||||
}
|
||||
echo '
|
||||
</select>
|
||||
</h2>';
|
||||
//echo $choix."-".$choix2;
|
||||
?>
|
||||
<!-- ============================================================== navigation dans la liste -->
|
||||
<div id='navigation'>
|
||||
<input type="image" id="zNouveau" title="Ajouter" src="images/ajout.gif" onclick="faire('choixV', 'ajouter')">
|
||||
<input type="image" id="zModif" title="Modifier" src="images/modif.gif" onclick="faire('choixV', 'modifier')">
|
||||
<input type="image" id="zSupprime" title="Supprimer" src="images/supprimer.gif" onclick="faire('choixV', 'supprimer')">
|
||||
<input type="image" id="zPremier" title="premier" src="images/goPremier.gif" onclick="premier('choixV','lstV')">
|
||||
<input type="image" id="zPrecedent" title="précédent" src="images/goPrecedent.gif" onclick="precedent('choixV','lstV')">
|
||||
<?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('choixV','lstV')">
|
||||
<input type="image" id="zDernier" title="dernier" src="images/goDernier.gif" onclick="dernier('choixV','lstV')">
|
||||
</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 -->
|
@ -31,8 +31,7 @@ echo("
|
||||
<td style='width:20px;text-align:center;'>");
|
||||
|
||||
echo("</td>
|
||||
<td style='width:10px;text-align:center;'><a href='index.php?choixTraitement=param&action=modifier&type=".$enteteParametre['tlId']."&valeur=".$uneLigne['pIndice']."'>
|
||||
<img src='images/modif.gif' title='modifier'></a></td>
|
||||
<td style='width:10px;text-align:center;'><a href='index.php?choixTraitement=param&action=modifier&type=".$enteteParametre['tlId']."&valeur=".$uneLigne['pIndice']."'><img src='images/modif.gif' title='modifier'></a></td>
|
||||
<td style='width:10px;text-align:center;'>");
|
||||
echo ("
|
||||
<a href='index.php?choixTraitement=param&action=supprimer&type=".$enteteParametre['tlId']."&valeur=".$uneLigne['pIndice']."'><img title='Supprimer' src='images/supprimer.gif'></a>");
|
||||
|
82
vues/v_fichePraticien.php
Executable file
82
vues/v_fichePraticien.php
Executable file
@ -0,0 +1,82 @@
|
||||
|
||||
<!-- affichage du detail de la fiche Praticien / Derniere modification le 19 avril 2020 -->
|
||||
<?php
|
||||
$titre="Caracté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ées du praticien ");
|
||||
echo (" </legend>
|
||||
<table>
|
||||
<tr><th style='width:120px;'>Nom</th> <td>".$lesInfosPraticien['pNom']."</td> </tr>
|
||||
<tr><th>Pré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>
|
||||
");
|
||||
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>");
|
||||
?>
|
@ -1,80 +1,96 @@
|
||||
|
||||
<!-- affichage du detail de la fiche Utilisateur / Derniere modification le 11 avril 2020 par Pascal BLAIN -->
|
||||
<?php
|
||||
/**
|
||||
*auteur : Hadrien Rommel, lycée le castel à
|
||||
*dernière modif : 17/03/2022**/
|
||||
$titre="caracté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("
|
||||
echo ("
|
||||
<div style='display: block;' class='unOnglet' id='contenuOnglet1'>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend>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 (' <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é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égion</th> <td>".$lesInfosUtilisateur['wRegion']."</td></tr> <tr><th>Secteur</th> <td>".$lesInfosUtilisateur['wSecteur']."</td></tr>
|
||||
");
|
||||
echo (" </table>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
<div>
|
||||
<fieldset><legend>Coordonnées de l'utilisateur<a href='index.php?choixTraitement=utilisateur&action=modifier'><img src='images/modif.gif' title='modifier'></a></legend>
|
||||
<table>");
|
||||
//modif dans la balise legend
|
||||
echo("<tr> <th style='width:20px;text-align:center;'>Nom</th>
|
||||
<td>".$lesInfosUtilisateur['uNom']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Prenom</th>
|
||||
<td>".$lesInfosUtilisateur['uPrenom']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Adresse</th>
|
||||
<td>".$lesInfosUtilisateur['uAdresse']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Code Postal</th>
|
||||
<td>".$lesInfosUtilisateur['uCP']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Ville</th>
|
||||
<td>".$lesInfosUtilisateur['uVille']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Statut</th>
|
||||
<td>".$lesInfosUtilisateur['wStatut']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Nom de compte</th>
|
||||
<td>".$lesInfosUtilisateur['uLogin']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Region</th>
|
||||
<td>".$lesInfosUtilisateur['wRegion']."</td></tr>
|
||||
<tr> <th style='width:20px;text-align:center;'>Secteur</th>
|
||||
<td>".$lesInfosUtilisateur['wSecteur']."</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset><legend>Laboratoire</legend>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td><tr>
|
||||
<td>".$lesInfosUtilisateur['lNom']."</td></tr> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<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é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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*================================================================================================== */
|
||||
echo("
|
||||
|
||||
<fieldset><legend>Praticien visite</legend>
|
||||
<table>");
|
||||
echo("<tr>
|
||||
<th style='width:20px;text-align:center;'>Nom et Prenom du praticien</th>
|
||||
<th style='width:20px;text-align:center;'>Nombre de visites</th>
|
||||
</tr>");
|
||||
|
||||
|
||||
foreach ($lesInfosUtilisateurVisite as $uneLigne)
|
||||
{
|
||||
//probleme
|
||||
echo("<tr>
|
||||
<td>".$uneLigne['pNom']." ".$uneLigne['pPrenom']."</td>
|
||||
<td>".$uneLigne['COUNT(vNum)']."</td>
|
||||
</tr>
|
||||
|
||||
");
|
||||
|
||||
}
|
||||
echo('</table>
|
||||
</fieldset> ');
|
||||
|
||||
|
||||
|
||||
|
||||
echo ('</div>');
|
||||
</div>");
|
||||
?>
|
134
vues/v_ficheVisite.php
Executable file
134
vues/v_ficheVisite.php
Executable file
@ -0,0 +1,134 @@
|
||||
|
||||
<!-- affichage du detail de la fiche Praticien / Derniere modification le 19 avril 2020 -->
|
||||
<?php
|
||||
$titre="rapports de visite";
|
||||
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);">Echantillons</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ées du praticien ");
|
||||
echo (" </legend>
|
||||
<table>
|
||||
|
||||
<tr><th>Nom/Prénom</th> <td>".$UneVisitePraticien['pNom']." ".$UneVisitePraticien['pPrenom']."</td></tr>
|
||||
<tr><th>Rue</th> <td>".$UneVisitePraticien['pRue']."</td></tr>
|
||||
<tr><th>Code postal/Ville</th> <td>".$UneVisitePraticien['pCP']." ".$UneVisitePraticien['pVille']."</td></tr>
|
||||
");
|
||||
echo (" </table>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
");
|
||||
echo ("
|
||||
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Rapport de visite");
|
||||
echo (" </legend>
|
||||
<table>
|
||||
|
||||
<tr><th>Date de visite</th> <td>".$UneVisitePraticien['wDateVisite']."</td></tr>
|
||||
<tr><th>Motif</th> <td>".$UneVisitePraticien['vMotif']."</td>
|
||||
<th>Medicament 1</th> <td>");
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL!=0 )
|
||||
{echo "<input type='hidden' name='Med' value='".$LesNomsMedsUneVisite['0']['Medicament']."'>".$LesNomsMedsUneVisite['0']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo"</td></tr>
|
||||
<tr><th>Commentaire</th> <td>".$UneVisitePraticien['vRapport']."</td>
|
||||
<th>Medicament 2</th> <td>
|
||||
";
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL>1 )
|
||||
{echo "<input type='hidden' name='Med2' value='".$LesNomsMedsUneVisite['1']['Medicament']."'>".$LesNomsMedsUneVisite['1']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo (" </td></tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>");
|
||||
|
||||
|
||||
/*================================================================================================== SUIVI DES VISITES(2)*/
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet2'>
|
||||
|
||||
");
|
||||
foreach ($lesEchantillons as $unEchantillon)
|
||||
{
|
||||
|
||||
|
||||
//<a href='index.php?choixTraitement=visite&action=voir&lstVisites=".$unEchantillon['uId']."-".$unEchantillon['vNum'].' style='text-decoration:none;'>".$unEchantillon['medicament.mNomCommercial'].'</a>
|
||||
echo("
|
||||
<fieldset><legend>".$unEchantillon['fLibelle']."</legend>
|
||||
|
||||
<table name=>
|
||||
<tr><th class='controle' >Nom commercial</th>
|
||||
<th class='controle' >Composition</th>
|
||||
<th class='controle' >Quantité</th>
|
||||
<th class='controle' >mise à jour</th>
|
||||
</tr>
|
||||
<tr ><td class='controle' ><input type='hidden' name='depot' value='".$unEchantillon['DepotLegal']."'>".$unEchantillon['mNomCommercial']."</td>
|
||||
<td class='controle' >".$unEchantillon['mComposition']."</td>
|
||||
<td class='controle' >".$unEchantillon['OFF_QTE']."</td>
|
||||
<td>
|
||||
<a href='index.php?choixTraitement=visite&action=modifierE&&lstV=".$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum']."&depot=".$unEchantillon['DepotLegal']."'> <input type='image' id='zModifE' title='Modifier' src='images/modif.gif' onclick='faire('choixV', 'modifierE')' ></a>
|
||||
<a href='index.php?choixTraitement=visite&action=supprimerE&lstV=".$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum']."&depot=".$unEchantillon['DepotLegal']."'> <input type='image' id='zSupprimeE' title='Supprimer' src='images/supprimer.gif' onclick='faire('choixV', 'supprimerE')' > </a>
|
||||
");
|
||||
|
||||
?>
|
||||
|
||||
<input type="hidden" name="action" value="<?php if($_REQUEST['action']=="liste") {echo "voir";} else {echo $_REQUEST['action'];}?>">
|
||||
<!-- <input type='hidden' name='DL' value=".$unEchantillon['DepotLegal']."> -->
|
||||
<?php
|
||||
|
||||
|
||||
echo ("</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<input type="image" id="zNouveauE" title="Ajouter" src="images/ajout.gif" onclick="faire('choixV', 'ajouterE')">
|
||||
<?php
|
||||
echo" </div>";
|
||||
?>
|
||||
<?php
|
||||
/*================================================================================================== 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>");
|
||||
|
||||
?>
|
298
vues/v_unEchantillon.php
Executable file
298
vues/v_unEchantillon.php
Executable file
@ -0,0 +1,298 @@
|
||||
<!-- Derniere modification le 25 mars 2022 par Pascal Blain -->
|
||||
|
||||
<?php
|
||||
if ($_REQUEST['action']=="supprimerE")
|
||||
{ echo '<h2>SUPPRESSION DE l\'ECHANTILLON</h2>';
|
||||
echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerSupprimerE&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'" method="post">';}
|
||||
if ($_REQUEST['action']=="modifierE")
|
||||
{ echo '<h2>MODIFICATION DE l\'ECHANTILLON</h2>';
|
||||
echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerModifierE&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'" method="post">';}
|
||||
if ($_REQUEST['action']=="ajouterE")
|
||||
{ echo '<h2>AJOUT D\'UN ECHANTILLON</h2>';
|
||||
echo '<form name="frmE" action="index.php?choixTraitement=visite&action=validerAjouterE&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'" method="post" onsubmit="return valider(this)">';}
|
||||
echo ("
|
||||
<fieldset><legend>Visite du ".$UneVisitePraticien['wDateVisite']." chez ".$UneVisitePraticien['pNom']." ".$UneVisitePraticien['pPrenom']."</legend>
|
||||
<table>");
|
||||
if ($_REQUEST['action']=="supprimerE") //-------------------------------------------------------- cas suppression
|
||||
{ //<input type='hidden' name='lstMedicaments' value='".$unEchantillon['mDepotLegal']."'></td></tr>
|
||||
echo "<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Médicament</legend>
|
||||
<table>
|
||||
<tr><th style='width:120px;'>Famille</th> <td>".$UnEchantillon['fLibelle']."</td></tr>
|
||||
<tr><th style='width:120px;'>Médicament</th> <td>".$UnEchantillon['mNomCommercial']."
|
||||
<input type='hidden' name='depot' value='".$UnEchantillon['DepotLegal']."'></td></tr>
|
||||
<tr><th style='width:120px;'>Quanté remise</th> <td>".$UnEchantillon['OFF_QTE']."</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Rapport de visite";
|
||||
echo (" </legend>
|
||||
<table>
|
||||
|
||||
<tr><th>Date de visite</th> <td>".$UneVisitePraticien['wDateVisite']."</td></tr>
|
||||
<tr><th>Motif</th> <td>".$UneVisitePraticien['vMotif']."</td>
|
||||
<th>Medicament 1</th> <td>");
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL!=0 )
|
||||
{echo "".$LesNomsMedsUneVisite['0']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo"</td></tr>
|
||||
<tr><th>Commentaire</th> <td>".$UneVisitePraticien['vRapport']."</td>
|
||||
<th>Medicament 2</th> <td>
|
||||
";
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL>1 )
|
||||
{echo "".$LesNomsMedsUneVisite['1']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo (" </td></tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
");
|
||||
}
|
||||
if ($_REQUEST['action']=="ajouterE") //-------------------------------------------------------- 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>");*/
|
||||
|
||||
$nbL=count($lesEchantillons);
|
||||
echo ("
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Médicament</legend>
|
||||
<table>
|
||||
<tr><th style='width:120px;'>Médicament</th> <td>
|
||||
<select name = 'listOff' style='width:200px;'>");
|
||||
foreach ($LesMedicaments as $unMedicament)
|
||||
{ //enlever les medicamment d'eja donné
|
||||
$deja=true;
|
||||
|
||||
$i = 0;
|
||||
while( $deja=true && $i < $nbL)
|
||||
{
|
||||
if($unMedicament['mDepotLegal'] ==$lesEchantillons[$i]['DepotLegal'])
|
||||
{
|
||||
$deja=false;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if($deja=true)
|
||||
{
|
||||
echo '<option value="'.$unMedicament['mDepotLegal'].'">'.$unMedicament['mNomCommercial'].'</option>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
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>".$UneVisitePraticien['wDateVisite']."</td></tr>
|
||||
<tr><th>Motif</th> <td>".$UneVisitePraticien['vMotif']."</td>
|
||||
<th>medicament 1</th>
|
||||
<td>");
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL!=0 )
|
||||
{echo "".$LesNomsMedsUneVisite['0']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
|
||||
echo" </td>
|
||||
</tr>
|
||||
<tr><th>Commentaires</th> <td>".$UneVisitePraticien['vRapport']."</td>
|
||||
<th>medicament 2</th>
|
||||
<td>";
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL>1 )
|
||||
{echo "".$LesNomsMedsUneVisite['1']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo" </td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>";
|
||||
|
||||
}
|
||||
|
||||
if ($_REQUEST['action']=="modifierE") //-------------------------------------------------------- cas modification
|
||||
{
|
||||
echo ("
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Médicament</legend>
|
||||
<table>
|
||||
<tr><th style='width:120px;'>Famille</th> <td>".$UnEchantillon['fLibelle']."</td></tr>
|
||||
<tr><th style='width:120px;'>Médicament</th> <td>".$UnEchantillon['mNomCommercial']."
|
||||
<input type='hidden' name='depot' value='".$UnEchantillon['DepotLegal']."'></td></tr>
|
||||
<tr><th style='width:120px;'>Quanté remise</th> <td><input class='controle' type='text' name='ztQuantite' value='".$UnEchantillon['OFF_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>".$UneVisitePraticien['wDateVisite']."</td></tr>
|
||||
<tr><th>Motif</th> <td>".$UneVisitePraticien['vMotif']."</td>
|
||||
<th>medicament 1</th>
|
||||
<td>");
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL!=0 )
|
||||
{echo "".$LesNomsMedsUneVisite['0']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
|
||||
echo" </td>
|
||||
</tr>
|
||||
<tr><th>Commentaires</th> <td>".$UneVisitePraticien['vRapport']."</td>
|
||||
<th>medicament 2</th>
|
||||
<td>";
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL>1 )
|
||||
{echo "".$LesNomsMedsUneVisite['1']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo" </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 $UneVisitePraticien['uId']; ?>">
|
||||
<input type="hidden" name="lstVisites" value="<?php echo $UneVisitePraticien['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>
|
119
vues/v_unPraticien.php
Executable file
119
vues/v_unPraticien.php
Executable file
@ -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é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é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é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éléctionnez votre code postal grâce à 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é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é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éléctionnez votre code postal grâce à 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é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>
|
153
vues/v_unUtilisateur.php
Executable file
153
vues/v_unUtilisateur.php
Executable file
@ -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é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é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é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éléctionnez votre code postal grâce à 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é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é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éléctionnez votre code postal grâce à 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é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>
|
243
vues/v_uneVisite.php
Executable file
243
vues/v_uneVisite.php
Executable file
@ -0,0 +1,243 @@
|
||||
<!-- Derniere modification le 15 avril 2020 par Guy Mehl -->
|
||||
|
||||
<?php
|
||||
if ($_REQUEST['action']=="supprimer")
|
||||
{ echo '<h2>SUPPRESSION DE LA VISITE DU '.$UneVisitePraticien['wDateVisite'].' CHEZ '.$UneVisitePraticien['pNom'].' '.$UneVisitePraticien['pPrenom'].'</h2>';
|
||||
echo '<form name="frmA" action="index.php?choixTraitement=visite&action=validerSupprimer&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'" method="post">';}
|
||||
if ($_REQUEST['action']=="modifier")
|
||||
{ echo '<h2>MODIFICATION DE LA VISITE DU '.$UneVisitePraticien['wDateVisite'].' CHEZ '.$UneVisitePraticien['pNom'].' '.$UneVisitePraticien['pPrenom'].'</h2>';
|
||||
echo '<form name="frmA" action="index.php?choixTraitement=visite&action=validerModifier&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'&lstP='.$choix.'" method="post">';}
|
||||
if ($_REQUEST['action']=="ajouter")
|
||||
{ echo "<h2>AJOUT D'UNE NOUVELLE VISITE </h2>";
|
||||
echo '
|
||||
<form name="frmA" action="index.php?choixTraitement=visite&action=validerAjouter&lstV='.$UneVisitePraticien['uId']."-".$UneVisitePraticien['vNum'].'" method="post" onsubmit="return valider(this)">';}
|
||||
/*echo ("
|
||||
<fieldset><legend>Visite</legend>
|
||||
<table style='border: 0px solid white;'>"); */
|
||||
if ($_REQUEST['action']=="supprimer") //-------------------------------------------------------- cas suppression
|
||||
{
|
||||
echo ('<fieldset><legend>Coordonnée du praticien</legend>
|
||||
<table style="border: 0px solid white;">
|
||||
<tr> <th style="width:120px;">Nom/Prénom</th>
|
||||
<td>'.$UneVisitePraticien['pNom'].' '.$UneVisitePraticien['pPrenom'].'</td> </tr>
|
||||
');
|
||||
echo ('
|
||||
<tr><th>Adresse</th>
|
||||
<td>'.$UneVisitePraticien['pRue'].'</td> </tr>
|
||||
<tr><th>Code postal/Ville</th>
|
||||
<td>'.$UneVisitePraticien['pCP'].' '.$UneVisitePraticien['pVille']);
|
||||
echo ("
|
||||
</td> </tr>
|
||||
");
|
||||
|
||||
echo ("
|
||||
</table>
|
||||
</fieldset> ");
|
||||
|
||||
|
||||
echo (" <fieldset> <legend>Rapport de visite
|
||||
</legend>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>Date de visite</th>
|
||||
<td>".$UneVisitePraticien['wDateVisite']."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Motif</th>
|
||||
<td>".$UneVisitePraticien['vMotif']."</td>
|
||||
<th>Medicament 1</th>
|
||||
<td>");
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL!=0 )
|
||||
{echo "".$LesNomsMedsUneVisite['0']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo"</td></tr>
|
||||
<tr><th>Commentaire</th> <td>".$UneVisitePraticien['vRapport']."</td>
|
||||
<th>Medicament 2</th> <td>
|
||||
";
|
||||
$nbL=count($LesNomsMedsUneVisite);
|
||||
if( $nbL>1 )
|
||||
{echo "".$LesNomsMedsUneVisite['1']['mNomCommercial']."";}
|
||||
else
|
||||
{echo" ";}
|
||||
echo (" </td></tr>
|
||||
");
|
||||
echo (" </table>
|
||||
</fieldset>");
|
||||
|
||||
|
||||
|
||||
}
|
||||
if ($_REQUEST['action']=="ajouter") //-------------------------------------------------------- cas ajout
|
||||
{
|
||||
$date = (new \DateTime())->format('Y-m-d');
|
||||
|
||||
//problème sur afichage du nombre de visite sur chaque praticien
|
||||
|
||||
echo' <table style="border: 0px solid white;">
|
||||
<tr><td><fieldset><legend>Choix du praticien</legend>
|
||||
<table style="border: 0px solid white;">
|
||||
<tr><th>Nom/Prénom</th> <td>
|
||||
<select name="lstPraticiens" STYLE="width:350px;">';
|
||||
|
||||
$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></td> </tr>
|
||||
</table>
|
||||
</fieldset>");
|
||||
echo ("
|
||||
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset> <legend>Rapport de visite");
|
||||
echo (" </legend>
|
||||
<table>
|
||||
|
||||
<tr><th>Date de visite</th> <td><input class='' type='text' name='ztDate' id='date' onblur='verifTexte(this.form, this, 25)' value='$date'></td></tr>
|
||||
<tr><th>Motif</th> <td>
|
||||
<select name = 'lstMotif' style='width:200px;'>");
|
||||
foreach ($lesMotifs as $unMotif)
|
||||
{
|
||||
echo '
|
||||
<option value="'.$unMotif['pIndice'].'">'.$unMotif['pLibelle'].'</option>';
|
||||
}
|
||||
echo ("
|
||||
</select>
|
||||
</td><th>Medicament 1</th>
|
||||
<td>
|
||||
<select name = 'listMed' style='width:200px;'>");
|
||||
foreach ($LesMedicaments as $unMedicamment)
|
||||
{ echo '<option value="'.$unMedicamment['mDepotLegal'].'">'.$unMedicamment['mNomCommercial'].'</option>';
|
||||
}
|
||||
echo ("
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>Commentaire</th>
|
||||
<td><input class='' type='text' name='ztRapport' id='rapport' onblur='verifTexte(this.form, this, 25)' placeholder='Entrer votre rapport'></td>
|
||||
<th>Medicament 2</th>
|
||||
<td>
|
||||
<select name = 'listMedBis' style='width:200px;'>");
|
||||
foreach ($LesMedicaments as $unMedicamment)
|
||||
{ echo '<option value="'.$unMedicamment['mDepotLegal'].'">'.$unMedicamment['mNomCommercial'].'</option>';
|
||||
}
|
||||
echo ("
|
||||
</select>
|
||||
</td></tr>
|
||||
");
|
||||
echo (" </table>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</fieldset>
|
||||
");
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action']=="modifier") //------------------------------------------------------------------------------------ cas modification
|
||||
{
|
||||
|
||||
echo ('<fieldset><legend>Coordonnée du praticien</legend>
|
||||
<table style="border: 0px solid white;">
|
||||
<tr> <th style="width:120px;">Nom/Prénom</th>
|
||||
<td>'.$UneVisitePraticien['pNom'].' '.$UneVisitePraticien['pPrenom'].'</td> </tr>
|
||||
');
|
||||
echo ('
|
||||
<tr><th>Adresse</th>
|
||||
<td>'.$UneVisitePraticien['pRue'].'</td> </tr>
|
||||
<tr><th>Code postal/Ville</th>
|
||||
<td>'.$UneVisitePraticien['pCP'].' '.$UneVisitePraticien['pVille']);
|
||||
echo ("
|
||||
</td> </tr>
|
||||
");
|
||||
|
||||
echo ("
|
||||
</table>
|
||||
</fieldset> ");
|
||||
|
||||
|
||||
echo (" <fieldset> <legend>Rapport de visite
|
||||
</legend>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>Date de visite</th>
|
||||
<td><input class='controleLong' type='text' name='ztDate' id='Date' onblur='verifTexte(this.form, this, 55)' required value='".$UneVisitePraticien['wDateVisite']."'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Motif</th>
|
||||
<td>
|
||||
<select name = 'lstMotif' style='width:200px;'>");
|
||||
foreach ($lesMotifs as $unMotif)
|
||||
{ if($unMotif['pIndice']===$UneVisitePraticien['pIndice']){$selected = "selected";} else {$selected = null;}
|
||||
echo '
|
||||
<option '.$selected.' value="'.$unMotif['pIndice'].'">'.$unMotif['pLibelle'].'</option>';
|
||||
}
|
||||
echo ("
|
||||
</select>
|
||||
</td>
|
||||
<th>Medicament 1</th>
|
||||
<td>
|
||||
<select name = 'listMed' style='width:200px;'>");
|
||||
foreach ($LesMedicaments as $unMedicamment)
|
||||
{ if($unMedicamment['mDepotLegal']===$Medicament){$selected = "selected";} else {$selected = null;}
|
||||
echo '
|
||||
<option '.$selected.' value="'.$unMedicamment['mDepotLegal'].'">'.$unMedicamment['mNomCommercial'].'</option>';
|
||||
}
|
||||
echo ("
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Commentaire</th>
|
||||
<td>
|
||||
<input class='controleLong' type='text' name='ztRapport' id='Rapport' onblur='verifTexte(this.form, this, 55)' required value='".$UneVisitePraticien['vRapport']."'>
|
||||
</td>
|
||||
<th>Medicament 2</th>
|
||||
|
||||
<td>
|
||||
<select name = 'listMedBis' style='width:200px;'>");
|
||||
foreach ($LesMedicaments as $unMedicamment)
|
||||
{ if($unMedicamment['mDepotLegal']===$Medicament2){$selected = "selected";} else {$selected = null;}
|
||||
echo '
|
||||
<option '.$selected.' value="'.$unMedicamment['mDepotLegal'].'">'.$unMedicamment['mNomCommercial'].'</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>
|
Loading…
x
Reference in New Issue
Block a user