<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2
 * @ Decoder version: 1.0.4
 * @ Release: 01/09/2021
 */

session_start();
if (!isset($_SESSION["loggedin"])) {
    header("location:login.php");
    exit;
}
$dbboxbr = new SQLite3('./api/data/.boxbr_info.db');
$dbboxbr->exec('CREATE TABLE IF NOT EXISTS actxc(id INTEGER PRIMARY KEY NOT NULL,title VARCHAR(50),activecode VARCHAR(50),macAddress VARCHAR(50),uid VARCHAR(50), apptype VARCHAR(50), appname VARCHAR(50), status VARCHAR(50))');
$dbboxbr->exec('CREATE TABLE IF NOT EXISTS dnsxc(id INTEGER PRIMARY KEY NOT NULL, title VARCHAR(50), url VARCHAR(50), username VARCHAR(50), password VARCHAR(50))');
$dbboxbr->exec('CREATE TABLE IF NOT EXISTS dns(id INTEGER PRIMARY KEY NOT NULL, title VARCHAR(50), url VARCHAR(50))');
$dbboxbr->exec('CREATE TABLE IF NOT EXISTS act(id INTEGER PRIMARY KEY NOT NULL,' . "\t" . 'title VARCHAR(50),activecode VARCHAR(50),macAddress VARCHAR(50),uid VARCHAR(50), username VARCHAR(50), password VARCHAR(50), url VARCHAR(50), apptype VARCHAR(50), appname VARCHAR(50), status VARCHAR(50))');
$mact_count = $dbboxbr->query('SELECT COUNT(*) as count FROM act');
$mact_count = $mact_count->fetchArray();
$mact_count = $mact_count['count'];
$mdns_count = $dbboxbr->query('SELECT COUNT(*) as count FROM dns');
$mdns_count = $mdns_count->fetchArray();
$mdns_count = $mdns_count['count'];
$dbboxbr->close();
echo '<!DOCTYPE html>' . "\r\n" . '<html lang="en">' . "\r\n\r\n" . '<head>' . "\r\n" . '    <title>BoxBR Active TV Manager </title>' . "\r\n" . '    <!-- Meta -->' . "\r\n" . '    <meta charset="utf-8">' . "\r\n" . '    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">' . "\r\n" . '    <meta http-equiv="X-UA-Compatible" content="IE=edge" />' . "\r\n" . '    <meta name="description" content="Panel Apk for TVStream - Developed by BoxBR Apks Rebrand" />' . "\r\n" . '    <meta name="keywords" content="BoxBR,Apks,Rebrand,boxbrapk,panel,painel,apk,app,script">' . "\r\n" . '    <meta name="author" content="BoxBR Apks Rebrand" />' . "\r\n" . '    <!-- Favicon icon -->' . "\r\n\t" . ' <link rel="shortcut icon" href="assets/images/logo-icon.png" type="image/png">' . "\r\n" . '    <link rel="icon" href="assets/images/logo-icon.png" type="image/png">' . "\r\n" . '    <!-- fontawesome icon -->' . "\r\n" . '    <link rel="stylesheet" href="assets/fonts/fontawesome/css/fontawesome-all.min.css">' . "\r\n" . '    <!-- animation css -->' . "\r\n" . '    <link rel="stylesheet" href="assets/plugins/animation/css/animate.min.css">' . "\r\n" . '    <!-- prism css -->' . "\r\n" . '    <link rel="stylesheet" href="assets/plugins/prism/css/prism.min.css">' . "\r\n" . '    <!-- vendor css -->' . "\r\n" . '    <link rel="stylesheet" href="assets/css/style.css">' . "\r\n" . '    <link rel="stylesheet" href="assets/css/layouts/dark.css">' . "\r\n" . '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>' . "\r\n\t" . '<link rel="stylesheet" type="text/css" href="assets/css/jquery.datetimepicker.min.css"/>' . "\r\n\r\n" . '<script src="//code.jquery.com/jquery.min.js"></script>' . "\r\n" . '<script type="text/javascript" src="assets/js.js"></script>' . "\r\n" . '</head>' . "\r\n\r\n" . '<body>' . "\r\n" . '    <!-- [ navigation menu ] start -->' . "\r\n" . '    <nav class="pcoded-navbar menupos-fixed  navbar-dark brand-dark">' . "\r\n" . '        <div class="navbar-wrapper"><center>' . "\r\n" . '            <div align="center" class="navbar-brand header-logo">' . "\r\n" . '                <a href="#" class="b-brand">' . "\r\n" . '                    <img  align="center" src="assets/images/logo.png" width="180px" height="55px" alt="" class="logo images">' . "\r\n" . '                  <!-- --> <img src="assets/images/logo-icon.png" width="35px" height="35px" alt="" class="logo-thumb images"> ' . "\r\n" . '                </a>' . "\r\n" . '                <a class="mobile-menu" id="mobile-collapse" href="#"><span></span></a>' . "\r\n" . '            </div> </center>' . "\r\n" . '            <div class="navbar-content scroll-div">' . "\r\n" . '                <ul class="nav pcoded-inner-navbar"><br>' . "\r\n\t\t\t\t\t" . '<li data-username="sample page" class="nav-item"><a href="dns.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-server" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;DNS Management ';
echo '(' . $mdns_count . ')';
echo '</span></a></li>' . "\r\n\t\t\t\t\t" . '<li data-username="sample page" class="nav-item"><a href="act.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-code" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Code Management ';
echo '(' . $mact_count . ')';
echo '</span></a></li>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t" . '<!--' . "\r\n\t\t\t\t\t" . '<li data-username="basic page" class="nav-item"><a href="intro.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-video" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Intro Video</span></a></li>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t" . '<li data-username="basic page" class="nav-item"><a href="notifications.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-bullhorn" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Notifications</span></a></li>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t" . '<li data-username="basic page" class="nav-item"><a href="update.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-cloud-upload-alt" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Push Update</span></a></li>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n" . '                    <li data-username="Menu levels Menu level 2.1 Menu level 2.2" class="nav-item pcoded-hasmenu">' . "\r\n" . '                        <a href="#!" class="nav-link"><span class="pcoded-micon"><i class="fas fa-tools" style="font-size:20px"></i></span><span class="pcoded-mtext">Panel Tools</span></a>' . "\r\n" . '                        <ul class="pcoded-submenu">' . "\r\n" . '                        </ul>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t" . '-->' . "\r\n\t\t\t\t\t\r\n" . '                     <li class=""><a href="conected.php" class=""><span class="pcoded-micon"><i class="fas fa-satellite-dish" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;API Conected</span></a></li>' . "\r\n" . '                     ' . "\r\n" . '                     <li class=""><a href="update.php" class=""><span class="pcoded-micon"><i class="fas fa-rocket" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Update APK</span></a></li>' . "\r\n" . '                     <li class=""><a href="snoop.php" class=""><span class="pcoded-micon"><i class="fas fa-eye" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Snoop Logs</span></a></li>' . "\r\n" . '                     ' . "\r\n" . '                     <li class=""><a href="edit_user.php" class="nav-link"><span class="pcoded-micon"><i class="fas fa-user-edit" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Edit User / Pass</span></a></li>' . "\r\n" . '                        ' . "\r\n" . '                    </li>' . "\r\n\t\t\t\t\t\r\n\t\t\t\t\t" . '<li alt="';
echo $rowcheckss['USERNAME'];
echo '" data-username="basic page" class="nav-item"><a href="logout.php?logout=';
echo $rowcheckss['USERNAME'];
echo '" class="nav-link" alt="';
echo $rowcheckss['USERNAME'];
echo '"><span class="pcoded-micon"><i class="fas fa-sign-out-alt" style="font-size:20px"></i></span><span class="pcoded-mtext">&nbsp;&nbsp;Logout ( ';
echo $rowcheckss['USERNAME'];
echo ' ) </span></a></li>' . "\r\n\t\t\t\t\t\r\n" . '                    ' . "\r\n" . '                    ' . "\r\n" . '                </ul>' . "\r\n" . '            </div>' . "\r\n" . '        </div>' . "\r\n" . '    </nav>' . "\r\n" . '    <!-- [ navigation menu ] end -->' . "\r\n" . '    <!-- [ Header ] start -->' . "\r\n" . '    <header class="navbar navbar-dark brand-dark pcoded-header navbar-expand-lg headerpos-fixed">' . "\r\n" . '        <div class="m-header">' . "\r\n" . '            <a class="mobile-menu" id="mobile-collapse1" href="#"><span></span></a>' . "\r\n" . '            <a href="dns.php" class="b-brand">' . "\r\n" . '             <img src="assets/images/logo.png" width="120px" height="35px" alt="" class="logo images"></center>' . "\r\n" . '                        <img src="assets/images/logo-icon.png" width="35px" height="35px" alt="';
echo $rowcheckss['USERNAME'];
echo '" class="logo-thumb images">&nbsp;&nbsp; Welcome: ';
echo $rowcheckss['USERNAME'];
echo '            </a>' . "\r\n" . '            ' . "\r\n" . '        </div>' . "\r\n" . '    </header>' . "\r\n" . '    <!-- [ Header ] end -->';

?>
?>