<?php
session_start();
if (!isset($_SESSION['eggzie_iboPlayer'])) {
    header('location:login.php');
    exit();
}
$IIIIIIIlI1lI = $_SESSION['id'];
$IIIIIIIlI1ll = new SQLite3('./a/.eggziepanels.db');
$adb = new SQLite3('./api/.adb.db');
$IIIIIIIlI1l1 = $IIIIIIIlI1ll->query('SELECT * FROM USERS WHERE id=\'1\'');
$IIIIIIIlI11I = $IIIIIIIlI1l1->fetchArray();
$IIIIIIIlI11l = $IIIIIIIlI11I['NAME'];
$IIIIIIIlI111 = $IIIIIIIlI11I['LOGO'];
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<?php
$IIIIIIIllIII = file_get_contents('./includes/eggzie.json');
$IIIIIIIllIIl = json_decode($IIIIIIIllIII, true);
$IIIIIIIllII1 = $IIIIIIIllIIl['info'];
$IIIIIIIllIlI = $IIIIIIIllII1['aa'];
?>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <meta name="google" content="notranslate">
  <title>Ultra IBO - Dashboard</title>
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
  <link rel="icon" href="favicon.ico" type="image/x-icon">
  <link href="css/sb-admin-<?php echo $IIIIIIIllIlI; ?>.css" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.min.css"/>
  <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
  <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
  <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,600,700" rel="stylesheet">
  
  <style>
    :root {
        --azul-escuro: #0f172a;
        --azul-celeste: #0ea5e9;
        --azul-claro: #38bdf8;
        --bg-panel: #f8fafc;
    }
    body {
        font-family: 'Poppins', sans-serif;
        background-color: var(--bg-panel);
    }
    #accordionSidebar {
        background: linear-gradient(180deg, var(--azul-escuro) 0%, #1e293b 100%) !important;
    }
    .sidebar-dark .nav-item .nav-link {
        color: rgba(255, 255, 255, 0.8);
    }
    .sidebar-dark .nav-item .nav-link:hover {
        color: var(--azul-celeste);
    }
    .sidebar-dark .nav-item.active .nav-link {
        color: var(--azul-celeste);
        font-weight: 700;
    }
    .topbar {
        background-color: #fff !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    .text-primary {
        color: var(--azul-celeste) !important;
    }
    .btn-primary {
        background-color: var(--azul-celeste) !important;
        border-color: var(--azul-celeste) !important;
    }
    .btn-primary:hover {
        background-color: var(--azul-escuro) !important;
        border-color: var(--azul-escuro) !important;
    }
    .card-header {
        background-color: #fff !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    }
    .border-left-primary {
        border-left: .25rem solid var(--azul-celeste) !important;
    }
    /* Dashboard Cards */
    .dash-card {
        border-radius: 15px;
        transition: transform 0.3s;
        border: none;
    }
    .dash-card:hover {
        transform: translateY(-5px);
    }
    .icon-box {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-bottom: 15px;
    }
    .bg-celeste-light { background-color: rgba(14, 165, 233, 0.1); color: var(--azul-celeste); }
    .bg-escuro-light { background-color: rgba(15, 23, 42, 0.1); color: var(--azul-escuro); }
  </style>
</head>
<body id="page-top">
  <div id="wrapper">
    <ul class="navbar-nav sidebar sidebar-dark accordion" id="accordionSidebar">
      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="users.php">
        <div class="sidebar-brand-icon">
          <img class="img-profile" width="50px" src="<?php echo $IIIIIIIlI111 ? $IIIIIIIlI111 : 'img/logo.png'; ?>" style="border-radius: 50%;">
        </div>
        <div class="sidebar-brand-text mx-3">Ultra IBO</div>
      </a>
      <hr class="sidebar-divider my-0">
      
      <li class="nav-item active">
        <a class="nav-link" href="users.php">
          <i class="fas fa-fw fa-tachometer-alt"></i>
          <span>Dashboard</span></a>
      </li>
      
      <div class="sidebar-heading">Gerenciamento</div>
      
      <li class="nav-item">
        <a class="nav-link" href="mRTXBGImage.php">
          <i class="fas fa-fw fa-image"></i>
          <span>Imagens de Fundo</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="mRTXBGlogo.php">
          <i class="fas fa-fw fa-smile"></i>
          <span>Alterar Logo</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="mRTXBGads.php">
          <i class="fas fa-fw fa-ad"></i>
          <span>Anúncios</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="mRTXBGnotes.php">
          <i class="fas fa-fw fa-comment-alt"></i>
          <span>Mensagens / Avisos</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="mRTXBGlayouts.php">
          <i class="fas fa-fw fa-th-large"></i>
          <span>Layouts</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="profile.php">
          <i class="fas fa-fw fa-user-cog"></i>
          <span>Perfil</span></a>
      </li>
      
      <hr class="sidebar-divider">
      <li class="nav-item">
        <a class="nav-link" href="logout.php">
          <i class="fas fa-fw fa-sign-out-alt"></i>
          <span>Sair</span></a>
      </li>
      <hr class="sidebar-divider d-none d-md-block">
      <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
      </div>
    </ul>

    <div id="content-wrapper" class="d-flex flex-column">
      <div id="content">
        <nav class="navbar navbar-expand navbar-light topbar mb-4 static-top shadow">
          <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
            <i class="fa fa-bars"></i>
          </button>
          <div class="d-none d-sm-inline-block mr-auto ml-md-3 my-2 my-md-0 mw-100">
            <h1 class="h4 mb-0 text-gray-800">Painel Administrativo</h1>
          </div>
          <ul class="navbar-nav ml-auto">
            <div class="topbar-divider d-none d-sm-block"></div>
            <li class="nav-item dropdown no-arrow">
              <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small"><?php echo $IIIIIIIlI11l; ?></span>
                <img class="img-profile rounded-circle" src="<?php echo $IIIIIIIlI111 ? $IIIIIIIlI111 : 'img/logo.png'; ?>" width="30">
              </a>
            </li>
          </ul>
        </nav>
