<?php
session_start();
$db = new SQLite3('api/.db.db');
$log_check = $db->query("SELECT * FROM users");
//$log_check = $db->query("SELECT * FROM users WHERE id='1'");
$roe = $log_check->fetchArray();
$curr = basename($_SERVER['PHP_SELF']);
$page = substr($curr, 0, 3);

if (!isset($_SESSION['loggedinlive'])) {
	header("location:"."index.php");
	exit();
}
?>
<head>
  <meta charset="utf-8" />
  <link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="assets/img/favicon.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>
    XPLAY PAINEL STORE - v2.0
  </title>
  <meta content='width=device-width, initial-scale=1.0, shrink-to-fit=no' name='viewport' />
  <!--     Fonts and icons     -->
  <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
  <!-- CSS Files -->
  <link href="assets/css/material-dashboard.css?v=2.1.2" rel="stylesheet" />
  <!-- CSS Just for demo purpose, don't include it in your project -->
  <link href="assets/demo/demo.css" rel="stylesheet" />
</head>

<body class="">
  <div class="wrapper">
    <div class="sidebar" data-color="purple" data-background-color="white" data-image="assets/img/sidebar-1.jpg">
      <div class="logo"><a href="key.php" class="simple-text logo-normal">
          <img src="assets/img/logo.png" width="150"><br>
		   <h5>Bem vindo, <b><?php echo($_SESSION['name'])?>!</h5>
        </a></div>
      <div class="sidebar-wrapper">
        <ul class="nav">
          <li class="nav-item ">
            <a class="nav-link" href="key.php">
              <i class="material-icons">dashboard</i>
              <p>LOJA</p>
            </a>
          </li><!--
          <li class="nav-item ">
            <a class="nav-link" href="notificacoes.php">
              <i class="material-icons">notifications</i>
              <p>Notificações</p>
            </a>-->
		    <li class="nav-item ">
            <a class="nav-link" href="usuario.php">
              <i class="material-icons">person</i>
              <p>Usuários</p>
            </a>
          </li>
		    <li class="nav-item ">
            <a class="nav-link" href="#">
              <i class="material-icons">android</i>
              <p>Baixar APK</p>
            </a>
          </li>
		    <li class="nav-item ">
            <a class="nav-link" href="logs.php">
              <i class="material-icons">content_paste</i>
              <p>Logs do Sistema</p>
            </a>
          </li>
          <li class="nav-item ">
            <a class="nav-link" href="logout.php">
              <i class="material-icons">logout</i>
              <p>Sair</p>
            </a>
          </li>
        </ul>
      </div>
    </div>