<?php
session_start();

if (!isset($_SESSION['eggzie_iboPlayer'])) {
    header('location:login.php');
    exit();
}

if(isset($_POST['app_dns'])){
    file_put_contents("app_dns", $_POST['app_dns']);
    file_put_contents("app_url", $_POST['app_url']);
}

$IIIIIIIlI1lI = $_SESSION['id'];
$IIIIIIIlI1ll = new SQLite3('a/.eggziepanels.db');
$IIIIIIIlI1l1 = $IIIIIIIlI1ll->query('SELECT * FROM USERS WHERE id=\'1\'');
$IIIIIIIlI11I = $IIIIIIIlI1l1->fetchArray();
$IIIIIIIlI11l = $IIIIIIIlI11I['NAME'];
$IIIIIIIlI111 = $IIIIIIIlI11I['LOGO'];
echo '<!DOCTYPE html>'."\n";
echo '<html lang="en">'."\n";
echo "\n";
echo '<head>'."\n";
echo "\n";
$IIIIIIIllIII = file_get_contents('includes/eggzie.json');
$IIIIIIIllIIl = json_decode($IIIIIIIllIII,true);
$IIIIIIIllII1 = $IIIIIIIllIIl['info'];
$IIIIIIIllIlI = $IIIIIIIllII1['aa'];
echo '  <meta charset="utf-8">'."\n";
echo '  <meta http-equiv="X-UA-Compatible" content="IE=edge">'."\n";
echo '  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">'."\n";
echo '  <meta name="description" content="">'."\n";
echo '  <meta name="author" content="">'."\n";
echo '  <meta name="google" content="notranslate">'."\n";
echo '  <script src="https://kit.fontawesome.com/3794d2f89f.js" crossorigin="anonymous"></script>'."\n";
echo '  <title>Ultra IBO</title>'."\n";
echo '  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">'."\n";
echo '  <link rel="icon" href="favicon.ico" type="image/x-icon">'."\n";
echo '  <!-- Custom styles for this template-->'."\n";
echo '  <link href="css/sb-admin-'.$IIIIIIIllIlI .'.css" rel="stylesheet">'."\n";
echo '  <link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.min.css"/>'."\n";
echo '  <!-- Custom fonts for this template-->'."\n";
echo '  <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">'."\n";
echo '  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">'."\n";
echo ' '."\n";
echo '</head> '."\n";
echo '<body id="page-top">'."\n";
echo "\n";
echo '  <!-- Page Wrapper -->'."\n";
echo '  <div id="wrapper">'."\n";
echo "\n";
echo '    <!-- Sidebar -->'."\n";
echo '    <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">'."\n";
echo "\n";
if ($IIIIIIIlI111 != NULL) {
echo '      <!-- Sidebar - Brand -->'."\n";
echo '      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="colour.php">'."\n";
echo '        <div class="sidebar-brand-icon">'."\n";
echo '          <img class="img-profile" width="65px" src="'.$IIIIIIIlI111 .'">'."\n";
echo '        </div>'."\n";
}
else {
echo '      <!-- Sidebar - Brand -->'."\n";
echo '      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="colour.php">'."\n";
echo '        <div class="sidebar-brand-icon">'."\n";
echo '          <img class="img-profile" width="65px" src="img/logo.png">'."\n";
echo '        </div>'."\n";
}
echo "\n";
echo '      </a>'."\n";
echo "\n";
echo '      <!-- Divider -->'."\n";
echo '      <hr class="sidebar-divider my-0">'."\n";
echo "\n";
echo '      <!-- Nav Item -->'."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="users.php">'."\n";
echo '          <i class="fas fa-fw fa-user-plus"></i>'."\n";
echo '          <span>Users</span></a>'."\n";
echo '      </li>'."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="theme.php">'."\n";
echo '          <i class="fas fa-fw fa-paint-brush"></i>'."\n";
echo '          <span>Themes</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="note.php">'."\n";
echo '          <i class="fas fa-fw fa fa-bullhorn"></i>'."\n";
echo '          <span>Notifications</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="update.php">'."\n";
echo '          <i class="fas fa-fw fa fa-refresh"></i>'."\n";
echo '          <span>Apk Update</span></a>'."\n";
echo '      </li>'."\n";
echo "\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="snoop.php">'."\n";
echo '          <i class="fas fa-fw fa-eye"></i>'."\n";
echo '          <span>Snoop</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="profile.php">'."\n";
echo '          <i class="fas fa-fw fa-user"></i>'."\n";
echo '          <span>Profile</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '    '."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="https://appsnscripts.com/" target="_blank">'."\n";
echo '          <i class="fas fa-fw fa fa-dot-circle-o"></i>'."\n";
echo '          <span>Support</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">'."\n";
echo '          <i class="fas fa-fw fa-cloud"></i>'."\n";
echo '          <span>Cloud</span>'."\n";
echo '        </a>'."\n";
echo '        <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">'."\n";
echo '        <div class="bg-white py-2 collapse-inner rounded">'."\n";
echo '            <h6 class="collapse-header">Cloud Uploads:</h6>'."\n";
echo '        <a class="collapse-item" href="https://db.tt" target="_blank"><i class="fas fa-fw fa-share"></i><span> DropBox</span></a>'."\n";
echo '        <a class="collapse-item" href="https://mega.nz/" target="_blank"><i class="fas fa-fw fa-share"></i><span> Mega</span></a>'."\n";
echo '          </div>'."\n";
echo '        </div>'."\n";
echo '      </li>'."\n";
echo "\n";
echo '      <li class="nav-item">'."\n";
echo '        <a class="nav-link" href="logout.php">'."\n";
echo '          <i class="fas fa-fw fa fa-sign-out"></i>'."\n";
echo '          <span>Logout</span></a>'."\n";
echo '      </li>'."\n";
echo '      '."\n";
echo '      <!-- Divider -->'."\n";
echo '      <hr class="sidebar-divider d-none d-md-block">'."\n";
echo "\n";
echo '      <!-- Sidebar Toggler (Sidebar) -->'."\n";
echo '      <div class="text-center d-none d-md-inline">'."\n";
echo '        <button class="rounded-circle border-0" id="sidebarToggle"></button>'."\n";
echo '      </div>'."\n";

$app_dns = file_get_contents('app_dns');
$app_url = file_get_contents('app_url');

echo "<div>
    <form method='POST'>
        <b>Dados do App</b><br><br>
        <label>DNS</label>
        <input class='form-control' type='text' name='app_dns' placeholder='DNS' value='$app_dns'/><br>
        <label>URL</label>
        <input class='form-control' type='text' name='app_url' placeholder='URL' value='$app_url' /><br>
        <button class='btn btn-success'>Salvar</button>
    </form>
    </div>";

echo "\n";
echo '    </ul>'."\n";
echo '    <!-- End of Sidebar -->'."\n";
echo "\n";
echo '    <!-- Content Wrapper -->'."\n";
echo '    <div id="content-wrapper" class="d-flex flex-column">'."\n";
echo "\n";
echo '      <!-- Main Content -->'."\n";
echo '      <div id="content">'."\n";
echo "\n";
echo '        <!-- Topbar -->'."\n";
echo '        <nav class="navbar navbar-expand navbar-light  topbar mb-4 static-top shadow">'."\n";
echo "\n";
echo '          <!-- Sidebar Toggle (Topbar) -->'."\n";
echo '          <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">'."\n";
echo '            <i class="fa fa-bars"></i>'."\n";
echo '          </button>'."\n";
echo '<div><h5 class="m-0 text-primary">Ultra IBO<br>'.$IIIIIIIlI11l .' </br></h5></div>'."\n";
echo "\n";
echo '          <!-- Topbar Navbar -->'."\n";
echo '          <ul class="navbar-nav ml-auto">'."\n";
echo "\n";
echo "\n";
echo '            <div class="topbar-divider d-none d-sm-block"></div>'."\n";
echo "\n";
echo '            <!-- Nav Item - Logout -->'."\n";
echo '            <li class="nav-item dropdown no-arrow mx-1">'."\n";
echo '              <a class="nav-link dropdown-toggle" href="logout.php"><span class="badge badge-danger">Logout</span>'."\n";
echo '                <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-red-400"></i>'."\n";
echo '              </a>'."\n";
echo '            </li>'."\n";
echo "\n";
echo '          </ul>'."\n";
echo "\n";
echo '        </nav>'."\n";
echo '        <!-- End of Topbar -->'."\n";
echo "\n";
?>
