<?php 
     session_start();
     
     if(!isset($_SESSION['password']) or !isset($_SESSION['password']) or $_SESSION['passUser'] != 'ty73bhtgm352edr4') 
     {
	 echo '
         
         <div style="background: url(imagens/bg7.jpg); background-size:cover; color: #F28401; height: 100%; width: 100%;font-size:12px;margin:0 auto; text-align:center;padding-top:5px;">

            <p style="font-size:30px;padding-top:80px;">LEAD MANAGER </p>
            <p style="font-size:16px; color:#933C12;">Maria Helena</p>


         <p>Efetuar login</p>
         <div style="margin:0 auto; width:250px; text-align:right;">
         <form action="ValidaPassword.php" method="post" >
             <div>Utilizador: <input type="text" name="user" value=""></div>
             <div style="margin-top:5px">Password: <input type="text" name="pass" value=""> </div>

             <input type="submit" name="submit" value="Aceder" style="margin-top:10px">
         </form></div></div>';

	 exit();
     }
     else
     {
          $per = explode(",", $_SESSION['password']);
          $idUser = $per[0];
          $nameUser = $per[1];
          $nivelUser=$per[3];
     }

?>


<html>

<head>
        <link rel="stylesheet" type="text/css" href="style.css">
    	<script language="javascript" type="text/javascript" src="jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="dados.js" charset="UTF-8"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="icon" type="image/x-icon" href="https://bma24.com/MariaHelena/imagens/favicon.ico">
</head>

<body>

   <div id="combo" style="display:none;">
    <div class="dialogPopup">
      <p>Insira o valor da venda (apenas números são aceites): </p>
      <input type="text" id="valorCombo"><br>
      <p id="CancCompra" style="cursor: pointer">Cancelar</p>
    </div>
   </div>
   <div id="head">
        <div id="head1">
           
        </div>

        <div id="head2">
            <div style="color:#1B7398; font-size:10px;">Operador: <?php echo $nameUser ?> <a href="TerminaSessao.php" style="color:#9dd6ed; font-size:10px;">Log out</a></div>
            <div style="color:#1B7398; font-size:14px; letter-spacing: 1px; margin-top:5px;">LEAD MANAGER</div>
            <div style="color:#1B7398; font-size:16px;">Maria Helena</div>
        </div>
   </div>
   <div style="height: 400px; margin-top: 40px;overflow-y: scroll;" id="conteudo">
   </div>

   <div style="margin-top:5px; text-align: right; width:100%;">
        <img style="cursor: pointer" src="imagens/exel.png" id="exel" height="20" width="20">
   </div>

   <div id="detalhes" style="margin-top:0px; vertical-align:middle">

       <div style="display: inline-block; border-style: solid; border-width: 1px; border-color: #FFFFFF; margin-left:0px;">
           <div style="color: #1B7398; padding-bottom:4px; text-align:center; padding-top: 4px;">
               Anotações
           </div>
              <textarea type="text" id="Anotacoes" style=" padding-top: 15px; padding-left: 15px; background-color:#FFFFFF; width: 400px; height: 100px; overflow-y: scroll;"></textarea>


       </div>

       <div style="display: inline-block; border-style: solid; border-width: 1px; border-color:#FFFFFF; margin-left:30px;">
           <div style="color: #1B7398;  padding-bottom:4px; text-align:center; padding-top: 4px;">
               Histórico
           </div>
           <div id="Historico" style=" padding-top: 15px; padding-left: 15px; background-color:#9DD6ED; width: 400px; height: 85px; overflow-y: scroll;">
            
           </div>
       </div>

<!--
       <div style="display: inline-block; background-color: #13487C; border-style: solid; border-width: 4px; border-color:#e4fb93; margin-left:30px;height: 63px">
           <table style="font-size:12px; width:200px; color:#e4fb93">
              <tr >
                  <td>Total</td>
                  <td>Contactadas</td>
                  <td>Vendas</td>
                  <td>€</td>
              </tr>
              <tr>
                  <td>Hoje</td>
                  <td id="ContUserH" style="font-size:16px; color:#FFFFFF"></td>
                  <td id="VendasUserH" style="font-size:16px; color:#FFFFFF"></td>
                  <td id="VVendasUserH" style="font-size:16px; color:#FFFFFF"></td>
              </tr>
              <tr>
                  <td>Mês</td>
                  <td id="ContUserM" style="font-size:16px; color:#FFFFFF"></td>
                  <td id="VendasUserM" style="font-size:16px; color:#FFFFFF"></td>
                  <td id="VVendasUserM" style="font-size:16px; color:#FFFFFF"></td>
              </tr>
           </table>
       </div>
       
       
    <?php 
         if ($nivelUser==2)
         {
              echo'<div id="Relatorios" style="text-align:center; display: inline-block; border-style: solid;  border-width: 0px; border-color:#e4fb93; width: 100px;height: 20px;background-color: #e4fb93;margin-left:30px;" ><a href="Relatorios.php">Relatórios</a></div>';
         }
    ?>
    
    -->
   </div>





</body>

</html>