<?php

session_start();
include 'assets/includes/db.php';
include 'assets/includes/config.php';

if ($_ERRORS) {
	error_reporting(E_ALL);
	ini_set('display_errors', 1);
}
if (!isset($_SESSION['loggedin']) && !$_SESSION['loggedin']) {
	header('location: logout.php');
}

echo '<!doctype html>' . "\r\n" . '<html lang="en">' . "\r\n\r\n" . '<head>' . "\r\n\r\n" . '    ';
include 'assets/includes/title-meta.php';
echo "\r\n" . '    ';
include 'assets/includes/head-css.php';
echo "\r\n" . '</head>' . "\r\n\r\n" . '<body data-sidebar="dark">' . "\r\n\r\n" . '    <!-- Loader -->' . "\r\n" . '    <div id="preloader">' . "\r\n" . '        <div id="status">' . "\r\n" . '            <div class="spinner">' . "\r\n" . '                <i class="ri-loader-line spin-icon"></i>' . "\r\n" . '            </div>' . "\r\n" . '        </div>' . "\r\n" . '    </div>' . "\r\n\r\n" . '    <div id="layout-wrapper">' . "\r\n\r\n" . '        ';
include 'assets/includes/topbar.php';
echo "\r\n" . '        ';
include 'assets/includes/sidebar.php';
echo "\r\n" . '        <div class="main-content">' . "\r\n\r\n" . '            <div class="page-content">' . "\r\n" . '                <div class="container-fluid">' . "\r\n\r\n" . '                    <div class="row">' . "\r\n" . '                        <div class="col-12">' . "\r\n" . '                            <div class="page-title-box d-flex align-items-center justify-content-between">' . "\r\n" . '                                <h4 class="mb-0"> </h4>' . "\r\n\r\n" . '                                <div class="page-title-right">' . "\r\n" . '                                    <ol class="breadcrumb m-0">' . "\r\n" . '                                        <li class="breadcrumb-item"><a href="javascript: void(0);">OTTRun XCIPTV</a></li>' . "\r\n" . '                                        <li class="breadcrumb-item active">Command Center</li>' . "\r\n" . '                                    </ol>' . "\r\n" . '                                </div>' . "\r\n\r\n" . '                            </div>' . "\r\n" . '                        </div>' . "\r\n" . '                    </div>' . "\r\n\r\n" . '                    <div class="row">' . "\r\n" . '                        <div class="col-12">' . "\r\n" . '                            <div class="card">' . "\r\n" . '                                <div class="card-body">' . "\r\n\r\n" . '                                    <h4 class="card-title">Remote Command Center</h4>' . "\r\n" . '                                    <p class="card-title-desc">Control your applications remotely from a the panel.</p>' . "\r\n\r\n" . '                                    <br />' . "\r\n\r\n" . '                                    <div class="col-12 d-flex mx-auto">' . "\r\n\r\n" . '                                        <div class="card-body">' . "\r\n" . '                                            <div class="col-md-12">' . "\r\n\r\n" . '                                                    <div class="card-body">' . "\r\n" . '                                                        <h4 class="text-dark" id="userselectd">Please select a user</h4></span>' . "\r\n" . '                                                        <button class="btn btn-success mb-1 ort_btn_get_info">Get App/Device Info</button>' . "\r\n" . '                                                        <button class="btn btn-dark mb-1 ort_btn_reset_player_settings">Reset Players Settings</button>' . "\r\n" . '                                                        <button class="btn btn-secondary mb-1 ort_btn_reset_parental_password">Parental Pass' . "\r\n" . '                                                            Reset</button>' . "\r\n" . '                                                        <button class="btn btn-warning mb-1 ort_btn_delete_cache">Clear Cache</button>' . "\r\n" . '                                                        <button class="btn btn-primary mb-1 ort_btn_restart_app">Restart App</button>' . "\r\n" . '                                                        <button id="unbanuserbtn" class="btn btn-success mb-1 ort_btn_unban_user">Unban User</button>' . "\r\n" . '                                                        <button id="banuserbtn" class="btn btn-danger mb-1 ort_btn_ban_user">Ban User</button>' . "\r\n\r\n" . '                                                        <div id="msg_div" class="alert alert-secondary mt-2" role="alert">' . "\r\n" . '                                                            <br>' . "\r\n" . '                                                        </div>' . "\r\n" . '                                                    </div>' . "\r\n\r\n" . '                                                <div class="row">' . "\r\n" . '                                                    <div class="card col-md-12">' . "\r\n" . '                                                        <br>' . "\r\n" . '                                                        <table id="datatable1" class="table table-bordered">' . "\r\n" . '                                                            <thead>' . "\r\n" . '                                                                <tr>' . "\r\n" . '                                                                    <th>Username</th>' . "\r\n" . '                                                                    <th>IP</th>' . "\r\n" . '                                                                    <th>Agent</th>' . "\r\n" . '                                                                    <th>App Name</th>' . "\r\n" . '                                                                    <th>Version</th>' . "\r\n" . '                                                                    <th>Banned</th>' . "\r\n" . '                                                                    <th>Time (UTC)</th>' . "\r\n" . '                                                                    <th>Actions</th>' . "\r\n" . '                                                                </tr>' . "\r\n" . '                                                            </thead>' . "\r\n" . '                                                            <tbody>' . "\r\n" . '                                                        </table>' . "\r\n" . '                                                        <br>' . "\r\n" . '                                                    </div>' . "\r\n" . '                                                </div>' . "\r\n\r\n" . '                                                <div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel">' . "\r\n" . '                                                    <div class="modal-dialog" role="document">' . "\r\n" . '                                                        <div class="modal-content">' . "\r\n" . '                                                            <div class="modal-header">' . "\r\n" . '                                                                <h3 class="modal-title text-danger" id="myModalLabel">Error!</h3>' . "\r\n" . '                                                            </div>' . "\r\n" . '                                                            <div class="modal-body">' . "\r\n" . '                                                                <h4>Please select a user first!</h4>' . "\r\n" . '                                                            </div>' . "\r\n" . '                                                            <div class="modal-footer">' . "\r\n" . '                                                                <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>' . "\r\n" . '                                                            </div>' . "\r\n" . '                                                        </div>' . "\r\n" . '                                                    </div>' . "\r\n" . '                                                </div>' . "\r\n\r\n" . '                                            </div>' . "\r\n" . '                                        </div>' . "\r\n\r\n" . '                                    </div>' . "\r\n" . '                                </div>' . "\r\n" . '                            </div>' . "\r\n" . '                        </div>' . "\r\n" . '                    </div>' . "\r\n\r\n" . '                </div>' . "\r\n" . '            </div>' . "\r\n\r\n" . '            ';
include 'assets/includes/footer.php';
echo '        </div>' . "\r\n\r\n" . '    </div>' . "\r\n\r\n" . '    ';
include 'assets/includes/right-sidebar.php';
echo "\r\n" . '    ';
include 'assets/includes/vendor-scripts.php';
echo "\r\n" . '    <script src="./assets/js/app.js"></script>' . "\r\n\r\n" . '</body>' . "\r\n\r\n" . '</html>';

?>