Page MenuHomeGRNET

user_profile.php
No OneTemporary

File Metadata

Created
Mon, Nov 25, 5:56 PM

user_profile.php

<?php
//--------------------Show Constraints------------------------------//
if($usergroup == 'Doctor') {
//Referring Physicians
$sth_ref = $dbh_portal->prepare("SELECT * FROM db_ref_phys WHERE persistent_id = ?;");
$sth_ref->bindParam(1, $userid, PDO::PARAM_STR);
$sth_ref->execute();
$sth_ref->setFetchMode(PDO::FETCH_ASSOC);
$ref_phys = '';
if($sth_ref->rowCount() > 0){
while($row_ref = $sth_ref->fetch()){
if ($ref_phys == '')
$ref_phys = $row_ref['ref_name'];
else
$ref_phys = $ref_phys.", ".$row_ref['ref_name'];
}
}else{
$ref_phys = 'Δεν έχετε περιορισμούς';
}
//Modalities
$sth_mods = $dbh_portal->prepare("SELECT * FROM db_modalities WHERE persistent_id = ?;");
$sth_mods->bindParam(1, $userid, PDO::PARAM_STR);
$sth_mods->execute();
$sth_mods->setFetchMode(PDO::FETCH_ASSOC);
$mods = '';
if($sth_mods->rowCount() > 0){
$row_mods = $sth_mods->fetch();
$mods = $row_mods['filter_user_modal'];
}else{
$mods = 'Δεν έχετε περιορισμούς';
}
//Stations
$sth_stations = $dbh_portal->prepare("SELECT * FROM db_stations WHERE persistent_id = ?;");
$sth_stations->bindParam(1, $userid, PDO::PARAM_STR);
$sth_stations->execute();
$sth_stations->setFetchMode(PDO::FETCH_ASSOC);
$stations = '';
if($sth_stations->rowCount() > 0){
while($row_stations = $sth_stations->fetch()){
if ($stations == '')
$stations = $row_stations['station_name'];
else
$stations = $stations.", ".$row_stations['station_name'];
}
}else{
$stations = 'Δεν έχετε περιορισμούς';
}
//Body Part
$sth_body_part = $dbh_portal->prepare("SELECT * FROM db_body_part WHERE persistent_id = ?;");
$sth_body_part->bindParam(1, $userid, PDO::PARAM_STR);
$sth_body_part->execute();
$sth_body_part->setFetchMode(PDO::FETCH_ASSOC);
$body_part = '';
if($sth_body_part->rowCount() > 0){
while($row_body_part = $sth_body_part->fetch()){
if ($body_part == '')
$body_part = $row_body_part['body_part'];
else
$body_part = $body_part.", ".$row_body_part['body_part'];
}
}else{
$body_part = 'Δεν έχετε περιορισμούς';
}
//Department
$sth_department = $dbh_portal->prepare("SELECT * FROM db_department WHERE persistent_id = ?;");
$sth_department->bindParam(1, $userid, PDO::PARAM_STR);
$sth_department->execute();
$sth_department->setFetchMode(PDO::FETCH_ASSOC);
$department = '';
if($sth_department->rowCount() > 0){
while($row_department = $sth_department->fetch()){
if ($department == '')
$department = $row_department['department'];
else
$department = $department.", ".$row_department['department'];
}
}else{
$department = 'Δεν έχετε περιορισμούς';
}
}
?>
<!DOCTYPE html>
<html>
<body>
<div class="user_profile profile <?php print($additional_class); ?>">
<div class="user_div">
<i class="fa fa-user"></i>
<p><?php print($username." ".$usersurname); ?></p>
</div>
<table class="user_infos">
<tr>
<td><i class="fa fa-hospital-o"></i></td>
<td> Ίδρυμα: </td>
<td><?php print($institution_name); ?></td>
</tr>
<tr>
<td><i class="fa fa-group"></i></td>
<td> Ρόλος: </td>
<td> <?php print($usergroup); ?></td>
</tr>
</table>
</div>
<?php if($usergroup == 'Doctor') { ?>
<div class="user_profile profile <?php print($additional_class); ?>">
<div class="user_div">
<i class="fa fa-exclamation"></i>
<p>Περιορισμοί</p>
</div>
<table class="user_constraints">
<tr>
<td><i class="fa fa-user-md"></i></td>
<td> Προβολή Εξετάσεων Παραπεμπόντων Ιατρών: </td>
<td><?php print($ref_phys); ?></td>
</tr>
<tr>
<td><i class="fa fa-medkit"></i></td>
<td> Προβολή Διαγνωστικών Μονάδων: </td>
<td><?php print($mods); ?> </td>
</tr>
<tr>
<td><i class="fa fa-stethoscope"></i></td>
<td> Εξαίρεση Σταθμών Διαγνωστικών Μονάδων: </td>
<td><?php print($stations); ?> </td>
</tr>
<tr>
<td><i class="fa fa-male"></i></td>
<td> Προβολή Εξετάσεων Μερών Σώματος: </td>
<td> <?php print($body_part); ?></td>
</tr>
<tr>
<td><i class="fa fa-hospital-o"></i></td>
<td> Προβολή Εξετάσεων Τμημάτων: </td>
<td><?php print($department); ?> </td>
</tr>
</table>
</div>
<?php } ?>
</body>
</html>

Event Timeline