<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);
$IIIIIIIII111 = file_get_contents('./api/main.json');
$IIIIIIIlIIII = json_decode($IIIIIIIII111,true);
$IIIIIIIIlIII = $IIIIIIIlIIII['app'];
$theme_1 = ($IIIIIIIIlIII['theme'] == '1'?'selected': '');
$theme_2 = ($IIIIIIIIlIII['theme'] == '2'?'selected': '');
$theme_3 = ($IIIIIIIIlIII['theme'] == '3'?'selected': '');
$IIIIIIllll1l = ($IIIIIIIIlIII['theme'] == 'new_layout'?'selected': '');
$message = '<div class="alert alert-primary" id="flash-msg"><h4><i class="icon fa fa-check"></i>Items Updated!</h4></div>';
if (isset($_POST['submit'])) {
$IIIIIIIIlI11 = file_get_contents('./api/main.json');
$IIIIIIIIllIl = json_decode($IIIIIIIIlI11,true);
$IIIIIIIIllI1 = [
'app'=>['theme'=>$_POST['theme']]
];
$IIIIIIIIlllI = array_replace_recursive($IIIIIIIIllIl,$IIIIIIIIllI1);
$IIIIIIIIllll = json_encode($IIIIIIIIlllI,JSON_UNESCAPED_UNICODE);
file_put_contents('./api/main.json',$IIIIIIIIllll);
header('Location: theme.php?message='.$message);
}
include 'includes/header.php';
echo ' <!-- Begin Page Content -->'."\n";
echo '        <div class="container-fluid">'."\n";
echo "\n";
if (isset($_GET['message'])) {
echo $_GET['message'];
}
echo '          <!-- Page Heading -->'."\n";
echo '          <h1 class="h3 mb-1 text-gray-800">Theme 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 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-paint-brush"></i> Choose Your Theme</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 requiredField" for="theme" >'."\n";
echo '                            </label>'."\n";
echo '                            <select class="select form-control text-primary" id="select" name="theme">'."\n";
echo "\t\t\t\t\t\t\t\t".'<option value="1"'.$theme_1 .'>Theme 1</option>'."\n";
echo "\t\t\t\t\t\t\t\t".'<option value="2"'.$theme_2 .'>Theme 2</option>'."\n";
echo "\t\t\t\t\t\t\t\t".'<option value="3"'.$theme_3 .'>Theme 3</option>'."\n";
echo "\t\t\t\t\t\t\t\t".'<option value="new_layout"'.$IIIIIIllll1l .'>New Layout</option>'."\n";
echo '                            </select>'."\n";
echo "\t\t\t\t\t\t\t".'</div>'."\n";
echo '                            <div class="form-group">'."\n";
echo '                            <div class="card-body">'."\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 '                            </form>'."\n";
echo '                </div>'."\n";
echo '              </div>'."\n";
echo '            </div>'."\n";
echo "\n";
echo '            <!-- Theme -->'."\n";
echo '            <div class="col-xl-3 col-md-6 mb-4">'."\n";
echo '              <div class="card border-left-primary shadow py-2">'."\n";
echo '                <div class="card-body">'."\n";
echo '                  <div class="row no-gutters align-items-center">'."\n";
echo '                    <div class="col mr-2">'."\n";
echo '                      <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Theme 1</div>'."\n";
echo '                      <div class="h5 mb-0 font-weight-bold text-gray-800"><img class="card-img-bottom" src="./img/1.jpg" alt="Card image" style="width:100%"></div>'."\n";
echo '                    </div>'."\n";
echo '                  </div>'."\n";
echo '                </div>'."\n";
echo '              </div>'."\n";
echo '            </div>'."\n";
echo '            '."\n";
echo '            <!-- Theme -->'."\n";
echo '            <div class="col-xl-3 col-md-6 mb-4">'."\n";
echo '              <div class="card border-left-primary shadow py-2">'."\n";
echo '                <div class="card-body">'."\n";
echo '                  <div class="row no-gutters align-items-center">'."\n";
echo '                    <div class="col mr-2">'."\n";
echo '                      <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Theme 2</div>'."\n";
echo '                      <div class="h5 mb-0 font-weight-bold text-gray-800"><img class="card-img-bottom" src="./img/2.jpg" alt="Card image" style="width:100%"></div>'."\n";
echo '                    </div>'."\n";
echo '                  </div>'."\n";
echo '                </div>'."\n";
echo '              </div>'."\n";
echo '            </div>'."\n";
echo '            '."\n";
echo '            <!-- Theme -->'."\n";
echo '            <div class="col-xl-3 col-md-6 mb-4">'."\n";
echo '              <div class="card border-left-primary shadow py-2">'."\n";
echo '                <div class="card-body">'."\n";
echo '                  <div class="row no-gutters align-items-center">'."\n";
echo '                    <div class="col mr-2">'."\n";
echo '                      <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Theme 3</div>'."\n";
echo '                      <div class="h5 mb-0 font-weight-bold text-gray-800"><img class="card-img-bottom" src="./img/3.jpg" alt="Card image" style="width:100%"></div>'."\n";
echo '                    </div>'."\n";
echo '                  </div>'."\n";
echo '                </div>'."\n";
echo '              </div>'."\n";
echo '            </div>'."\n";
echo '            '."\n";
echo '            <!-- Theme -->'."\n";
echo '            <div class="col-xl-3 col-md-6 mb-4">'."\n";
echo '              <div class="card border-left-primary shadow py-2">'."\n";
echo '                <div class="card-body">'."\n";
echo '                  <div class="row no-gutters align-items-center">'."\n";
echo '                    <div class="col mr-2">'."\n";
echo '                      <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">New Layout</div>'."\n";
echo '                      <div class="h5 mb-0 font-weight-bold text-gray-800"><img class="card-img-bottom" src="./img/6.jpg?" alt="Card image" style="width:100%"></div>'."\n";
echo '                    </div>'."\n";
echo '                  </div>'."\n";
echo '                </div>'."\n";
echo '              </div>'."\n";
echo '            </div>'."\n";
echo '            '."\n";
echo '            </div>'."\n";
echo '            </div>'."\n";
echo "\n";
include 'includes/footer.php';
echo '</body>'."\n";
;
?>