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

session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$ifofuser = $_SESSION['id'];

if ($ifofuser == '1') {
	header('Location: app.php');
}

$jsondata_admin = file_get_contents('./includes/brbox.json');
$data_admin = json_decode($jsondata_admin, true);
$json_admin = $data_admin['info'];
$dns2_admin = $json_admin['hh'];
$dns02_admin = ($json_admin['hh'] == '0' ? 'selected' : '');
$dns12_admin = ($json_admin['hh'] == '1' ? 'selected' : '');
$col_admin = $json_admin['kk'];
$lang_admin = ($json_admin['kk'] == '0' ? 'selected' : '');
$lang1_admin = ($json_admin['kk'] == '1' ? 'selected' : '');
$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'];
$user3_admin = ($json_admin['qq'] == '0' ? 'selected' : '');
$user13_admin = ($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'];
$thm = $json_admin['ll'];
$thm1 = $json_admin['nn'];
$thm2 = $json_admin['pp'];
$thm3 = $json_admin['rr'];
$thm4 = $json_admin['tt'];
$thm5 = $json_admin['vv'];
$thm6 = $json_admin['xx'];
$thm7 = $json_admin['zz'];

if (isset($_POST['submit'])) {
	$jsonData_admin = file_get_contents('./includes/brbox.json');
	$arrayData_admin = json_decode($jsonData_admin, true);

	if (empty($_POST['thm'])) {
		$thm = '0';
	}
	else {
		$thm = $_POST['thm'];
	}

	if (empty($_POST['thm1'])) {
		$thm1 = '0';
	}
	else {
		$thm1 = $_POST['thm1'];
	}

	if (empty($_POST['thm2'])) {
		$thm2 = '0';
	}
	else {
		$thm2 = $_POST['thm2'];
	}

	if (empty($_POST['thm3'])) {
		$thm3 = '0';
	}
	else {
		$thm3 = $_POST['thm3'];
	}

	if (empty($_POST['thm4'])) {
		$thm4 = '0';
	}
	else {
		$thm4 = $_POST['thm4'];
	}

	if (empty($_POST['thm5'])) {
		$thm5 = '0';
	}
	else {
		$thm5 = $_POST['thm5'];
	}

	if (empty($_POST['thm6'])) {
		$thm6 = '0';
	}
	else {
		$thm6 = $_POST['thm6'];
	}

	if (empty($_POST['thm7'])) {
		$thm7 = '0';
	}
	else {
		$thm7 = $_POST['thm7'];
	}

	$replacementData_admin = [
		'info' => ['hh' => $_POST['hh'], 'kk' => $_POST['kk'], 'mm' => $_POST['mm'], 'oo' => $_POST['oo'], 'qq' => $_POST['qq'], 'ss' => $_POST['ss'], 'uu' => $_POST['uu'], 'ww' => $_POST['ww'], 'yy' => $_POST['yy'], 'll' => $thm, 'nn' => $thm1, 'pp' => $thm2, 'rr' => $thm3, 'tt' => $thm4, 'vv' => $thm5, 'xx' => $thm6, 'zz' => $thm7]
	];
	$newArrayData_admin = array_replace_recursive($arrayData_admin, $replacementData_admin);
	$newJsonData_admin = json_encode($newArrayData_admin, JSON_UNESCAPED_UNICODE);
	file_put_contents('./includes/brbox.json', $newJsonData_admin);
	header('Location: admin.php');
}

include 'includes/header.php';
echo ' <!-- Begin Page Content -->' . "\n";
echo '        <div class="container-fluid">' . "\n";
echo "\n";
echo '          <!-- Page Heading -->' . "\n";
echo '          <h1 class="h3 mb-1 text-gray-800">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-12">' . "\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 text-primary"><i class="fa fa-cog"></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 " for="uu">' . "\n";
echo '                                        <strong>Navbar Name</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control text-primary" 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 " for="ww">' . "\n";
echo '                                        <strong>Navbar Link</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control text-primary" 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 " for="yy">' . "\n";
echo '                                        <strong>Navbar Icon</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <div class="input-group">' . "\n";
echo '                                        <input class="form-control text-primary" id="yy" name="yy" placeholder="Icon" type="text" value="' . $newicon2_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" for="hh" >' . "\n";
echo '                            <strong> Show DNS</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" id="select" name="hh">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $dns02_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $dns12_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" for="kk" >' . "\n";
echo '                            <strong> Include Themes</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" id="select" name="kk">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $lang_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $lang1_admin . '>Yes</option>' . "\n";
echo '                            </select>' . "\n";
echo "\t\t\t\t\t\t\t" . '</div>' . "\n";
echo '                                <div class="form-group ">' . "\n";
echo '                                    <label class="control-label " for="btn_live">' . "\n";
echo '                                        <strong>Theme Selection</strong>' . "\n";
echo '                                    </label>' . "\n";
echo '                                    <br>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm" id="thm" value="1"' . "\n";

if ($thm == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm">Standard</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm1" id="thm1" value="1"' . "\n";

if ($thm1 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm1">Theme 1</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm2" id="thm2" value="1"' . "\n";

if ($thm2 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm2">Theme 2</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm3" id="thm3" value="1"' . "\n";

if ($thm3 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm3">Theme 3</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm4" id="thm4" value="1"' . "\n";

if ($thm4 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm4">Theme 4</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm5" id="thm5" value="1"' . "\n";

if ($thm5 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm5">Theme 5</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm6" id="thm6" value="1"' . "\n";

if ($thm6 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm6">Theme 6</label>' . "\n";
echo '                                    </div>' . "\n";
echo '                                    <div class="form-check form-check-inline">' . "\n";
echo '                                        <input class="form-check-input" type="checkbox" name="thm7" id="thm7" value="1"' . "\n";

if ($thm7 == '1') {
	echo 'checked';
}

echo "\t\t\t\t\t\t\t\t\t\t" . '<label class="form-check-label" for="thm7">New Layout</label>' . "\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" for="mm" >' . "\n";
echo '                            <strong> Include Snoop</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" 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 "\t\t\t\t\t\t\t" . '<div class="form-group ">' . "\n";
echo '                            <label class="control-label" for="oo" >' . "\n";
echo '                            <strong> Include User Logs</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" 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" for="qq" >' . "\n";
echo '                            <strong> Include Intro</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" id="select" name="qq">' . "\n";
echo "\t\t\t\t\t\t\t\t" . '<option value="0"' . $user3_admin . '>No</option>' . "\n";
echo '                                <option value="1"' . $user13_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" for="ss" >' . "\n";
echo '                            <strong> Include VPN</strong>' . "\n";
echo '                            </label>' . "\n";
echo '                            <select class="select form-control text-primary" 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 '                        <button class="btn btn-success btn-icon-split" name="submit" type="submit">' . "\n";
echo '                        <span class="icon text-white-50"><i class="fas fa-check"></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/brbox.php';
echo '</body>' . "\n";

?>