<?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
*
*/

require 'includes/check.php';
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$ifofuser = $_SESSION['id'];

if ($ifofuser != '2') {
	header('Location: dashboard.php');
}

$jsondata_admin = file_get_contents('./includes/eggzie.json');
$data_admin = json_decode($jsondata_admin, true);
$json_admin = $data_admin['info'];
$snoop_admin = $json_admin['mm'];
$snoop_admin = ($json_admin['mm'] == '0' ? 'selected' : '');
$snoop1_admin = ($json_admin['mm'] == '1' ? 'selected' : '');
$col_admin = $json_admin['oo'];
$user_admin = ($json_admin['oo'] == '0' ? 'selected' : '');
$user1_admin = ($json_admin['oo'] == '1' ? 'selected' : '');
$col3_admin = $json_admin['qq'];
$portalno = ($json_admin['qq'] == '0' ? 'selected' : '');
$portalyes = ($json_admin['qq'] == '1' ? 'selected' : '');
$col2_admin = $json_admin['ss'];
$user2_admin = ($json_admin['ss'] == '0' ? 'selected' : '');
$user12_admin = ($json_admin['ss'] == '1' ? 'selected' : '');
$newname2_admin = $json_admin['uu'];
$newlink2_admin = $json_admin['ww'];
$newicon2_admin = $json_admin['yy'];
$user_admin0 = ($json_admin['tt'] == '0' ? 'selected' : '');
$user_admin1 = ($json_admin['tt'] == '1' ? 'selected' : '');
$note_admin = ($json_admin['vv'] == '0' ? 'selected' : '');
$note_admin1 = ($json_admin['vv'] == '1' ? 'selected' : '');
$colinc5 = $json_admin['a5'];
$admin5achk = ($json_admin['a5'] == '0' ? 'selected' : '');
$admin5achk1 = ($json_admin['a5'] == '1' ? 'selected' : '');
$colinc10 = $json_admin['mm'];
$colinc11 = $json_admin['oo'];
$colinc14 = $json_admin['tt'];
$colinc15 = $json_admin['vv'];
$colinc16 = $json_admin['qq'];
$colinc17 = $json_admin['ss'];
$login1_admin = $json_admin['b1'];
$hiip = $json_admin['ip'];

if (isset($_POST['submit'])) {
	if (empty($_POST['ip'])) {
		$ipp = '####';
	}
	else {
		$ipp = $_POST['ip'];
	}

	$jsonData_admin = file_get_contents('./includes/eggzie.json');
	$arrayData_admin = json_decode($jsonData_admin, true);
	$replacementData_admin = [
		'info' => ['uu' => $_POST['uu'], 'ww' => $_POST['ww'], 'yy' => $_POST['yy'], 'b1' => $_POST['b1'], 'ip' => $ipp, 'a5' => $_POST['a5']]
	];
	$newArrayData_admin = array_replace_recursive($arrayData_admin, $replacementData_admin);
	$newJsonData_admin = json_encode($newArrayData_admin, JSON_UNESCAPED_UNICODE);
	file_put_contents('./includes/eggzie.json', $newJsonData_admin);
	header('Location: admin.php?updated');
}

if (isset($_POST['submit_two'])) {
	if (empty($_POST['ip'])) {
		$ipp = '####';
	}
	else {
		$ipp = $_POST['ip'];
	}

	$jsonData_admin = file_get_contents('./includes/eggzie.json');
	$arrayData_admin = json_decode($jsonData_admin, true);
	$replacementData_admin = [
		'info' => ['qq' => $_POST['qq'], 'mm' => $_POST['mm'], 'ss' => $_POST['ss'], 'oo' => $_POST['oo'], 'vv' => $_POST['vv'], 'tt' => $_POST['tt']]
	];
	$newArrayData_admin = array_replace_recursive($arrayData_admin, $replacementData_admin);
	$newJsonData_admin = json_encode($newArrayData_admin, JSON_UNESCAPED_UNICODE);
	file_put_contents('./includes/eggzie.json', $newJsonData_admin);
	header('Location: admin.php?updated');
}

include 'includes/header.php';
echo ' <!-- Begin Page Content -->' . "\n";
echo '        <div class="container-fluid">' . "\n";
echo "\n";

if (isset($_GET['succes'])) {
	echo $msg_delete;
}

if (isset($_GET['success'])) {
	echo $msg_success;
}

if (isset($_GET['updated'])) {
	echo $msg_success;
}

echo '          <!-- Page Heading -->' . "\n";
echo '          <h1 class="h3 mb-1" style="color:' . $colour_head_16 . ';">Panel Changes</h1>' . "\n";
echo '         ' . "\n";
echo '          <!-- Content Row -->' . "\n";
echo '          <div class="row">' . "\n";
echo "\n";
echo '            <!-- First Column -->' . "\n";
echo '            <div class="col-lg-4">' . "\n";
echo "\n";
echo '              <!-- Custom codes -->' . "\n";
echo '                <div class="card border-left-primary shadow h-100 card shadow mb-4">' . "\n";
echo '                <div class="card-header py-3">' . "\n";
echo '                <h6 class="m-0 font-weight-bold" style="color:' . $colour_head_11 . ';"><i class="fa fa-cogs"></i> Settings</h6>' . "\n";
echo '                </div>' . "\n";
echo '                <div class="card-body">' . "\n";
echo '                            <form method="post">' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label" style="color:' . $colour_head_18 . ';" for="uu">' . "\n";
echo '                                        <strong>Navbar Name</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control" style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="uu" name="uu" placeholder="Name" type="text" value="' . $newname2_admin . '"/>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    </div>' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label " style="color:' . $colour_head_18 . ';" for="ww">' . "\n";
echo '                                        <strong>Navbar Link</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control" style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="ww" name="ww" placeholder="Link" type="text" value="' . $newlink2_admin . '"/>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    </div>' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label " style="color:' . $colour_head_18 . ';" for="yy">' . "\n";
echo '                                        <strong>Navbar Icon</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control" style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="yy" name="yy" placeholder="Icon" type="text" value="' . $newicon2_admin . '"/>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    </div>' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label " style="color:' . $colour_head_18 . ';" for="ip">' . "\n";
echo '                                        <strong>Hidden IP</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="ip" name="ip" placeholder="IP to hide" type="text" value="' . $hiip . '"/>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    </div>' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label " style="color:' . $colour_head_18 . ';" for="b1">' . "\n";
echo '                                        <strong>Login Title</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control" style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="b1" name="b1" placeholder="Icon" type="text" value="' . $login1_admin . '"/>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    </div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="a5" >' . "\n";
echo '                            <strong> Include Colour Changes</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="a5">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $admin5achk . '>No</option>' . "\n";
echo '                                <option value="1"' . $admin5achk1 . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t\t" . '                       <div class="form-group">' . "\n";
echo '                        <button class="btn btn-success btn-icon-split" style="background-color:' . $colour_head_btn . ';border-color:' . $colour_head_btn . ';color:' . $colour_head_10 . ';" name="submit" type="submit">' . "\n";
echo '                        <span class="icon text-white-50"><i class="fas fa-check" style="color:' . $colour_head_10 . ';"></i></span><span class="text">Submit</span>' . "\n";
echo '                        </button>' . "\n";
echo '                            </div>' . "\n";
echo '                            </form>' . "\n";
echo '                            </div>' . "\n";
echo '                            </div>' . "\n";
echo '                            </div>' . "\n";
echo '            <!-- Second Column -->' . "\n";
echo '            <div class="col-lg-4">' . "\n";
echo "\n";
echo '              <!-- Custom codes -->' . "\n";
echo '                <div class="card border-left-primary shadow h-100 card shadow mb-4">' . "\n";
echo '                <div class="card-header py-3">' . "\n";
echo '                <h6 class="m-0 font-weight-bold" style="color:' . $colour_head_11 . ';"><i class="fa fa-user"></i> Settings</h6>' . "\n";
echo '                </div>' . "\n";
echo '                <div class="card-body">' . "\n";
echo '                            <form method="post">' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="qq" >' . "\n";
echo '                            <strong> Include Portals</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="qq">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $portalno . '>No</option>' . "\n";
echo '                                <option value="1"' . $portalyes . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="ss" >' . "\n";
echo '                            <strong> Include Sport</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="ss">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $user2_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $user12_admin . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="oo" >' . "\n";
echo '                            <strong> Include Settings</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="oo">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $user_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $user1_admin . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="tt" >' . "\n";
echo '                            <strong> Include Users</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="tt">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $user_admin0 . '>No</option>' . "\n";
echo '                                <option value="1"' . $user_admin1 . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="vv" >' . "\n";
echo '                            <strong> Include Notification</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="vv">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $note_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $note_admin1 . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" style="color:' . $colour_head_18 . ';" for="mm" >' . "\n";
echo '                            <strong> Include Snoop</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control"  style="background-color:' . $colour_head_17 . ';color:' . $colour_head_10 . ';" id="select" name="mm">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $snoop_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $snoop1_admin . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo '                        <button class="btn btn-success btn-icon-split" style="background-color:' . $colour_head_btn . ';border-color:' . $colour_head_btn . ';color:' . $colour_head_10 . ';" name="submit_two" type="submit">' . "\n";
echo '                        <span class="icon text-white-50"><i class="fas fa-check" style="color:' . $colour_head_10 . ';"></i></span><span class="text">Submit</span>' . "\n";
echo '                        </button>' . "\n";
echo '              </div>' . "\n";
echo '            </div>' . "\n";
echo '            </div>' . "\n";
echo '            </div>' . "\n";
echo '            </div>' . "\n";
echo "\n";
include 'includes/footer.php';
require 'includes/egz.php';
echo '</body>' . "\n";

?>