-
Notifications
You must be signed in to change notification settings - Fork 1
/
view_user.php
72 lines (65 loc) · 3.36 KB
/
view_user.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
require_once "inc/head.php";
require_once "crux/printFunctions.php";
if (isset($_GET['id'])) $id = $_GET['id'];
else $id = $_SESSION['user_id'];
$gest->getUserData($id);
extract($gest->results[0]);
if(strlen($photo)==0) $photo = "https://via.placeholder.com/150x150.png?text=Foto";
else $photo = "file/personal_photos/".$photo;
?>
<div id="maincontent">
<div class="container">
<br>
<?php if($gest->checkSuperUser()){
echo "<h1>".restring("Dati Utente <a href='crud_user.php?sec=op&id=".$id."'>%admin%</a>")."</h1>";
}else{
echo "<h1>Dati Utente</h1>";
}?>
<br />
<div class="anag"><h4><?php if($gest->checkSuperUser() && $photo_updated) echo restring("%alert_updated% "); echo restring("Foto Tessera <a href='crud_user.php?sec=photo&id=".$id."'>%edit%</a>")?></h4><p><img src="<?php echo $photo ?>" title="Foto Tessera" class="photo"/></p></div>
<div class="anag"><h4><?php if($gest->checkSuperUser() && $anag_updated) echo restring("%alert_updated% "); echo restring("Dati Anagrafici <a href='crud_user.php?sec=anag&id=".$id."'>%edit%</a>")?></h4><p>Cognome: <?php echo $cognome?></p><p>Nome: <?php echo $nome?></p><p>Codice Fiscale:<?php echo $CF?></p><p>Nato/a a <?php echo $nascita_citta.", (".$nascita_pr.")"?> il <?php echo printField($nascita)?></p></div>
<div class="res">
<?php
if(strlen($domicilio)>0){
?>
<h4><?php if($gest->checkSuperUser() && $res_updated) echo restring("%alert_updated% "); echo restring("Residenza <a href='crud_user.php?sec=res&id=".$id."'>%edit%</a>")?></h4>
<?php
}else{
?>
<h4><?php if($gest->checkSuperUser() && $res_updated) echo restring("%alert_updated% "); echo restring("Residenza e Domicilio <a href='crud_user.php?sec=resdom&id=".$id."'>%edit%</a>")?></h4>
<?php
}
?>
<p><?php echo $indirizzo.", ".$indirizzo_citta.", ".$indirizzo_cap." (".$indirizzo_pr.")"?></p></div>
<?php
if(strlen($domicilio)>0){
?>
<div class="dom"><h4><?php echo restring("Domicilio <a href='crud_user.php?sec=dom&id=".$id."'>%edit%</a>")?></h4><p><?php echo $domicilio.", ".$domicilio_citta.", ".$domicilio_cap." (".$domicilio_pr.")"?></p></div>
<?php
}
?>
<div class="contacts"><h4><?php if($gest->checkSuperUser() && $cont_updateda) echo restring("%alert_updated% "); echo restring("Contatti <a href='crud_user.php?sec=cont&id=".$id."'>%edit%</a>")?></h4><p>Tel: <?php echo $tel?></p><p>Mail: <?php echo $mail?></p></div>
<div class="asso">
<h4>Dati Associativi</h4>
<p>Numero Socio: <?php echo printField($numero_socio) ?></p>
<p>Data Iscrizione: <?php echo printField($iscrizione[0]['giorno']); ?></p>
<p>Data Dimissione: <?php echo printField($dimissione[0]['giorno']); ?></p>
</div>
<?php if($gest->checkSuperUser()){
echo"
<div class='op'>
<h4>Dati Gestionali</h4>
<p>Utente Master: ".printField($master)."</p>
<p>Operativo: ".printField($operativo)."</p>
</div>
";
}
if($gest->checkEditedUser($id)){
echo "
<a class='btn btn-warning btn-user-updated' href='crud_user.php?action=confirm_user&id=$id'>Utente Aggiornato!</a>
";
}
?>
</div>
</div>