<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
      crossorigin="anonymous"
    />
    <link rel="stylesheet" href="./css/user.css" />
    <title><%= name%> <%= surename%></title>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
      <div class="container-fluid">
        <a class="navbar-brand" href="/"><strong>HOME</strong></a>
        <a
          class="navbar-brand"
          href="/information"
          target="_blank"
          id="info_top"
          ><strong>Informações de Preenchimento</strong></a
        >
        <form class="d-flex" method="GET" action="/logout">
          <input class="form-control me-2" type="hidden" />
          <button class="btn btn-danger" type="submit">LOG OUT</button>
        </form>
      </div>
    </nav>
    
    <div class="container">
      <div id="img_user">
        <% if(img_path) { %>
        <img src="<%= img_path %>" alt="cov_logo" height="250" />
        <% } else { %>
        <h3>No picture available!</h3>
        <% } %>
      </div>
      <br /><br />
      <div id="info">
        <h4><strong>Name:</strong> <%= name %></h4>
        <h4><strong>Surename:</strong> <%= surename %></h4>
        <h4><strong>Affiliation:</strong> <%= affiliation %></h4>
        <h4><strong>CRM:</strong> <%= crg %></h4>
        <h4><strong>State:</strong> <%= state %></h4>
        <h4><strong>Email:</strong> <%= email %></h4>
      </div>
      <div>
        <form action="/research" method="POST">
          <input type="hidden" name="username" value="<%= username %>"/>
          <button class="btn btn-lg btn-primary">INICIAR PESQUISA</button>
        </form>
      </div>
      <h1><%= msg %></h1>
    </div>
    <script
      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
      integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
      crossorigin="anonymous"
    ></script>
  </body>
</html>
