v_ficheUtilisateur md

This commit is contained in:
Anas bouzbakh 2022-03-24 09:24:49 +01:00
parent 7a2967cf97
commit fe44383872
4 changed files with 95 additions and 96 deletions

View File

@ -17,6 +17,8 @@ case 'voir':
include("vues/v_entete.php");
$lesInfosUtilisateur = $pdo->getInfosUtilisateur("*",$_SESSION['idUtilisateur']);
//modification mamadou
$lesInfosUtilisateurVisite = $pdo->getInfosUtilisateurVisite($_SESSION['nom'],$_SESSION['prenom']);
include("vues/v_ficheUtilisateur.php");
break;
}

View File

@ -62,7 +62,23 @@ class PdoBD
}
/** ---------------------------------------------- Fin module Connexion
*/
//Modification mamadou
//-----------------------------praticien visité
public function getInfosUtilisateurVisite($nom,$prenom)
{
$req = "SELECT pNom, pPrenom,COUNT(vNum)
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";
$rs = PdoBD::$monPdo->query($req);
if ($rs === false) {afficherErreurSQL("Probleme lors de la lecture des informations d'un utilisateur...", $req, PdoBD::$monPdo->errorInfo());}
$ligne = $rs->fetch();
return $ligne;
}
/** ---------------------------------------------- gestion des PARAMETRES
/**
* Retourne les informations de la table TYPEPARAMETRE

View File

@ -31,7 +31,8 @@ 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>");

View File

@ -1,100 +1,80 @@
<!-- affichage du détail d'un type de parametre / Dernière modification le 11 avril 2020 par Pascal BLAIN -->
<?php
echo('
<div id="fiche">
');
/*================================================================================================== */
$nbP=count($lesInfosParametre);
echo("
<div>
<fieldset><legend>Parametre</legend>
<table>
<tr><th style='width:25px;text-align:center;'><a href='index.php?choixTraitement=param&action=ajouter&type=".$enteteParametre['tlId']."&valeur=NULL'><img title='Ajouter une valeur' src='images/ajout.gif'></a></th><th style='width:25px;'>Code</th><th style='text-align:center;'>Description</th><th style='width:70px;'>Booléen</th><th style='width:70px;'>Choix multiples</th></tr>
<tr><td>&nbsp;</td><td>".$enteteParametre['tlId']."</td><td>".$enteteParametre['tlLibelle']."</td><td style='text-align:center;'>".$enteteParametre['tlBooleen']."</td><td style='text-align:center;'>".$enteteParametre['tlChoixMultiple']."</td></tr>
</table>
</fieldset><br />
<table style='border: 0px solid white;'>
<tr>
<td style='border :0px;'>
<fieldset><legend>Valeurs</legend>
<table>");
$numPa=1;
foreach ($lesInfosParametre as $uneLigne)
{
if ($numPa<10)
{$numPa=$numPa+1;
$type = $choix;
$indice = $uneLigne['pIndice'];
/**
*auteur : Hadrien Rommel, lycée le castel à
*dernière modif : 17/03/2022**/
echo("<tr> <th style='width:20px;text-align:center;'>".$uneLigne['pIndice']."</th> <td>".$uneLigne['pLibelle']."</td>
<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;'>");
echo ("
<a href='index.php?choixTraitement=param&action=supprimer&type=".$enteteParametre['tlId']."&valeur=".$uneLigne['pIndice']."'><img title='Supprimer' src='images/supprimer.gif'></a>");
echo ("
</td></tr>");
}
}
while ($numPa<10)
{
echo("<tr> <th style='width:25px;'>&nbsp;</th> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> </tr>");
$numPa=$numPa+1;
}
echo("
</table>
</fieldset></td>");
if ($nbP>=10)
{
echo("
<td style='border :0px;'>
<fieldset><legend>(suite)</legend>
<table>");
$numP=1;
foreach ($lesInfosParametre as $uneLigne)
{
if ($numP>=10)
{
$type = $choix;
$indice = $uneLigne['pIndice'];
echo("<tr> <th style='width:20px;text-align:center;'>".$uneLigne['pIndice']."</th> <td style='width:140px;'>".$uneLigne['pLibelle']."</td>
<td style='width:20px;text-align:center;'>");
echo("</td>
<td style='width:20px;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:20px;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>");
echo ("
</td></tr>");
}
$numP=$numP+1;
}
if ($numP<10) {$numP=10;}
while ($numP<19)
{
echo("<tr> <th style='width:20px;text-align:center;'>&nbsp;</th> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> </tr>");
$numP=$numP+1;
}
echo("
</table>
</fieldset>
</td>");
}
echo("
</tr>
</table>
<fieldset><legend>Observations</legend>
echo("
<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>
<fieldset><legend>Laboratoire</legend>
<table style='border: 0px solid white;'>
<tr>
<td>...</td>
<td><tr>
<td>".$lesInfosUtilisateur['lNom']."</td></tr> </td>
</tr>
</table>
</fieldset>
</div>
</div>");
?>
</fieldset>
");
/*================================================================================================== */
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>');