Skip to content

Commit

Permalink
Resolvendo [#201]
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolly015 committed Jun 26, 2024
1 parent 1299d63 commit 8eabbe5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion html/socio/sistema/controller/import_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<?php
try {
if(isset($_SESSION['id_pessoa']) and !empty($_SESSION['id_pessoa'])){
$foto = $pessoa['imagem'];
if($foto != null and $foto != "")
$foto = 'data:image;base64,'.$foto;
if(preg_match('/^data:image\/[a-zA-Z]+;base64,/', $foto))
$foto = htmlspecialchars($foto, ENT_QUOTES, 'UTF-8');
else $foto = WWW."img/semfoto.png";
}

} catch (Exception $e) {
error_log($e->getMessage());
$foto = WWW . "img/semfoto.png";
}
?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?php echo($foto); ?>" class="user-image" alt="User Image">
Expand Down

0 comments on commit 8eabbe5

Please sign in to comment.