<?php
require_once("functions.php");
require_once("inc_sicurezza_login.php");
$array_crediti = array("id_rivenditore" => $id_user_logged);
$query_crediti = "SELECT username, crediti FROM rivenditori WHERE id_rivenditore=:id_rivenditore LIMIT 1";
list($status_crediti,$contenuto_crediti,$nrows_crediti) = read_db_pdo($query_crediti,$array_crediti);
if (($permessi_user_logged == "6923e6c01ef0afda823f8a4085890079") OR ($permessi_user_logged == "7f1ceb7c8aedd46408b3ea1796aa44a6")){
	$crediti_visualizzati = "∞";
	$username_visualizzato = $contenuto_crediti[0]["username"];
}else{
	
	$crediti_visualizzati = $contenuto_crediti[0]["crediti"];
	$username_visualizzato = $contenuto_crediti[0]["username"];
}
?>
<!DOCTYPE html>
<html lang="it">

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>PANNELLO - IMPULSE TV</title>
  <!-- base:css -->
  <link rel="stylesheet" href="vendors/mdi/css/materialdesignicons.min.css">
  <link rel="stylesheet" href="vendors/css/vendor.bundle.base.css">
  <!-- endinject -->
  <!-- plugin css for this page -->
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="css/vertical-layout-light/style.css">
  <!-- endinject -->
  <link rel="shortcut icon" href="./images/impulse.svg" />
   <script src="vendors/js/vendor.bundle.base.js"></script>
</head>

<body class="sidebar-fixed">
  <div class="container-scroller">
    <!-- partial:../../partials/_navbar.html -->
    <nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
      <div class="text-center navbar-brand-wrapper d-flex align-items-center"style="background: #000000">
        <a class="navbar-brand brand-logo" href="#"><img src="./images/now.svg" width="10px" alt="logo"/></a>
        <a class="navbar-brand brand-logo-mini" href="#"><img src="./images/now.svg" width="10px" alt="logo"/></a>
      </div>
      <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end" style="background: #000000";>
        <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
          <span class="mdi mdi-menu"></span>
        </button>
        <ul class="navbar-nav mr-lg-2">
          <li class="nav-item nav-search d-none d-lg-block">

          </li>
        </ul>
        <ul class="navbar-nav navbar-nav-right">
		<li class="nav-item dropdown">
			<a class="nav-link" >
			<div class="badge badge-outline-info"><?php echo $username_visualizzato;?></div>
			</a>
          </li>
		  <li class="nav-item dropdown">

          </li>
          <li class="nav-item nav-profile dropdown">
            <a class="nav-link" >
              <div class="badge badge-outline-danger">CREDITI<div id="crediti_top" name="crediti_top"><?php echo $crediti_visualizzati;?></div></div>
            </a>
          </li>
		  <li class="nav-item nav-profile dropdown"></li>
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas"style="background: white">
          <span class="mdi mdi-menu"span> 
        </button>
      </div>
    </nav>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
	    
