<?php
/**
*
* @ This file is created by http://DeZender.Net
* @ deZender (PHP7 Decoder for SourceGuardian Encoder)
*
* @ Version			:	4.1.0.1
* @ Author			:	DeZender
* @ Release on		:	29.08.2020
* @ Official site	:	http://DeZender.Net
*
*/

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require 'check.php';

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

$ifofuser = $_SESSION['id'];
$db_header = new SQLite3('./a/.eggziepanels.db');
$res_header = $db_header->query('SELECT * ' . "\n\t\t\t\t" . '  FROM USERS ' . "\n\t\t\t\t" . '  WHERE id=\'' . $ifofuser . '\'');
$row_header = $res_header->fetchArray();
$name_header = $row_header['NAME'];
$logo_header = $row_header['LOGO'];
$jsondata111 = file_get_contents('./includes/eggzie.json');
$json111 = json_decode($jsondata111, true);
$col1 = $json111['info'];
$panel_name = $col1['a'];
$headerfav_icon = $col1['c'];
$colname = $col1['uu'];
$collink = $col1['ww'];
$colicon = $col1['yy'];
$colinc5 = $col1['a5'];
$colinc10 = $col1['mm'];
$colinc11 = $col1['oo'];
$colinc12 = $col1['qq'];
$colinc13 = $col1['ss'];
$colinc14 = $col1['tt'];
$colinc15 = $col1['vv'];
$json_colour = $json111['colours'];
$colour_head_2 = $json_colour['bb'];
$colour_head_3 = $json_colour['cc'];
$colour_head_4 = $json_colour['dd'];
$colour_head_5 = $json_colour['ee'];
$colour_head_6 = $json_colour['ff'];
$colour_head_7 = $json_colour['gg'];
$colour_head_8 = $json_colour['hh'];
$colour_head_9 = $json_colour['ii'];
$colour_head_10 = $json_colour['jj'];
$colour_head_11 = $json_colour['kk'];
$colour_head_12 = $json_colour['ll'];
$colour_head_13 = $json_colour['mm'];
$colour_head_14 = $json_colour['nn'];
$colour_head_15 = $json_colour['oo'];
$colour_head_16 = $json_colour['pp'];
$colour_head_17 = $json_colour['qq'];
$colour_head_18 = $json_colour['rr'];
$colour_head_btn = $json_colour['ss'];
$colour_switch_on = $json_colour['tt'];
$colour_switch_off = $json_colour['uu'];
echo '<!DOCTYPE html>' . "\n";
echo '<html lang="en">' . "\n";
echo '<head>' . "\n";
echo "\t" . '<meta charset="utf-8">' . "\n";
echo "\t" . '<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">' . "\n";
echo "\t" . '<meta name="author" content="">' . "\n";
echo '  <script src="https://kit.fontawesome.com/3794d2f89f.js" crossorigin="anonymous"></script>' . "\n";
echo '  <title>' . $panel_name . '</title>' . "\n";
echo '  <link rel="shortcut icon" href="' . $headerfav_icon . '" type="image/x-icon">' . "\n";
echo '  <link rel="icon" href="' . $headerfav_icon . '" type="image/x-icon">' . "\n";
echo "\t" . '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">' . "\n";
echo "\t" . '<link href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css" rel="stylesheet" />' . "\n";
echo "\t" . '<link rel="stylesheet" href="css/bootstrap-datetimepicker.css">' . "\n";
echo "\n";
echo "\t" . '<link href="css/simple-sidebar.css" rel="stylesheet">' . "\n";
echo "\t" . '<link href="css/switch.css" rel="stylesheet" /> ' . "\n";
echo '  <link href="css/sb-admin-2.css" rel="stylesheet">' . "\n";
echo '</head>' . "\n";
echo '<style>' . "\n";
echo '.border-left-primary {border-left: 0.25rem solid ' . $colour_head_4 . ' !important;}';
echo '.card-header {background-color:' . $colour_head_8 . ' !important;}';
echo '.btn-primary {border-color:' . $colour_switch_on . ';background-color:' . $colour_switch_on . ' !important;}';
echo '.btn-light {border-color:' . $colour_switch_off . ';background-color:' . $colour_switch_off . ' !important;}';
echo '.card {border-color:' . $colour_head_9 . ';background-color:' . $colour_head_9 . ';!important;}';
echo '</style>';
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 sidebar sidebar-dark accordion" style="background-color:' . $colour_head_6 . ';" id="accordionSidebar">' . "\n";
echo "\n";
echo '      <!-- Sidebar - Brand -->' . "\n";
echo '      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="#">' . "\n";
echo '        <div class="sidebar-brand-icon">' . "\n";
echo '          <img class="img-profile" width="65px" src="' . $logo_header . '">' . "\n";
echo '        </div>' . "\n";
echo "\n";
echo '      </a>' . "\n";
echo "\n";
echo '      <!-- Divider -->' . "\n";
echo '      <hr class="sidebar-divider my-0">' . "\n";
echo "\n";

if ($ifofuser == '2') {
	echo '      <!-- Nav Item -->' . "\n";
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="admin.php">' . "\n";
	echo '          <i class="fas fa-fw fa-cog" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Panel Control</span></a>' . "\n";
	echo '      </li>' . "\n";
}

echo '      <!-- Nav Item -->' . "\n";
echo '      <li class="nav-item">' . "\n";
echo '        <a class="nav-link" href="dashboard.php">' . "\n";
echo '          <i class="fas fa-fw fa-bars" style="color:' . $colour_head_13 . ';"></i>' . "\n";
echo '          <span style="color:' . $colour_head_7 . ';">Dashboard</span></a>' . "\n";
echo '      </li>' . "\n";
if (($ifofuser == '2') || ($colinc5 == '1')) {
	echo '      <!-- Nav Item -->' . "\n";
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="colours.php">' . "\n";
	echo '          <i class="fas fa-fw fa-paint-brush" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Panel Colours</span></a>' . "\n";
	echo '      </li>' . "\n";
}

if ($ifofuser == '2') {
	echo '      <!-- Nav Item -->' . "\n";
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="error.php">' . "\n";
	echo '          <i class="fas fa-fw fa-ban" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Connection Errors</span></a>' . "\n";
	echo '      </li>' . "\n";
}

if ($colinc12 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="portals.php">' . "\n";
	echo '          <i class="fas fa-fw fa fa-server" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Portals</span></a>' . "\n";
	echo '      </li>' . "\n";
	echo '      ' . "\n";
}

if ($colinc14 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="users.php">' . "\n";
	echo '          <i class="fas fa-fw fa fa-user-plus" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Users</span></a>' . "\n";
	echo '      </li>' . "\n";
	echo '      ' . "\n";
}

if ($colinc15 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="note.php">' . "\n";
	echo '          <i class="fas fa-fw fa fa-newspaper" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Notification</span></a>' . "\n";
	echo '      </li>' . "\n";
	echo '      ' . "\n";
}

if ($colinc13 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="sport.php">' . "\n";
	echo '          <i class="fas fa-fw fa fa-android" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Sport</span></a>' . "\n";
	echo '      </li>' . "\n";
	echo '      ' . "\n";
}

if ($colinc11 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="update.php">' . "\n";
	echo '          <i class="fas fa-fw fa fa-cloud-upload" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Settings</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" style="color:' . $colour_head_13 . ';"></i>' . "\n";
echo '          <span style="color:' . $colour_head_7 . ';">Profile</span></a>' . "\n";
echo '      </li>' . "\n";
echo '      ' . "\n";

if ($colinc10 == '1') {
	echo '      <li class="nav-item">' . "\n";
	echo '        <a class="nav-link" href="snoop.php">' . "\n";
	echo '          <i class="fas fa-fw fa-clock" style="color:' . $colour_head_13 . ';"></i>' . "\n";
	echo '          <span style="color:' . $colour_head_7 . ';">Snoop</span></a>' . "\n";
	echo '      </li>' . "\n";
	echo '      ' . "\n";
}

echo '      <li class="nav-item">' . "\n";
echo '        <a class="nav-link" href="https://google.com" target="_blank">' . "\n";
echo '          <i class="fas fa-fw fa-' . $colicon . '" style="color:' . $colour_head_13 . ';"></i>' . "\n";
echo '          <span style="color:' . $colour_head_7 . ';">Support</span></a>' . "\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" style="color:' . $colour_head_13 . ';"></i>' . "\n";
echo '          <span style="color:' . $colour_head_7 . ';">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";
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" style="background-color:' . $colour_head_5 . ';">' . "\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" style="color:' . $colour_head_14 . ';">' . $panel_name . '<br>' . $name_header . ' </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";
include './includes/config.php';

?>